SourceCatalogStep

class jwst.source_catalog.SourceCatalogStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]

Bases: JwstStep

Create a final catalog of source photometry and morphologies.

Create a Step instance.

Parameters:
namestr

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.

parentStep

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_filestr or pathlib.Path

The path to the config file that this step was initialized with. Use to determine relative path names of other config files.

_validate_kwdsbool

Validate given kws against specs/config.

**kwsdict

Additional parameters to set. These will be set as member variables on the new Step instance.

Attributes Summary

class_alias

reference_file_types

spec

Methods Summary

process(input_model)

Create the catalog from the input datamodel.

Attributes Documentation

class_alias = 'source_catalog'
reference_file_types: ClassVar = ['apcorr', 'abvegaoffset']
spec = "\n\n        aperture_ee1 = integer(default=30)    # aperture encircled energy 1\n        aperture_ee2 = integer(default=50)    # aperture encircled energy 2\n        aperture_ee3 = integer(default=70)    # aperture encircled energy 3\n        ci1_star_threshold = float(default=2.0)  # CI 1 star threshold\n        ci2_star_threshold = float(default=1.8)  # CI 2 star threshold\n        suffix = string(default='cat')        # Default suffix for output files\n        starfinder = option('dao', 'iraf', 'segmentation', default='segmentation') # Star finder to use.\n\n        # general starfinder options\n        snr_threshold = float(default=3.0) # SNR threshold above the bkg for star finder\n        bkg_boxsize = integer(default=1000) # The background mesh box size in pixels.\n        kernel_fwhm = float(default=2.0) # Gaussian kernel FWHM in pixels\n\n        # kwargs for DAOStarFinder and IRAFStarFinder, only used if starfinder is 'dao' or 'iraf'\n        minsep_fwhm = float(default=0.0) # Minimum separation between detected objects in FWHM\n        sigma_radius = float(default=1.5) # Truncation radius of the Gaussian kernel, units of sigma\n        sharplo = float(default=0.5) # The lower bound on sharpness for object detection.\n        sharphi = float(default=2.0) # The upper bound on sharpness for object detection.\n        roundlo = float(default=0.0) # The lower bound on roundness for object detection.\n        roundhi = float(default=0.2) # The upper bound on roundness for object detection.\n        brightest = integer(default=200) # Keep top ``brightest`` objects\n        peakmax = float(default=None) # Filter out objects with pixel values >= ``peakmax``\n\n        # kwargs for SourceCatalog and SourceFinder, only used if starfinder is 'segmentation'\n        npixels = integer(default=25) # Minimum number of connected pixels\n        connectivity = option(4, 8, default=8) # The connectivity defining the neighborhood of a pixel\n        nlevels = integer(default=32) # Number of multi-thresholding levels for deblending\n        contrast = float(default=0.001) # Fraction of total source flux an object must have to be deblended\n        multithresh_mode = option('exponential', 'linear', 'sinh', default='exponential') # Multi-thresholding mode\n        localbkg_width = integer(default=0) # Width of rectangular annulus used to compute local background around each source\n        apermask_method = option('correct', 'mask', 'none', default='correct') # How to handle neighboring sources\n        kron_params = float_list(min=2, max=3, default=None) # Parameters defining Kron aperture\n        deblend = boolean(default=False) # deblend sources?\n    "

Methods Documentation

process(input_model)[source]

Create the catalog from the input datamodel.

Parameters:
input_modelstr or ImageModel

A FITS filename or an ImageModel of a drizzled image.

Returns:
catalogastropy.table.Table or None

The source catalog, or None if no sources were found.