WavelengthrangeModel
- class stdatamodels.jwst.datamodels.WavelengthrangeModel(init=None, wrange_selector=None, wrange=None, order=None, extract_orders=None, wunits=None, **kwargs)
Bases:
ReferenceFileModelA model for a reference file of type “wavelengthrange”.
The model is used by MIRI, NIRSPEC, NIRCAM, and NIRISS.
Initialize the model.
- Parameters:
- initstr, None, optional
File name for input file in ASDF format from which to initialize the model.
- wrangelist
Contains a list of [order, filter, min wave, max wave]
- orderlist
A list of orders that are available and described in the file
- extract_orderslist
A list of filters and the orders that should be extracted by default
- wunits~astropy.units
The units for the wavelength data
- **kwargs
Additional keyword arguments to pass to ReferenceFileModel
Attributes Summary
The schema URI to validate the model against.
Methods Summary
get_wfss_wavelength_range(filter_name, orders)Retrieve the wavelength range for a WFSS observation.
on_save([path])Run a hook before writing a model to a file (FITS or ASDF).
to_fits()Write a data model to a FITS file.
validate()Check that required reference file keywords are set.
Attributes Documentation
- reftype = 'wavelengthrange'
- schema_url = 'http://stsci.edu/schemas/jwst_datamodel/wavelengthrange.schema'
The schema URI to validate the model against. If None, only basic validation of required metadata properties (filename, model_type) will occur.
Methods Documentation
- get_wfss_wavelength_range(filter_name, orders)
Retrieve the wavelength range for a WFSS observation.
- Parameters:
- filter_namestr
Filter for which to retrieve the wavelength range.
- orderslist
List of spectral orders
- Returns:
- wave_rangedict
Pairs of {order: (wave_min, wave_max)} for each order and the specific filter.
- on_save(path=None)
Run a hook before writing a model to a file (FITS or ASDF).
- Parameters:
- initstr
The path to the file that we’re about to save to.
- to_fits()
Write a data model to a FITS file.
- Parameters:
- initfile path or file object
The file to write to.
- *args
Additional positional arguments passed to astropy.io.fits.writeto.
- **kwargs
Additional keyword arguments passed to astropy.io.fits.writeto.
- validate()
Check that required reference file keywords are set.