liger_iris_pipeline.datamodels.model_base
Classes
|
The base data model for Liger and IRIS data products. |
- class liger_iris_pipeline.datamodels.model_base.LigerIRISDataModel(init=None, **kwargs)[source]
Bases:
DataModel
The base data model for Liger and IRIS data products. This class should not be instantiated on its own.
- generate_filename(instrument: str | None = None, sem_id: str | None = None, program_number: str | None = None, obs_number: str | None = None, detector: str | None = None, exptype: str | None = None, level: int | str | None = None, exp: int | str | None = None, subarray: int | str | None = None)[source]
- get_crds_parameters()[source]
Get parameters used by CRDS to select references for this model.
Returns: dict : the CRDS parameters
- get_primary_array_name()[source]
Returns the name “primary” array for this model, which controls the size of other arrays that are implicitly created. This is intended to be overridden in the subclasses if the primary array’s name is not “data”.
- on_init(init)[source]
Hook invoked by the base class before returning a newly created model instance.
- on_save(init)[source]
Hook invoked by the base class before writing a model to a file (FITS or ASDF).
- save(path=None, dir_path: str | None = None, **kwargs)[source]
Save the model to a file.
- Args:
path (str) : The path to the file to save the model to. dir_path (str, optional) : The path to the directory to save the file to