antaress.ANTARESS_analysis.ANTARESS_model_prof module#
- gen_fit_prof(param_in, x_tab, args=None)[source]#
Generic profile fit function
Function called by minimization algorithms, returning the chosen model profile after applyying (if requested) convolution, spectral conversion and resampling.
The profile model function must return several arguments (or a list of one) with the model as first argument. The profile is calculated over a continuous table to allow for convolution and use of covariance matrix (fitted pixels are accounted for directly in the minimization routine).
- Parameters:
TBD
- Returns:
TBD
- dispatch_func_prof(func_name)[source]#
Line profile model dispatching
Returns the chosen line profile function.
- Parameters:
func_name (str) – name of the chosen function
- Returns:
func (function) – chosen function
- voigt(param, x, args=None)[source]#
Line model: Voigt
Calculates Voigt profile, expressed in terms of the Faddeeva function (factorless)
\[V(rv) = Real(w(x))\]As a function of
\[\begin{split}x &= ((rv-rv_0) + i \gamma)/(\sqrt{2} \sigma) \\ &= (rv-rv_0)/(\sqrt{2} \sigma) + i a \\ &= 2 \sqrt{\ln{2}} (rv-rv_0)/\mathrm{FWHM}_\mathrm{gauss} + i a\end{split}\]Where a is the damping coefficient
\[\begin{split}a &= \gamma/(\sqrt{2} \sigma) \\ &= 2 \gamma \sqrt{\ln{2}}/\mathrm{FWHM}_\mathrm{gauss} \\ &= \sqrt{\ln{2}} \mathrm{FWHM}_\mathrm{lor}/\mathrm{FWHM}_\mathrm{gauss}\end{split}\]The \(\mathrm{FWHM}_\mathrm{gauss}\) parameter is that of the Gaussian component (factorless)
\[\begin{split}G(rv) &= \exp(- (rv-rv_0)^2/ ( \mathrm{FWHM}_\mathrm{gauss}/(2 \sqrt{\ln{2}}) )^2 ) \\ &= \exp(- (rv-rv_0)^2/ 2 ( \mathrm{FWHM}_\mathrm{gauss}/(2 \sqrt{2 \ln{2}}) )^2 ) \\ &= \exp(- (rv-rv_0)^2/ 2 \sigma^2 )\end{split}\]With \(\sigma = \mathrm{FWHM}_\mathrm{gauss}/(2 \sqrt{\ln{2}})\) and \(\mathrm{FWHM}_\mathrm{lor} = 2 \gamma\)
The full-width at half maximum of the Voigt profile approximates as
\[\mathrm{FWHM}_\mathrm{voigt} = 0.5436 \mathrm{FWHM}_\mathrm{lor}+ \sqrt{0.2166 \mathrm{FWHM}_\mathrm{lor}^2 + \mathrm{FWHM}_\mathrm{gauss}^2}\]From J.J.Olivero and R.L. Longbothum in Empirical fits to the Voigt line width: A brief review, JQSRT 17, P233
- Parameters:
TBD
- Returns:
TBD
- gauss_intr_prof(param, rv_tab, args=None)[source]#
Line model: Gaussian
Calculates Gaussian profile.
- Parameters:
TBD
- Returns:
TBD
- gauss_herm_lin(param, x, args=None)[source]#
Line model: Skewed Gaussian
Calculates Gaussian profile with hermitian polynom term for skewness/kurtosis.
- Parameters:
TBD
- Returns:
TBD
- gauss_poly(param, RV, args=None)[source]#
Line model: Sidelobed Gaussian
Calculates Gaussian profile with flat continuum and polynomial for sidelobes.
- Parameters:
TBD
- Returns:
TBD
- dgauss(param, rv_tab, args=None)[source]#
Line model: Double Gaussian
Calculates Double-Gaussian profile, with Gaussian in absorption co-added with a Gaussian in emission at the core.
The Gaussian profiles are centered but their amplitude and width can be fixed or independant. The model is defined as
\[\begin{split}F &= F_\mathrm{cont} + A_\mathrm{core} \exp(f_1) + A_\mathrm{lobe} \exp(f_2) \\ F &= F_\mathrm{cont} + A_\mathrm{core} ( \exp(f_1) - A_\mathrm{l2c} \exp(f_2) )\end{split}\]We define a contrast parameter as the relative flux between the continuum and the CCF minimum
\[\begin{split}C &= (F_\mathrm{cont} - (F_\mathrm{cont} + A_\mathrm{core} - A_\mathrm{core} A_\mathrm{l2c}) ) / F_\mathrm{cont} \\ C &= -A_\mathrm{core} ( 1 - A_\mathrm{l2c}) / F_\mathrm{cont} \\ A_\mathrm{core} &= -C F_\mathrm{cont}/( 1 - A_\mathrm{l2c}) \\ A_\mathrm{lobe} &= -A_\mathrm{l2c} A_\mathrm{core} = A_\mathrm{l2c} C F_\mathrm{cont}/( 1 - A_\mathrm{l2c})\end{split}\]Thus the model can be expressed as
\[\begin{split}F &= F_\mathrm{cont} - C F_\mathrm{cont} ( \exp(f_1) - A_\mathrm{l2c} \exp(f_2) )/( 1 - A_\mathrm{l2c}) \\ F &= F_\mathrm{cont} ( 1 - C ( \exp(f_1) - A_\mathrm{l2c} \exp(f_2) )/( 1 - A_\mathrm{l2c}) )\end{split}\]- Parameters:
TBD
- Returns:
TBD
- pol_cont(cen_bins_ref, args, param)[source]#
Line polynomial continuum
Calculates polynomial modulated around 1.
- Parameters:
TBD
- Returns:
TBD
- calc_macro_ker_rt(rv_mac_kernel, param, cos_th, sin_th)[source]#
Macroturbulence broadening: anisotropic Gaussian
Calculates broadening kernel for local macroturbulence, based on formulation with anisotropic gaussian (Takeda & UeNo 2017)
- Parameters:
TBD
- Returns:
TBD
- calc_macro_ker_anigauss(rv_mac_kernel, param, cos_th, sin_th)[source]#
Macroturbulence broadening: radial-tangential
Calculates broadening kernel for local macroturbulence, based on radial-tangential model (Gray 1975, 2005)
- Parameters:
TBD
- Returns:
TBD
- calc_linevar_coord_grid(dim, grid)[source]#
Line profile coordinate dispatching
Returns the relevant coordinate for calculation of line properties variations.
- Parameters:
TBD
- Returns:
TBD
- calc_polymodu(pol_mode, coeff_pol, x_val)[source]#
Line profile coordinate models
Calculates absolute or modulated polynomial
The list of polynomial coefficient ‘coeff_pol’ has been defined in increasing powers, as expected by Polynomial, using input coefficient defined through their power value (see polycoeff_def())
- Parameters:
TBD
- Returns:
TBD
- polycoeff_def(param, coeff_ord2name_polpar)[source]#
Line profile coordinate coefficients
Defines polynomial coefficients from the Parameter() format through their power value
- Parameters:
TBD
- Returns:
TBD
- calc_biss(Fnorm_in, RV_tab_in, RV_min, max_rv_range, dF_grid, resamp_mode, Cspan)[source]#
Bissector.
Calculates bissector for a line profile provided in RV space as input.
- Parameters:
TBD
- Returns:
TBD
- gauss_intr_prop(ctrst_intr, FWHM_intr, FWHM_inst)[source]#
Intrinsic > Measured Gaussian properties.
Estimates the FWHM and contrast of a measured-like Gaussian profile, defined as the convolution of a Gaussian intrinsic model profile and a Gaussian instrumental response.
The FWHM can be expressed as
\[\begin{split}\mathrm{FWHM} &= \sqrt{\mathrm{FWHM}_\mathrm{intr}^2 + \mathrm{FWHM}_\mathrm{inst}^2 } \\ \mathrm{with}\,\sigma &= \frac{\mathrm{FWHM}}{2 \sqrt{\ln{2}}} = \sqrt{\sigma_\mathrm{intr}^2 + \sigma_\mathrm{inst}^2 }\end{split}\]The area of the measured convolution profile is equal to the product of the area of the intrinsic and instrumental convolved profiles, providing an analytical expression for the contrast. The instrumental kernel, with area = 1, is expressed as
\[\begin{split}f_\mathrm{kern}(rv) &= \frac{1}{\sqrt{2 \pi} \sigma_\mathrm{inst} } \exp^{ -\frac{rv^2}{2 \sigma_\mathrm{inst}^2} } \\ \mathrm{where}\,\sigma_\mathrm{inst} &= \frac{\mathrm{FWHM}_\mathrm{inst}}{ 2 \sqrt{2 \log{2}} }\end{split}\]The intrinsic profile, with area = \(\mathrm{A}_\mathrm{intr}\), is expressed as
\[\begin{split}f_\mathrm{intr}(rv) &= \frac{\mathrm{A}_\mathrm{intr}}{\sqrt{2 \pi} \sigma_\mathrm{intr} } \exp^{ -\frac{rv^2}{2 \sigma_\mathrm{intr}^2} } \\ \mathrm{where}\,\sigma_\mathrm{intr} &= \frac{\mathrm{FWHM}_\mathrm{intr}}{ 2 \sqrt{2 \ln{2}} }\end{split}\]The contrast C of the measured profile relates to its area A as
\[\begin{split}C &= \frac{A}{\sqrt{2 \pi} \sigma } \\ &= \frac{1 \times \mathrm{A}_\mathrm{intr} }{ \sqrt{2 \pi (\sigma_\mathrm{intr}^2 + \sigma_\mathrm{inst}^2 ) }} \\ &= \frac{\mathrm{C}_\mathrm{intr} \sqrt{2 \pi} \sigma_\mathrm{intr} }{\sqrt{2 \pi (\sigma_\mathrm{intr}^2 + \sigma_\mathrm{inst}^2 ) }} \\ &= \frac{\mathrm{C}_\mathrm{intr} \sigma_\mathrm{intr} }{\sqrt{\sigma_\mathrm{intr}^2 + \sigma_\mathrm{inst}^2}} \\ &= \frac{\mathrm{C}_\mathrm{intr} \mathrm{FWHM}_\mathrm{intr} }{\sqrt{\mathrm{FWHM}_\mathrm{intr}^2 + \mathrm{FWHM}_\mathrm{inst}^2}}\end{split}\]This is only valid for analytical profiles. For numerical profiles, the model is the sum of intrinsic profiles over the planet-occulted surface that may have non-Gaussian shape, and which are further broadened by the local surface rv field. In that case, use cust_mod_true_prop().
- Parameters:
TBD
- Returns:
TBD
- cust_mod_true_prop(param, velccf_HR, args)[source]#
Intrinsic > Measured line properties.
Estimates the FWHM and contrast of a measured-like line profile with custom shape. This is done numerically, calculating the model profile at high resolution.
Contrast is counted from the estimated continuum. For double-gaussian profiles, the peaks of the lobes are considered as the closest estimate to the true stellar continuum.
FWHM is calculated by finding the points on the blue side at half-maximum, and on the red side.
- Parameters:
TBD
- Returns:
TBD
- proc_cust_mod_true_prop(merged_chain_proc, args, param_loc)[source]#
Wrap-up of cust_mod_true_prop().
Estimates the FWHM and contrast of a measured-like line profile with custom shape, for a sample of properties.
- Parameters:
TBD
- Returns:
TBD
- para_cust_mod_true_prop(func_input, nthreads, n_elem, y_inputs, common_args)[source]#
Multithreading routine for proc_cust_mod_true_prop().
- 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:
y_output (None or specific to func_input) – function outputs