cwitools.extraction.segment

cwitools.extraction.segment(fits_in, var, snrmin=3, includes=None, excludes=None, nmin=10, pad=0, fill_holes=False, snr_int=None)

Segment cube into 3D regions above a threshold.

Parameters:
  • fits_in (NumPy.ndarray) – The input data.
  • var (NumPy.ndarray) – The input variance
  • snrmin (float) – The minimum SNR for detection
  • nmin (int) – The minimum 3D object size, in voxels.
  • includes (list) – List of int tuples indicating which wavelength ranges to include, in units of Angstrom. e.g. [(4100,4200), (4350,4400)]
  • excludes (list) – List of tuples indicating which wavelength ranges to exclude from segmentation process.
  • pad (int) – Number of pixels on xy axes to ignore, useful for excluding edge artifacts.
  • fill_holes (bool) – Set to TRUE to auto-fill holes in 3D objects.
  • snr_int (float) – Integrated SNR threshold, use instead of nmin to base selection on the total SNR instead of size.
Returns:

An object mask with labelled regions

Return type:

numpy.ndarray