MSAModel

class stdatamodels.jwst.datamodels.MSAModel(init=None, models=None, data=None, **kwargs)

Bases: ReferenceFileModel

A model for a NIRSPEC reference file of type “msa”.

Initialize the model.

Parameters:
initstr, None, optional

File name for input file in ASDF format from which to initialize the model.

modelsdict, optional

Transform from relative positions of each shutter within the MSA plane to absolute positions within the MSA

datadict, optional

Relative positions and sizes of each shutter within the MSA plane

**kwargs

Additional keyword arguments to pass to ReferenceFileModel.

Attributes Summary

reftype

schema_url

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

populate_meta()

to_fits()

Write a data model to a FITS file.

validate()

Check that required reference file keywords are set.

Attributes Documentation

reftype = 'msa'
schema_url = 'http://stsci.edu/schemas/jwst_datamodel/msa.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.