PictureFrameStep

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

Bases: JwstStep

Perform picture frame correction.

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

Scale and subtract the thermal "picture frame" effect from a ramp data set.

Attributes Documentation

class_alias = 'picture_frame'
reference_file_types: ClassVar = ['pictureframe']
spec
mask_science_regions = boolean(default=True)  # Mask known science regions.
n_sigma = float(default=2.0)  # Clipping level for non-background signal.
save_mask = boolean(default=False)  # Save the created background mask.
save_correction = boolean(default=False)  # Save the thermal correction data.
skip = boolean(default=True)  # By default, skip the step.

Methods Documentation

process(input_data)[source]

Scale and subtract the thermal “picture frame” effect from a ramp data set.

First, a draft rate image is created if needed from the input ramp data. A background mask is created from the rate image by masking any known science regions, then iteratively sigma-clipping. Then, the median levels are computed from background data in a central region and from the edges of each group image. These levels are used to scale and offset the correction image in the pictureframe reference file, then the scaled image is subtracted from the input data in each group.

Input data is expected to be a NIRSpec FULL frame ramp file (RampModel), in between jump and ramp fitting steps (before 1/f noise cleaning), or a rate file (ImageModel or CubeModel).

Alternately, a rate image or rateints cube may be provided. In that case, no draft rate image is necessary, and the correction is directly applied to the rate image.

Parameters:
input_datastr or RampModel or ImageModel or CubeModel

Filename or input datamodel to be corrected. Must be NIRSpec full-frame.

Returns:
output_modelRampModel or ImageModel or CubeModel

The corrected datamodel, matching the type of the input.