hispecdrp.datamodels.gausslsf
Functions
|
Map wavelengths onto detector pixel index, allowing a decreasing WAVE row. |
|
|
|
Classes
|
The effective line spread function (LSF) is modeled with a Gaussian where the width is described with a 2D polynomial (pixel, order, width). |
- class GaussianLSFModel(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:
FiberAttributeProxyMixin,CalibrationModelThe effective line spread function (LSF) is modeled with a Gaussian where the width is described with a 2D polynomial (pixel, order, width).
Extensions
‘_FIB#’ in an HDU name denotes the fiber number (1..model.num_fibers).
HDU Name
HDU Type
Data Type
Dimensions
Units
Description
SPEC_FIB#
Image
Float32
Nord x 4096
e-/s
LFC spectrum.
SPEC_ERR_FIB#
Image
Float32
Nord x 4096
e-/s
LFC spectrum error.
SPEC_VAR_POISSON_FIB#
Image
Float32
Nord x 4096
(e-/s)^2
LFC spectrum variance (Poisson).
SPEC_VAR_RNOISE_FIB#
Image
Float32
Nord x 4096
(e-/s)^2
LFC spectrum variance (read noise).
SPEC_DQ_FIB#
Image
UInt32
Nord x 4096
LFC spectrum data quality.
WAVE_FIB#
Image
Float64
Nord x 4096
micron
LFC spectrum wavelength grid.
LSF_PARAMS_FIB#
Image
Float32
Nord x 4096 x 3
LFC spectrum Gaussian LSF parameters (mu, sigma, offset).
CHEB_COEFFS_FIB#
Image
Float64
N x N
Chebyshev coefficients for the wavelength solution.
CHEB_NORM_FIB#
Table
See docs
See docs
Chebyshev pixel/order normalization bounds.
LFC_FITPARAMS_FIB#
Table
See docs
See docs
LFC fit parameters for each LFC mode, order, and fiber.
- 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'>}, 'CHEB_COEFFS': {'dtype': <class 'numpy.float64'>, 'enumerate': 'FIB', 'hdu_type': <class 'astropy.io.fits.hdu.image.ImageHDU'>, 'shape': ('ANY', 'ANY'), 'title': 'Chebyshev coefficients for the wavelength solution.'}, 'CHEB_NORM': {'columns': {'ORDER_NORM_MAX': <class 'numpy.int16'>, 'ORDER_NORM_MIN': <class 'numpy.int16'>, 'PIXEL_NORM_MAX': <class 'numpy.float64'>, 'PIXEL_NORM_MIN': <class 'numpy.float64'>}, 'enumerate': 'FIB', 'hdu_type': <class 'astropy.io.fits.hdu.table.BinTableHDU'>, 'title': 'Chebyshev pixel/order normalization bounds.'}, 'DATA_ANCESTORS': {'columns': {'CLASS': <class 'str'>, 'FILENAME': <class 'str'>, 'TIME_APPLIED': <class 'str'>}, 'hdu_type': <class 'astropy.io.fits.hdu.table.BinTableHDU'>}, 'LFC_FITPARAMS': {'columns': {'AMPLITUDE': <class 'numpy.float64'>, 'AMPLITUDE_ERR': <class 'numpy.float64'>, 'B': <class 'numpy.float64'>, 'B_ERR': <class 'numpy.float64'>, 'FWHM_ERR_PIX': <class 'numpy.float64'>, 'FWHM_ERR_WAVE': <class 'numpy.float64'>, 'FWHM_PIX': <class 'numpy.float64'>, 'FWHM_WAVE': <class 'numpy.float64'>, 'MODE_NUM': <class 'numpy.int16'>, 'MU_ERR_PIX': <class 'numpy.float64'>, 'MU_ERR_WAVE': <class 'numpy.float64'>, 'MU_PIX': <class 'numpy.float64'>, 'ORDER': <class 'numpy.uint16'>, 'WAVE': <class 'numpy.float64'>}, 'enumerate': 'FIB', 'hdu_type': <class 'astropy.io.fits.hdu.table.BinTableHDU'>, 'title': 'LFC fit parameters for each LFC mode, order, and fiber.'}, 'LSF_PARAMS': {'dtype': <class 'numpy.float32'>, 'enumerate': 'FIB', 'hdu_type': <class 'astropy.io.fits.hdu.image.ImageHDU'>, 'shape': ('N_ORDERS', 'DETECTOR_SIZE_Y', 3), 'title': 'LFC spectrum Gaussian LSF parameters (mu, sigma, offset).'}, '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'>}, 'SPEC': {'default': 0, 'dtype': <class 'numpy.float32'>, 'enumerate': 'FIB', 'hdu_type': <class 'astropy.io.fits.hdu.image.ImageHDU'>, 'shape': ('N_ORDERS', 'DETECTOR_SIZE_Y'), 'title': 'LFC spectrum.', 'units': 'e-/s'}, 'SPEC_DQ': {'default': 0, 'dtype': <class 'numpy.uint32'>, 'enumerate': 'FIB', 'hdu_type': <class 'astropy.io.fits.hdu.image.ImageHDU'>, 'shape': ('N_ORDERS', 'DETECTOR_SIZE_Y'), 'title': 'LFC spectrum data quality.'}, 'SPEC_ERR': {'default': 0, 'dtype': <class 'numpy.float32'>, 'enumerate': 'FIB', 'hdu_type': <class 'astropy.io.fits.hdu.image.ImageHDU'>, 'shape': ('N_ORDERS', 'DETECTOR_SIZE_Y'), 'title': 'LFC spectrum error.', 'units': 'e-/s'}, 'SPEC_VAR_POISSON': {'default': 0, 'dtype': <class 'numpy.float32'>, 'enumerate': 'FIB', 'hdu_type': <class 'astropy.io.fits.hdu.image.ImageHDU'>, 'shape': ('N_ORDERS', 'DETECTOR_SIZE_Y'), 'title': 'LFC spectrum variance (Poisson).', 'units': '(e-/s)^2'}, 'SPEC_VAR_RNOISE': {'default': 0, 'dtype': <class 'numpy.float32'>, 'enumerate': 'FIB', 'hdu_type': <class 'astropy.io.fits.hdu.image.ImageHDU'>, 'shape': ('N_ORDERS', 'DETECTOR_SIZE_Y'), 'title': 'LFC spectrum variance (read noise).', 'units': '(e-/s)^2'}, 'WAVE': {'default': 0, 'dtype': <class 'numpy.float64'>, 'enumerate': 'FIB', 'hdu_type': <class 'astropy.io.fits.hdu.image.ImageHDU'>, 'shape': ('N_ORDERS', 'DETECTOR_SIZE_Y'), 'title': 'LFC spectrum wavelength grid.', 'units': 'micron'}}
- convolve_spectrum(wave, spec, fiber, order, kernel_size_sigma=5.0)[source]
Convolve
specon uniformwavewith this fiber/order LSF.
- make_kernels(wave, fiber, order, kernel_size_sigma=5.0)[source]
Gaussian LSF kernels on a uniform wavelength grid.
- Parameters:
wave – 1-D uniform wavelength grid (micron).
fiber – Fiber number (1, 2, or 3).
order – Echelle order.
kernel_size_sigma – Half-width of each kernel in units of Gaussian σ.
- Returns:
kernel_grid, kernels –
kernel_gridis the shared wavelength-offset axis;kernelshas shape(len(wave), n_kernel)and is row-normalized.
- on_init()[source]