SourceDetectionStep

class romancal.source_detection.SourceDetectionStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]

Bases: RomanStep

SourceDetectionStep: Detect point-like sources in image to create a catalog for alignment in tweakreg.

Create a Step instance.

Parameters:
  • name (str, optional) – The name of the Step instance. Used in logging messages and in cache filenames. If not provided, one will be generated based on the class name.

  • parent (Step instance, optional) – The parent step of this step. Used to determine a fully-qualified name for this step, and to determine the mode in which to run this step.

  • config_file (str path, optional) – The path to the config file that this step was initialized with. Use to determine relative path names of other config files.

  • **kws (dict) – Additional parameters to set. These will be set as member variables on the new Step instance.

Attributes Summary

spec

Methods Summary

process(input)

This is where real work happens.

Attributes Documentation

spec
kernel_fwhm = float(default=None)  # DAOStarFinder:Size of Gaussian kernel,
# in pixels.
sharplo = float(default=0.)  # DAOStarFinder: Lower bound for sharpness.
# Typical values of sharpness range from 0 (flat) to 1 (delta function).
sharphi = float(default=1.0)  # DAOStarFinder: Upper bound for sharpness.
roundlo = float(default=-1.0)  # DAOStarFinder: Lower bound for roundness.
# A circular source will have a zero roundness. A source extended in x or
# y will have a negative or positive roundness, respectively.
roundhi = float(default=1.0)  # DAOStarFinder: Upper bound for roundness.
peakmax = float(default=1000.0)  # Upper limit on brightest pixel in sources.
max_sources = float(default=None)  # Max number of sources, choosing brightest.
scalar_threshold = float(default=None) # Detection threshold, to
# be used for entire image. Assumed to be in same units as data, and is
# an absolute threshold over background.
calc_threshold = boolean(default=True) # Calculate a single absolute
# detection threshold from image based on background.
snr_threshold = float(default=3.0)  # if calc_threshold_img,
# the SNR for the threshold image.
bkg_estimator = string(default='median')  # if calc_threshold_img,
# choice of mean, median, or mode.
bkg_boxsize = integer(default=9)  # if calc_threshold_img,
# size of box in pixels for 2D background.
bkg_sigma = float(default=2.0) # if calc_threshold_img,
# n sigma for sigma clipping bkgrnd.
bkg_filter_size = integer(default=3) # if calc_threshold_img,
# size of Gaussian kernel for background.
save_catalogs = boolean(default=False) # Save source catalog to file?
# Will overwrite an existing catalog of the same name.
output_cat_filetype = option('asdf', 'ecsv', default='asdf') # Used if
#save_catalogs=True - file type of output catalog.
fit_psf = boolean(default=False)  # fit source PSFs for accurate astrometry

Methods Documentation

process(input)[source]

This is where real work happens. Every Step subclass has to override this method. The default behaviour is to raise a NotImplementedError exception.