WavecorrStep
- class jwst.wavecorr.wavecorr_step.WavecorrStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]
Bases:
JwstStepApply wavelength offsets to off-center NIRSpec point sources.
Create a
Stepinstance.- 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.
- parent
Step 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
kwsagainst specs/config.- **kwsdict
Additional parameters to set. These will be set as member variables on the new Step instance.
Attributes Summary
Methods Summary
process(step_input)Apply the wavelength correction to the input data.
Attributes Documentation
- class_alias = 'wavecorr'
- reference_file_types: ClassVar = ['wavecorr']
- spec
Methods Documentation
- process(step_input)[source]
Apply the wavelength correction to the input data.
Wavelength corrections are applied only to point sources in NIRSpec MOS and FS data.
The algorithm uses a reference file which is a look-up table of wavelength correction as a function of slit’s x-position and wavelength. The x-direction is the one parallel to dispersion/wavelength for both MOS and FS slits.
The slit’s x-position is read from the
source_xposattribute in the input slit metadata. For MOS data, the x-position is read from themsa_metadata_filein theassign_wcsstep. For FS data, the x-position is calculated from the ditherx_offsetvalue in theextract_2dstep.The wavelength value used to look up the wavelength correction at each dispersion element is an average of the wavelength values in the cross-dispersion direction at that element.
- Parameters:
- step_inputstr,
MultiSlitModel, orSlitModel Input file name or datamodel to correct.
- step_inputstr,
- Returns:
- output_model
MultiSlitModelorSlitModel The corrected datamodel.
- output_model