antaress.ANTARESS_conversions.ANTARESS_conv module#
- init_conversion(data_type_gen, gen_dic, prop_dic, inst, vis, mode, dir_save, data_dic)[source]#
Initialization for conversion routines.
Initializes various parameters for conversion into CCF or S1D spectra.
- Parameters:
TBD
- Returns:
None
- CCF_from_spec(data_type_gen, inst, vis, data_dic, gen_dic, prop_dic)[source]#
Wrap-up function to compute CCFs
Prepares spectral time-series for conversion into CCF, calling new_compute_CCF()
- Parameters:
TDB
- Returns:
None
- DI_CCF_from_spec(inst, vis, data_dic, gen_dic)[source]#
CCF conversion: DI
Wrap-up for conversion of disk-integrated spectra into CCFs.
- Parameters:
TDB
- Returns:
None
- DiffIntr_CCF_from_spec(data_type_gen, inst, vis, data_dic, gen_dic)[source]#
CCF conversion: Diff, Intr
Wrap-up for conversion of (out-of-transit) differential and intrinsic spectra into CCFs.
- Parameters:
TDB
- Returns:
None
- Atm_CCF_from_spec(inst, vis, data_dic, gen_dic)[source]#
CCF conversion: Atm
Wrap-up for conversion of atmospheric spectra into CCFs.
- Parameters:
TDB
- Returns:
None
- check_CCF_mask_lines(n_exp, edge_wav_all, cond_def_all, wav_mask, edge_velccf)[source]#
CCF mask lines
Identifies mask lines that should be used to compute CCFs. We keep lines for which the CCF RV table (once converted into wavelength space):
is fully within the spectral range of the input spectrum
contains no nan from the input spectrum
The check is made for the time-series of spectra given as input as a whole, as CCFs should be calculated from the same mask lines in all exposures. Tables must have dimension [n_time x n_spec] as input.
- Parameters:
TDB
- Returns:
idx_lines_kept (1D array) – indexes of lines kept in mask.
- new_compute_CCF(edge_wav, flux, cov, resamp_mode, edge_velccf, wght_mask, wav_mask, nthreads, cal=None)[source]#
Main routine to compute CCF
Calculates CCFs from input spectra, propagating covariance matrix
- Parameters:
TDB
- Returns:
None
- sub_new_compute_CCF(edge_mask, wght_mask, n_RV, edge_wav, flux, cov, cal, resamp_mode)[source]#
CCF computation
- Parameters:
TDB
- Returns:
None
- multithread_new_compute_CCF(func_input, nthreads, n_elem, y_inputs, common_args)[source]#
Multithreading of sub_new_compute_CCF().
Specific implementation of MAIN_multithread()
- Parameters:
func_input (function) – multi-threaded function
nthreads (int) – number of threads
n_elem (int) – number of elements to thread
y_inputs (list) – threadable function inputs
common_args (tuple) – common function inputs
- Returns:
TBD
- conv_2D_to_1D_spec(data_type_gen, inst, vis, gen_dic, data_dic, prop_dic, coord_dic)[source]#
Wrap-up function to compute 1D spectra.
Runs ANTARESS with default or manual settings.
- Parameters:
TBD
- Returns:
None
- conv_2D_to_1D_exp(iexp_conv, data_type_gen, data_type, resamp_mode, dir_save, cen_bins_1D, edge_bins_1D, nspec_1D, nord, ifirst, proc_com_data_paths, idx_in2exp, cov_loc_star, proc_data_paths, tell_data_paths, scaled_data_paths, sing_gcal_data_paths, DImast_weight_data_paths, LocEst_Atm_data_paths, inst, vis, gen_corr_Fbal, gen_corr_Fbal_ord, save_data_dir, gen_type, data_mode, dim_exp, idx_exp2in, idx_in, type2var, dt_all, comm_sp_tab, sequence, calc_cond, cond_sdet2)[source]#
Main routine to convert 2D spectra into 1D spectra
- Calculates 1D spectra from 2D spectra, propagating covariance matrix
2D spectra are resampled over the common table and coadded
spectral values from different orders have to be equivalent at a given wavelength
conversion is applied to the latest processed data of each type
converted data is saved independently, but used as default data in all modules following the conversion
- Parameters:
TDB
- Returns:
None