filter_sources
- acstools.utils_findsat_mrt.filter_sources(image, streak_positions, plot_streak=False, buffer=100, minsnr=5, max_width=75, fit_background=True, min_length=50, check_persistence=True, min_persistence=0.5, persistence_chunk=100, min_persistence_snr=3)
Filter trail catalog of likely spurious sources.
The filtering is based on SNR, trail width, and trail_persistence (over what fraction of the trail path can the trail actually be well-detected).
- Parameters:
- imagendarray
The original image containing the trails.
- streak_positionsarray
And array containing the endpoints of each trail being analyzed. The format is
[[(x0, y0), (x1, y1)], [(x0_b, y0_b), (x1_b, y1_b)], ...].- plot_streakbool, optional
Set to turn on plotting for each analyzed trail (WARNING: THIS CAN GENERATE A LOT OF PLOTS). The default is
False.- bufferint, optional
Size of cutout region on either side of a trail. The default is 100.
- minsnrfloat, optional
Minimum signal-to-noise ratio for a trail to be considered robust. The default is 5.
- max_widthint, optional
Maximum trail width for it to be considered robust. The default is 75.
- fit_backgroundbool, optional
Set to fit a polynomial to the background on either side of an extracted trail. The default is
True.- min_lengthint, optional
The minimum allowed length of trail to be analyzed. Taking the median along each row of the rotated image to create a 1D profile will also ignore any rows with fewer than this number of pixels. The default is 50.
- check_persistencebool, optional
Set to turn on persistence checking. The default is
True.- min_persistencefloat, optional
Minimum allowed persistence in order for a trail to be considered robust. The default is 0.5.
- persistence_chunkint, optional
Minimum size of trail sections when breaking it up to measure persistence. The default is 100.
- min_persistence_snrfloat, optional
Minimum required signal-to-noise ratio of a chunk of trail in order to have a persistence score of 1. The default is 3.
- Returns:
- properties
Table Same as the original table but with new columns:
mean trail flux
trail width
trail SNR
trail persistence
trail status (see
acstools.findsat_mrt.TrailFinder.mask_include_status)
- properties