IFUPostModel
- class jwst.datamodels.IFUPostModel(init=None, slice_models=None, **kwargs)
Bases:
ReferenceFileModel
A model for a NIRSPEC reference file of type “ifupost”.
Initialize the model.
- Parameters:
- initstr, None, optional
File name for input file in ASDF format from which to initialize the model.
- slice_modelsdict
A dictionary with slice transforms with the following entries {“slice_N”: {‘linear’: astropy.modeling.Model, … ‘xpoly’: astropy.modeling.Model, … ‘xpoly_distortion’: astropy.modeling.Model, … ‘ypoly’: astropy.modeling.Model, … ‘ypoly_distortion’: astropy.modeling.Model, … }} These are the transforms from the IFU slicer plane to the MSA frame.
- Raises:
- ValueError
If the number of slice models is not 30.
Attributes Summary
The schema URI to validate the model against.
Methods Summary
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 = 'ifupost'
- schema_url = 'http://stsci.edu/schemas/jwst_datamodel/ifupost.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
- 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.
- populate_meta()
- 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.