get_sources¶
-
sitelle.source.get_sources(detection_frame, mask=False, sigma=5.0, mode='DAO', fwhm=2.5, threshold=None, npix=4, return_segm_image=False)¶ Main method used to identify sources in a detection frame and estimate their position. Different modes are available, accesible through the
modekeyword :- DAO : uses the
photutils.DAOStarFindermethod, adapted from DAOPHOT. - IRAF : uses the
photutils.IRAFStarFindermethod, adapted from IRAF. - PEAK : uses the
photutils.find_peaks()method, looking for local peaks above a given threshold. - ORB : uses the
orb.utils.astrometry.detect_starsmethod, fitting stars in the frame - SEGM : uses the
photutils.detect_sources()method, segmenting the image.
The most reliable is SEGM.
Parameters: - detection_frame (2D
ndarray) – Map on which the sources should be visible. - mask (2D
ndarrayor bool, Default = False) – (Optional) If passed, only sources inside the mask are detected. - sigma (float) – (Optional) Signal to Noise of the detections we want to keep. Only used if threshold is None. In this case, the signal and the noise are computed with sigma-clipping on the deteciton frame. Default = 5
- threshold (float or 2D
ndarrayof floats) – (Optional) Threshold above which we consider having a detection. Default is None - mode (str) – (Optional) One of the detection mode listed above. Dafault = ‘DAO’
- fwhm (float) – (Optional) Expected FWHM of the sources. Default : 2.5
- npix (int) – (Optional) Only used by the ‘SEGM’ method : minimum number of connected pixels with flux above the threshold to make a credible source. Default = 4
- return_segm_image (bool, Default = False) – (Optional) Only used in the ‘SEGM’ mode. If True, returns the obtained segmentation image.
Returns: sources – A DataFrame where each row represents a detection, with at least the positions named as
xcentroid,ycentroid(WARNING : using astropy convention). The other columns depend on the mode used.Return type: - DAO : uses the