antaress.ANTARESS_corrections.ANTARESS_tellurics module#

corr_tell(gen_dic, data_inst, inst, data_dic, data_prop, coord_dic, plot_dic)[source]#

Main telluric correction routine.

Initializes and runs the selected telluric correction.

Parameters:

TBD

Returns:

TBD

corr_tell_vis(iexp_group, airmass_group, IWV_airmass_group, temp_group, press_group, BERV_specdopshift_group, star_specdopshift_group, proc_DI_data_paths, iexp_corr_list, inst, vis, tell_range_corr, iord_corr_list, calc_tell_mode, fixed_args, tell_mol_dic, sp_frame, resamp_mode, dim_exp, tell_CCF, tell_prop, proc_DI_data_paths_new, mean_gcal_DI_data_paths, tell_depth_thresh, tell_width_thresh)[source]#

Telluric correction per visit.

Applies the chosen telluric correction in a given visit.

Parameters:

TBD

Returns:

None

Run_ATC(airmass_exp, IWV_airmass_exp, temp_exp, press_exp, BERV_specdopshift_exp, star_specdopshift_exp, edge_bins, cen_bins, flux_exp, cov_exp, cond_def_exp, mean_gcal_exp, inst, tell_mol_dic, sp_frame, resamp_mode, dim_exp, iord_corr_exp, tell_CCF, tell_prop, fixed_args, tell_depth_thresh, tell_width_thresh)[source]#

ATC function.

Adaptation of the Automatic Telluric Correction routine by R. Allart.

Parameters:

TBD

Returns:

TBD

init_single_mol(params, molec, temp_exp, tell_mol_dic, IWV_airmass_exp, press_exp, airmass_exp, fixed_args, tell_prop)[source]#

Fit initialization : single molecule.

Initializes fitted property for a single molecule.

Parameters:

TBD

Returns:

TBD

voigt_em(x, HWHM=0.5, gamma=1.0, center=0.0)[source]#

Emission Voigt.

Returns Voigt profile in emission.

Parameters:
  • x (array) – Spectral table over which Voigt is computed.

  • HWHM (float) – HWHM of the Voigt.

  • gamma (float) – Damping coefficient of the Voigt.

  • center (float) – Central value of the Voigt over x.

Returns:

V (array) – Voigt profile.

HR_tell_grid(cen_bins_ord, edge_bins_ord, R_mod)[source]#

Telluric model grid.

Returns high-resolution spectral grid for telluric model

Parameters:

TBD

Returns:

TBD

open_resolution_map(instrument, time_science, ins_mod, bin_x)[source]#

Retrieve static resolution map.

The map depends on the instrumental mode of the science frame and on the epoch where it was acquired ==> technical intervention

Adapted from the ATC code (author: R. Allart)

Parameters:

TBD

Returns:

resolution_map (2D array) – Resolution map per order and pixel.

init_tell_molec(tell_species, params, range_mol_prop, qt_molec, M_mol_molec, c2)[source]#

Molecule initialization.

Initializes molecule line properties.

Adapted from the ATC code (author: R. Allart)

Parameters:

TBD

Returns:

TBD

calc_tell_model(tell_species, range_mol_prop, nu_sel_min, nu_sel_max, intensity_scaled_dic, nu_scaled_dic, params, Nx_molec, hwhm_scaled_dic, nu_mod, nbins_mod, edge_mod, tell_depth_thresh, tell_width_thresh, find_deep_tell=False)[source]#

Telluric model.

Calculates model telluric spectrum.

Adapted from the ATC code (author: R. Allart)

Parameters:

TBD

Returns:

telluric_spectrum (1D array) – Model telluric spectrum.

var_convol_tell_sp_slow(telluric_spectrum, nbins, nbins_mod, cen_bins, cen_bins_mod, resolution_map_ord, dwav_mod, nedge_mod)[source]#

Convolution of telluric spectrum (slow approach).

Adapted from the ATC code (author: R. Allart)

Parameters:

TBD

Returns:

telluric_spectrum_conv (1D array) – Convolved telluric spectrum.

var_convol_tell_sp(telluric_spectrum, edge_bins_ord, edge_bins_mod, resolution_map_ord, nbins_mod, cen_bins_mod)[source]#

Convolution of telluric spectrum (fast approach).

Adapted from a code by E. Artigau

Parameters:

TBD

Returns:

telluric_spectrum_conv (1D array) – Convolved telluric spectrum.

FIT_CCF_telluric_model(param, velccf, args=None)[source]#

Main minimization function for CCF telluric model.

Calculates the merit factor of the telluric fit.

Parameters:
  • param (Parameter) – input parameters

  • velccf (1D array) – rv table

  • args (dict) – optional parameters

Returns:

chi (1D array) – Table of \(\chi\) values.

CCF_telluric_model(params_in, velccf, args=None)[source]#

Telluric CCF function.

Calculates telluric CCF and associated covariance matrix from measured and model spectra.

Adapted from the ATC code (author: R. Allart)

Parameters:
  • param (Parameter) – input parameters

  • velccf (1D array) – rv table

  • args (dict) – optional parameters

Returns:
  • ccf_uncorr_master (1D array) – telluric CCF of original spectrum

  • cov_uncorr (ndarray) – covariance matrix of ccf_uncorr_master

  • ccf_model_conv_master (1D array) – telluric CCF of model spectrum

  • ccf_corr_master (ndarray) – telluric CCF of corrected spectrum

full_telluric_model(flux_exp, cov_exp, args, params, tell_mol_dic, range_mol_prop, qt_molec, M_mol_molec, N_x_molecules, resolution_map, inst, resamp_mode, dim_exp, tell_depth_thresh, tell_width_thresh, iord_corr_exp)[source]#

Telluric spectrum function.

Calculates telluric spectral model over full spectral range and uses it to correct measured spectrum.

Adapted from the ATC code (author: R. Allart)

Parameters:

TBD

Returns:
  • tell_spec_exp (nord,nspec array) – model telluric spectrum

  • corr_flux_exp (nord,nspec array) – corrected measured spectrum

  • corr_cov_exp (nord,nspec array) – covariance matrix of corr_flux_exp