SkyMatchStep

class jwst.skymatch.skymatch_step.SkyMatchStep(*args, **kwargs)[source]

Bases: JwstStep

Subtract or equalize sky background in science images.

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_models)

Run the step.

Attributes Documentation

class_alias = 'skymatch'
reference_file_types: list = []
spec
# General sky matching parameters:
skymethod = option('local', 'global', 'match', 'global+match', 'user', default='match') # sky computation method
match_down = boolean(default=True) # adjust sky to lowest measured value?
subtract = boolean(default=False) # subtract computed sky from image data?
skylist = string(default=None) # Filename pointing to list of (imagename skyval) pairs

# Image's bounding polygon parameters:
stepsize = integer(default=None) # Max vertex separation

# Sky statistics parameters:
skystat = option('median', 'midpt', 'mean', 'mode', default='mode') # sky statistics
dqbits = string(default='~DO_NOT_USE+NON_SCIENCE') # "good" DQ bits
lower = float(default=None) # Lower limit of "good" pixel values
upper = float(default=None) # Upper limit of "good" pixel values
nclip = integer(min=0, default=5) # number of sky clipping iterations
lsigma = float(min=0.0, default=4.0) # Lower clipping limit, in sigma
usigma = float(min=0.0, default=4.0) # Upper clipping limit, in sigma
binwidth = float(min=0.0, default=0.1) # Bin width for 'mode' and 'midpt' `skystat`, in sigma

# Memory management:
in_memory = boolean(default=True) # If False, preserve memory using temporary files

Methods Documentation

process(input_models)[source]

Run the step.

Parameters:
input_modelsAny data type readable into a ModelLibrary, e.g. an asn file

An association of datamodels to input.

Returns:
ModelLibrary

A library of datamodels with the skymatch step applied.