DETECTOR#
- class excalibuhr.data.DETECTOR(data=None, fields=None, filename=None)[source]#
Bases:
objectObject for a list of detectors data in 2D shape (N_spatial_pixel x N_spectral_pixel)
Methods Summary
load_extr2d(filename)Method for reading and unraveling the pipeline 2D extracted .npz files into arrays.
plot_extr2d_model(savename)save_extr2d(filename)Method for saving the pipeline extracted 2D spectral data to .npz files.
Methods Documentation
- load_extr2d(filename)[source]#
Method for reading and unraveling the pipeline 2D extracted .npz files into arrays.
- Parameters:
filename (str) – Path of the EXTR2D .npz file to load. The 2D data will be unraveled to the 4d shape of (N_detector, N_order, N_spatial_pixel, N_dispersion_pixel), and set as the attributes of the class.
- Returns:
None
- Return type:
NoneType
- save_extr2d(filename)[source]#
Method for saving the pipeline extracted 2D spectral data to .npz files. The 2D data shape can vary in the spatial diemsion across different orders, therefore cannot be directly stored as numpy ndarray. The data of all orders are stacked along the 0th axis and then saved as numpy arrays.
- Parameters:
filename (str) – Path to save the 2d data as a .npz file. A list of 2D data (such as flux, variance, fitted spatial profile) will be be stacked and saved.
- Returns:
None
- Return type:
NoneType