liger_iris_pipeline.datamodels
- class liger_iris_pipeline.datamodels.DQModel(init=None, **kwargs)[source]
Bases:
ReferenceFileModel
A data model for 2D masks for Liger data.
Parameters
- dqnumpy uint32 array
The mask
- dq_defnumpy table
DQ flag definitions
- 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”.
- class liger_iris_pipeline.datamodels.DarkModel(init=None, **kwargs)[source]
Bases:
ReferenceFileModel
A data model for darks from either the Liger or IRIS Imager or IFU.
- class liger_iris_pipeline.datamodels.FlatModel(init=None, **kwargs)[source]
Bases:
ReferenceFileModel
A data model for flat field images from either the Liger or IRIS Imager or IFU.
- class liger_iris_pipeline.datamodels.IFUCubeModel(init=None, **kwargs)[source]
Bases:
LigerIRISDataModel
A data model for IFU data at the 3D cube stage.
Parameters: wavelength (np.ndarray): The wavelength vector. data (np.ndarray): The science data cube. err (np.ndarray): : The error array cube. dq (np.ndarray): The 3D data quality array cube.
- class liger_iris_pipeline.datamodels.IFUImageModel(init=None, **kwargs)[source]
Bases:
LigerIRISDataModel
A data model for IFU data at the 2D image stage.
Parameters: data (np.ndarray): The science data. err (np.ndarray): : The error array. dq (np.ndarray): The 2D data quality array.
- class liger_iris_pipeline.datamodels.ImagerModel(*args, **kwargs)[source]
Bases:
LigerIRISDataModel
A data model for the typical data product from the Liger or IRIS imager (single detector).
Parameters: data (np.ndarray): The science data array. err (np.ndarray): : The error array. dq (np.ndarray): 2D data quality array.
- class liger_iris_pipeline.datamodels.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
- class liger_iris_pipeline.datamodels.NonlinearReadoutParametersModel(init=None, **kwargs)[source]
Bases:
ReferenceFileModel
A data model for the detector nonlinear readout polynomial coeffs.
- class liger_iris_pipeline.datamodels.RampModel(init=None, **kwargs)[source]
Bases:
LigerIRISDataModel
A data model for 4D ramps from Liger or IRIS for the IFU or Imager. 4D arrays are formatted as (groups, reads, pixely, pixelx).
Parameters: data (np.ndarray): 4-D array of counts for each read. dq (np.ndarray): 4-D data quality array for each read.
- class liger_iris_pipeline.datamodels.ReferenceFileModel(init=None, **kwargs)[source]
Bases:
LigerIRISDataModel
A base data model for Liger and IRIS calibration reference data.
- generate_filename(instrument: str | None = None, detector: str | None = None, reftype: str | None = None, date: str | None = None, version: str | None = None)[source]
- print_err(message)[source]
- save(path, dir_path=None, *args, **kwargs)[source]
Save data model. If the ‘dq’ and ‘dq_def’ exist they need special handling.
- liger_iris_pipeline.datamodels.open(init=None, memmap: bool = False, copy: bool = False, **kwargs)[source]
Creates a DataModel from a number of different types.
- Args:
- init (None | tuple | str | file object | astropy.io.fits.HDUList | numpy.ndarray | dict):
The input used to initialize the model:
None: A default data model with no shape.
tuple: A shape tuple to initialize empty data.
str: A file path to load data from (FITS, JSON, or ASDF).
file object: A readable file object.
astropy.io.fits.HDUList: Initialize from an ~astropy.io.fits.HDUList.
numpy.ndarray: A NumPy array to initialize the data.
dict: An object model tree for the data model.
memmap: (bool) (Turn memmap of file on or off. (default: False).
- kwargs (dict): Additional arguments used to initialize the model.
validate_arrays (bool): If True, arrays will be validated against ndim, max_ndim, and datatype validators in the schemas.
- Returns:
LigerIRISDataModel : The specific LigerIRISDataModel instance.
Modules
Liger and IRIS Data Quality Flags copied from jwst. |
|
This module supports the entry points for ASDF support for the liger_iris_pipeline.datamodels. |
|