ImprintStep

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

Bases: JwstStep

Remove NIRSpec MSA imprint structure from an exposure.

The imprint structure is removed by subtracting a separate imprint (a.k.a. leakcal) exposure.

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

class_alias

spec

Methods Summary

process(input_data, imprint)

Subtract an imprint image from the input data.

Attributes Documentation

class_alias = 'imprint'
spec

Methods Documentation

process(input_data, imprint)[source]

Subtract an imprint image from the input data.

If a single imprint image is provided, it is directly subtracted without further checks.

If multiple imprint images are provided, the background target flag (meta.dither.observation.bkgdtarg) is checked for a match to the input data. If there is a single imprint image matching the input data’s background flag, then it is directly subtracted without further checks.

If there are multiple imprint images that match the input data’s background flag, then the imprint is checked for an observation ID (meta.observation.observation_number) and dither position index (meta.dither.position_number). If there is a match, then the matching imprint image is subtracted from the input data. If there is no match, then the step is skipped for the input data.

Parameters:
  • input_data (DataModel or str) – Input exposure to be corrected.

  • imprint (list of str or DataModel) – Imprint exposures associated with the input.

Returns:

The imprint subtracted exposure.

Return type:

DataModel