-
Notifications
You must be signed in to change notification settings - Fork 1
PointSourceExtractor
PointSourceExtractor provides functionality for identifying and characterizing point sources in an image. The source extraction algorithm is described here:
https://iopscience.iop.org/article/10.1088/1538-3873/ab7ee8
public PointSourceExtractor()
The default constructor for the class object, used when an image is to be examined for sources.
public PointSourceExtractor(double[] XCoords, double[] YCoords)
The constructor for the class object used when an image already has a given list of coordinate locations for sources in the image. Use overload of Extract_Sources
referencing the objects own centroids to determine source characteristics at the coordinate locations.
public PointSourceExtractor(JPFITS.FITSBinTable BinTablePSE)
The constructor for the class object based on a PointSourceExtractor saved from another session.
public void Extract_Sources(double[,] image, double pix_saturation, double pix_min, double pix_max, double kernel_min, double kernel_max, bool threshholds_as_SN, int kernel_radius, int source_separation, bool auto_background, string kernel_filename_template, bool[,]? ROI_region, bool show_waitbar)
Searches for sources within a 2D image array.
-
image
The 2D image array to find sources in.pix_saturation
The saturation threshold of of the image pixels, for finding saturation islands. Set equal to zero (0) if not needed. -
pix_min
The minimum pixel threshold value (or SN) to consider a potential source. -
pix_max
The maximum pixel threshold value (or SN) to consider a potential source. -
kernel_min
The minimum kernel pixel sum threshold value (or SN) to consider a potential source. -
kernel_max
The maximum kernel pixel sum threshold value (or SN) to consider a potential source. -
threshholds_as_SN
Treat the thresholds as Signal to Noise instead of pixel values. -
kernel_radius
The radius (pixels) of the kernel to find sources within. Secondary sources within the radius will be ignored. -
source_separation
The separation (pixels) between sources. Only the brightest source within the separation radius is kept. -
auto_background
Automatically determine the local background for potential sources. Not required if background is known to be zeroed, but should have no effect if used in this case. -
kernel_filename_template
The template full file name for the kernels to be saved. Sources will be numbered sequentially. Pass empty string for no saving. -
ROI_region
A boolean array of valid area to examine. Pass null or array of equal dimension to source image all true for entire image search. -
show_waitbar
Show a cancellable wait bar.
public void Extract_Sources(double[,] image, double[] XCoords, double[] YCoords, int kernel_radius, bool auto_background, string kernel_filename_template)
Determines centroids and other kernel information for known sources at given coordinates.
-
image
The 2D image array containing the known sources to extract. -
XCoords
The x-axis coordinates of the sources. These can be PSE.Centroids_X. -
YCoords
The y-axis coordinates of the sources. These can be PSE.Centroids_Y. -
kernel_radius
The radius (pixels) of the kernel to centroid. -
auto_background
Automatically determine the local background for potential sources. Not required if background is known to be zeroed, but should have no effect if used in this case. -
kernel_filename_template
The template full file name for the kernels to be saved. Sources will be numbered sequentially. Pass empty string for no saving.