GUIBRUSHR.General_Constants.Classes.Night module¶
- exception GUIBRUSHR.General_Constants.Classes.Night.NightError[source]¶
Bases:
ExceptionBase exception class for Night-related errors.
- exception GUIBRUSHR.General_Constants.Classes.Night.FileNotFoundErrorPers[source]¶
Bases:
NightErrorRaised when a required file is not found.
- exception GUIBRUSHR.General_Constants.Classes.Night.DataValidationError[source]¶
Bases:
NightErrorRaised when data validation fails.
- GUIBRUSHR.General_Constants.Classes.Night.sigma_calc(spectra, simulation=False)[source]¶
Calculate sigma values for spectral data.
- class GUIBRUSHR.General_Constants.Classes.Night.Night(chosen_limit_phase: float, path_instrument: str | Path, date: str, rad_mode: str, path_good_order: str | Path, path_order_tell: str | Path, path_order_test: str | Path, table_output_file: str | Path | None = None, CC: bool = False, simulation: bool = False, synthetic: bool = False, retrieval_standardize: str = 'From pkl')[source]¶
Bases:
objectA class to manage and process astronomical night observation data.
This class handles the processing of spectroscopic data, including phase calculations, spectral order management, and various data transformations.
- intransit¶
Indices of spectra within transit
- Type:
NDArray
- maskinvm¶
Mask inversion data
- Type:
NDArray
- wlen_list_overplot¶
Wavelength list for overplotting
- Type:
NDArray
- sigma_spectra¶
Spectral sigma values
- Type:
NDArray
- lambdas¶
Wavelength data
- Type:
NDArray
- spectra¶
Spectral data
- Type:
NDArray
- n_good_orders¶
Number of spectral orders
- Type:
int
- n_pixels¶
Number of pixels
- Type:
int
- n_phases_considered¶
Number of in-transit phases considered
- Type:
int
- good_order¶
Good order indices
- Type:
NDArray
- n_tot_phases¶
Total number of phases
- Type:
int
- barycentric_velocity¶
Barycentric velocity corrections
- Type:
NDArray
- phases¶
Phase values
- Type:
NDArray
- __init__(chosen_limit_phase: float, path_instrument: str | Path, date: str, rad_mode: str, path_good_order: str | Path, path_order_tell: str | Path, path_order_test: str | Path, table_output_file: str | Path | None = None, CC: bool = False, simulation: bool = False, synthetic: bool = False, retrieval_standardize: str = 'From pkl') None[source]¶
Initialize the Night object with observation parameters.
- Parameters:
chosen_limit_phase – Phase limit for transit
path_instrument – Path to instrument data
date – Observation date
rad_mode – Radiation mode
path_good_order – Path to good order data
path_order_tell – Path to telluric order data
path_order_test – Path to test order data
table_output_file – Optional path for output table
CC – Cross-correlation flag
simulation – If True, simulate data
synthetic – If True, synthetic data
retrieval_standardize – Standardize option for retrieval data
- Raises:
NightError – If initialization of any data processing step fails
- load_aligned_and_spAb_pca(synthetic) None[source]¶
Load additional data files required for processing.
- fase_operation(chosen_limit_phase: float, CC: bool) None[source]¶
Process phase data and determine transit status.
- Parameters:
chosen_limit_phase – Phase limit for transit determination
CC – Cross-correlation flag
- Raises:
FileNotFoundErrorPers – If phase file is not found
- good_order_operation(synthetic) None[source]¶
Load good order data from pickle file.
- Parameters:
synthetic – If True, skip loading good order data.
- Raises:
FileNotFoundErrorPers – If good order file is not found
- management_spAbi(synthetic) None[source]¶
Process spectral data and set dimensional attributes. :param synthetic: If True, skip loading spectral data.
- Raises:
FileNotFoundErrorPers – If spectral data file is not found
- read_maskinv(synthetic) None[source]¶
Load and process mask inversion data. :param synthetic: If True, skip loading mask inversion data.
- Raises:
FileNotFoundErrorPers – If mask inversion file is not found
- read_wlen_sp(synthetic) None[source]¶
Read and process wavelength data.
- Parameters:
synthetic – If True, skip some loading wavelength data.
- Raises:
FileNotFoundErrorPers – If wavelength file is not found
- sigma_spectra_calc(simulation=False, synthetic=False)[source]¶
Calculate sigma (uncertainty) arrays for the spectral data.
- Parameters:
simulation – If True, use simulation-specific error handling.
synthetic – If True, skip calculation entirely.
- smooth_management(synthetic) None[source]¶
Load smoothing parameters from either smooth_file.pkl or temp_params_tell.pkl. :param synthetic: If True, skip loading smoothing parameters.
- Raises:
FileNotFoundErrorPers – If smoothing parameter file is not found