antaress.ANTARESS_corrections.ANTARESS_interferences module#
- MAIN_corr_wig(inst, gen_dic, data_dic, coord_dic, data_prop, plot_dic, system_param)[source]#
Main wiggle correction routine.
Determines and applies correction for ESPRESSO wiggles
Wiggles are processed in wave_number space. We use \(\nu_\mathrm{ana} = c[km s^{-1}]/w[A]\) because it is on the order of 10, with \(\nu[s^{-1}] = 10^{13} \nu_\mathrm{ana}\). For example a wavelength of 4000 A corresponds to \(\nu_\mathrm{ana} = 75 [10^{13} s^{-1}]\) and \(\nu = 7.5 \times 10^{14} [s^{-1}]\) = 750 [Thz].
Periodogram frequencies \(F_{\nu,\mathrm{ana}}\) correspond to wiggle periods
\[\begin{split}P_{\nu}[s^{-1}] &= 10^{13} P_{\nu,\mathrm{ana}} \\ &= 10^{13} / F_{\nu,\mathrm{ana}}\end{split}\]or \(F_{\nu}[s] = 10^{-13} F_{\nu,\mathrm{ana}}\). The corresponding period in wavelength space is
\[\begin{split}P_{w}[A] &= c[A s^{-1}] P_{\nu}[s^{-1}]/\nu[s^{-1}]^2 \\ &= c[A s^{-1}]/(F_{\nu}[s] \nu[s^{-1}]^2) \\ &= 10^{13} c[km s^{-1}]/(10^{-13} F_{\nu,\mathrm{ana}} (10^{13} \nu_\mathrm{ana})^2) \\ &= c[km s^{-1}]/(F_{\nu,\mathrm{ana}} \nu_\mathrm{ana}^2) \\ &= w[A]^2/(F_{\nu,\mathrm{ana}} c[km s^{-1}])\end{split}\]at this stage spectra can be written as (see rescale_profiles())
\[F_\mathrm{corr}(w,t,v) = F_{\star}(w,v) C_\mathrm{ref}(w,v) L(t) W(w,t,v)\]where W(w,t) represents the wiggles and we can ignore \(C_\mathrm{ref}(w,v)\) and L(t) as they will be removed when normalizing \(F_\mathrm{corr}(w,t,v)\) by the visit master
The approach is the same as with the flux balance module: spectra are first scaled back to count units and binned to smooth out noise, with a bin size short enough that it does not dilute the wiggles. When spectra are shifted into the star rest frame their calibration profile is shifted as well, so that a given exposure and its master are scaled using the same profile. In this way the contribution from the stellar spectrum and calibration profile is removed when calculating the ratio between the binned exposure and master count spectra, and all low-resolution transmission spectra are comparable, even if they involved calibration profiles shifted to different positions.
- Parameters:
TBD
- Returns:
None
- wig_sp_init(iexp_proc_list, data_vis, coord_vis, gen_dic, calc_EFsc2, rv_al_all, iord_fit_list, data_com, idx_to_bin, iexp2mer, nord, inst, vis, flux_ref, calc_var_ref2, calc_flux_sc_all, nspec_com, idx_to_bin_mer, data_to_bin, data_mast, dim_exp_com)[source]#
Wiggle spectral processing initialization
Retrieves exposures to process and computes master spectrum if relevant
- Parameters:
TBD
- Returns:
TBD
- wig_trans_sp_init(isub_exp, iexp_fit_list, nexp_fit_list, n_in_visit, wig_exp_groups, iexp, n_exp_groups, init_exp, iexp_group_list, wig_exp_group)[source]#
Wiggle transmission spectrum initialization
Initialization for wig_trans_sp()
- Parameters:
TBD
- Returns:
TBD
- wig_trans_sp(trans_spec_group_dic, trans_spec_orig_dic, iexp, iexp2mer, idx_to_bin_mer, cond_exp_proc, wig_indiv_mast, fixed_args, comm_sp_tab, dim_exp, nspec, nord, iord_fit_list, data_mast, gen_dic, data_glob, edge_bins_com, inst, vis, corr_type, dopp_star2earth_all, Fr_bin_fit, iexp_group, iexp_group_next, init_ord, ibin2exp_fit, ibin2ord_fit, wig_exp_groups, cond_exp_proc_vis, broadband_fb)[source]#
Wiggle transmission spectrum
Computes measured transmission spectrum for wiggle analysis
- Parameters:
TBD
- Returns:
TBD
- apply_corr_wig(corr_type, data_corr, fixed_args, dic_plot, inst, vis, gen_dic, tel_coord_vis, data_inst, nexp_fit_list, BERV_list, n_expgroup, model_dic, data_vis, iexp_fit_list)[source]#
Wiggle correction routine
Applies requested wiggle correction
- Parameters:
TBD
- Returns:
TBD
- def_wig_tab(min_nu, max_nu, dnu)[source]#
Wiggle table definition
Defines wiggle table in \(\nu\) space
- Parameters:
min_nu (float) – Start value of the table in \(\nu\).
max_nu (float) – End value of the table in \(\nu\).
dnu (float) – Resolution of the table in \(\nu\).
- Returns:
n_nu (float) – Number of table values.
nu_tab (1D array) – \(\nu\) table.
- wig_mod_cst(params, x_in, args=None)[source]#
Flat wiggle model
Defines wiggle model with constant value.
- Parameters:
TBD
- Returns:
TBD
- wig_def_sampbands(comp_id, nu, shift_off, args, freq_params_samp, deg_Freq_comp)[source]#
Wiggle sampling bands
Defines sampling bands of the wiggles.
sampling size is based on the period component
the shift to oversample is applied to the starting wavelength, so that the sampling width remains correctly adjusted with wavelength
- Parameters:
TBD
- Returns:
TBD
- wig_perio_sampling(comp_id_samp_max, icomp, comp_id_samp, comp_id_proc, plot_samp, samp_fit_dic, shift_off, ishift_comp, ishift, comp_id, nu_in, flux_in, var_in, count, fixed_args_loc, nu_amp, src_perio_comp, comp_freqfixed, pref_names, suf_names, fix_freq2perio, fit_results, path_sampling_plot, freq_params_samp, fixed_args, fit_dic_gen, max_ncomp, x_range_in, y_range_in)[source]#
Wiggle sampling
Main routine to sample wiggle properties chromatically
- Parameters:
TBD
- Returns:
TBD