hispecdrp.datamodels.ramp
Classes
|
The Teledyne Hawaii HXRG detectors use up-the-ramp (UTR) non-destructive reads, so raw data is a cube where each 2D slice is a single read. |
- class RampModel(filepath=None, meta=None, meta_only=False, extensions=None, correct_dtypes=False, config=None, validate_meta=True, instrument_name=None, shape=None, **kwargs)[source]
Bases:
DataModelThe Teledyne Hawaii HXRG detectors use up-the-ramp (UTR) non-destructive reads, so raw data is a cube where each 2D slice is a single read.
Extensions
HDU Name
HDU Type
Data Type
Dimensions
Units
Description
DATA
Image
UInt16 | Float32
Nreads x 4096 x 4160
DN
Raw UTR data.
DQ_RAW
Image
UInt8
Nreads x 4096 x 4160
Data quality flags unique to each pixel and read.
DQ
Image
UInt32
4096 x 4160
Data quality flags that apply to all reads.
- EXTENSIONS = {'CALIBRATIONS': {'columns': {'CAL_ROLE': <class 'str'>, 'CAL_TYPE': <class 'str'>, 'CLASS': <class 'str'>, 'DATETIME_OBS': <class 'str'>, 'DRP_VERSION': <class 'str'>, 'FILENAME': <class 'str'>, 'ID': <class 'str'>, 'LAST_PROCESSED': <class 'str'>, 'TIME_APPLIED': <class 'str'>}, 'hdu_type': <class 'astropy.io.fits.hdu.table.BinTableHDU'>}, 'DATA': {'dtype': (<class 'numpy.uint16'>, <class 'numpy.float32'>), 'hdu_type': <class 'astropy.io.fits.hdu.image.ImageHDU'>, 'shape': ('N_READS', 'DETECTOR_SIZE_Y', 'DETECTOR_SIZE_X'), 'title': 'Raw UTR data.', 'units': 'DN'}, 'DATA_ANCESTORS': {'columns': {'CLASS': <class 'str'>, 'FILENAME': <class 'str'>, 'TIME_APPLIED': <class 'str'>}, 'hdu_type': <class 'astropy.io.fits.hdu.table.BinTableHDU'>}, 'DQ': {'default': 0, 'dtype': <class 'numpy.uint32'>, 'hdu_type': <class 'astropy.io.fits.hdu.image.ImageHDU'>, 'shape': ('DETECTOR_SIZE_Y', 'DETECTOR_SIZE_X'), 'title': 'Data quality flags that apply to all reads.'}, 'DQ_RAW': {'default': 0, 'dtype': <class 'numpy.uint8'>, 'hdu_type': <class 'astropy.io.fits.hdu.image.ImageHDU'>, 'shape': ('N_READS', 'DETECTOR_SIZE_Y', 'DETECTOR_SIZE_X'), 'title': 'Data quality flags unique to each pixel and read.'}, 'PRIMARY': {'dtype': None, 'hdu_type': <class 'astropy.io.fits.hdu.image.PrimaryHDU'>}, 'RECEIPT': {'columns': {'CLASS': <class 'str'>, 'CONFIG_FILE': <class 'str'>, 'DRP_GIT_COMMIT_ID': <class 'str'>, 'DRP_VERSION': <class 'str'>, 'FILENAME': <class 'str'>, 'PARAMETERS': <class 'str'>, 'PROC_END_TIME': <class 'str'>, 'PROC_START_TIME': <class 'str'>, 'STATUS': <class 'str'>}, 'hdu_type': <class 'astropy.io.fits.hdu.table.BinTableHDU'>}}
- get_delta_readtimes(n_channels=None, vertical=None)[source]
Get the time for each read in the ramp in seconds relative to the first read. The start time of the first read in MJD is given by get_first_read_mjd().
Notes
This implementation does not model any specific instrument and is meant for testing only.
- Parameters:
n_channels (int, optional) – Number of channels the detector is read out with.
vertical (bool, optional) – If True, the channels are assumed to be vertical. If False, the readout channels are assumed to be horizontal. Within each channel, we assume the pixels are readout row by row assuming vertical channels; meaning channels are read in the width direction.
- Returns:
readtimes (np.ndarray) – 1D array of length n_reads with the time of each read in seconds relative to the first read.
- get_first_read_mjd(n_channels=None, vertical=None)[source]
Get the MJD times of the first reads for each pixel as a 2D array.
Notes
This implementation does not model any specific instrument and is meant for testing only.
- Parameters:
n_channels (int, optional) – Number of channels the detector is read out with.
vertical (bool, optional) – If True, the channels are assumed to be vertical. If False, the readout channels are assumed to be horizontal. Within each channel, we assume the pixels are readout row by row assuming vertical channels; meaning channels are read in the width direction.
- Returns:
first_read_mjd (np.ndarray) – 2D array of shape (ny, nx) with the MJD time of the first read for each pixel.