antaress.ANTARESS_grids.ANTARESS_occ_grid module#

calc_tr_lc(gen_dic, transit_prop, system_param, inst, vis, data_dic, plot_dic, coord_dic, theo_dic, ar_dic={}, txt_shift='')[source]#

Planet-occulted / active region properties: light curves

Calls function to calculate transit light curves.

Parameters:

TBD

Returns:

TBD

calc_plocc_ar_prop(system_param, gen_dic, theo_dic, coord_dic, inst, vis, data_dic, calc_pl_atm=False, ar_dic={}, txt_shift='')[source]#

Planet-occulted / active region properties: workflow

Calls function to calculate theoretical properties of the regions occulted by all transiting planets and/or active regions.

Parameters:

TBD

Returns:

TBD

up_plocc_arocc_prop(system_param_loc, system_ar_prop_achrom, system_prop_achrom, grid_dic, inst, vis, fixed_args, param_in, studied_pl, ph_grid, coord_grid, studied_ar=[])[source]#

Planet-occulted and active region properties: update

Updates properties of the planet-occulted region, planetary orbit, and active regions for fitted step.

Parameters:
  • system_param_loc (dict)

  • system_ar_prop_achrom (dict)

  • system_prop_achrom (dict)

  • grid_dic (dict) – Dictionary containing stellar grid properties, which can be modified within the function.

  • inst (str) – Instrument considered.

  • vis (str) – Visit considered.

  • fixed_args (dict) – Additional parameters needed to evaluate the fitted function, which are not modified within the function.

  • param_in (dict) – Model parameters for the fitted step considered.

  • studied_pl (list) – Transiting planets for the instrument and visit considered.

  • ph_grid (dict) – Dictionary containing the phase of each planet.

  • coord_grid (dict) – Dictionary containing the various coordinates of each planet and active region (e.g., exposure time, exposure x/y/z coordinate).

  • studied_ar (list) – Visible active regions present for the instrument and visit considered.

Returns:
  • system_param_loc (dict) – System (star+planet+active regions) properties.

  • coord_pl_ar (dict) – Updated planet and active region coordinates.

  • param (dict) – Model parameter names and values.

sub_calc_plocc_ar_prop(inst, vis, grid_dic, rout_mode, key_chrom, fixed_args, par_list_gen, studied_pl, studied_ar, system_param, theo_dic, star_I_prop_in, params, coord_in, iexp_list, st_prof_grids, coeff_line, system_ar_prop_in={}, out_ranges=False, Ftot_star=False)[source]#

Planet-occulted and active region properties: exposure

Calculates average theoretical properties of the stellar surface occulted by all transiting planets and/or within active regions during an exposure

  • we normalize all quantities by the flux emitted by the occulted regions

  • all positions are in units of \(R_\star\)

Parameters:
  • rout_mode (str) – type of profile or properties processed by the function

  • key_chrom (list) – chromatic modes used (either chromatic, ‘chrom’, achromatic, ‘achrom’, or both).

  • fixed_args (dict) – parameters used to generate analytical profiles, which are not modified by the function.

  • par_list_gen (list) – parameters whose value we want to calculate over each planet-occulted/active region.

  • studied_pl (list) – list of transiting planets in the exposures considered.

  • studied_ar (list) – list of visible active regions in the exposures considered.

  • system_param (dict) – system (star + planet + active region) properties.

  • theo_dic (dict) – parameters used to generate and describe the stellar grid and planet-occulted/active regions grid.

  • star_I_prop_in (dict) – stellar intensity properties.

  • params (dict) – Fixed/variable user parameters.

  • coord_in (dict) – dictionary containing the various coordinates of each planet and active region (e.g., exposure time, exposure phase, exposure x/y/z coordinate)

  • iexp_list (list) – exposures to process.

  • system_ar_prop_in (dict) – optional, active region limb-darkening properties.

  • out_ranges (bool) – optional, whether or not to calculate the range of values the parameters of interest (par_list_gen) will take. Turned off by default.

  • Ftot_star (bool) – optional, whether or not to calculate the normalized stellar flux after accounting for the active region/planet occultations. Turned off by default.

  • st_prof_grids (dict) – spectral grids and associated properties

Returns:
  • surf_prop_dic_pl (dict) – average value of all the properties of interest over all the planet-occulted regions, in each exposure and chromatic mode considered.

  • surf_prop_dic_ar (dict) – average value of all the properties of interest over all the active regions, in each exposure and chromatic mode considered.

  • surf_prop_dic_common (dict) – average value of all the properties of interest considering the contributions from both the planet-occulted and active regions, in each exposure and chromatic mode considered.

calc_mean_occ_region_prop(occulters, surf_prop_dic, n_osamp_exp_eff, sum_prop_dic, key_chrom, par_list, isub_exp, i_in, out_ranges, range_par_list, range_dic, cond_fit)[source]#

Occulted region: average properties

Calculates the properties from the cumulated stellar surface regions occulted during an exposure.

Parameters:

TBD

Returns:

TBD

calc_mean_occ_region_line(precision, star_I_prop, i_in, key_chrom, n_osamp_exp_eff, Focc_star, surf_prop_dic, occ_in_exp, fixed_args, star_params, theo_dic, inst, st_prof_grids, linevar_par_vis)[source]#

Occulted region: average line

Calculates the line profile from the cumulated stellar surface regions occulted during an exposure.

Parameters:
  • TBD

  • fixed_args (dict) – parameters that are not modified by the function.

  • st_prof_grids (dict) – spectral grids and associated properties

Returns:

TBD

calc_occ_region_prop(grid_dic, star_params, line_occ_HP_band, cond_occ, iband, fixed_args, star_I_prop, system_ar_prop, idx, pl_loc, pl_proc_band, Ssub_Sstar, x_st_sky_max, y_st_sky_max, cond_in_RpRs, par_list, Istar_norm_band, x_pos_pl, y_pos_pl, lambda_rad_pl, params, sum_prop_dic_pl, coord_reg_dic_pl, range_reg, range_par_list, Focc_star_band, cb_band, theo_dic, inst, st_prof_grids, Focc_corr, linevar_par_vis, coeff_line, ar_occ=False, reduced_ar_prop={})[source]#

Occulted region: properties

Calculates the average and summed properties from a planet-occulted stellar surface region during an exposure.

Parameters:
  • star_params (dict) – stellar parameters (nominal/overwritten with variable input parameters)

  • line_occ_HP_band (str) – The precision with which to process the exposure.

  • cond_occ (bool) – Boolean telling us whether there is an occultation by at least one planet in the oversampled exposure considered.

  • iband (int) – Index of the band of interest.

  • star_I_prop (dict) – Stellar intensity properties.

  • system_ar_prop (dict) – Active region limb-darkening properties.

  • idx (int) – Index of the oversampled exposure considered.

  • pl_loc (str) – Planet considered.

  • pl_proc_band (dict) – Dictionary telling us which planets have been processed in the chromatic mode and band considered.

  • Ssub_Sstar (float) – Surface ratio of a planet-occulted region grid cell to a stellar grid cell.

  • x_st_sky_max (array) – x coordinates of the maximum square planet-occulted region grid.

  • x_st_sky_max – y coordinates of the maximum square planet-occulted region grid.

  • cond_in_RpRs (array) – Booleans telling us which cells in the maximum square planet-occulted region grid are within the circular planet-occulted region.

  • par_list (list) – List of parameters of interest, whose value in sum_prop_dic_pl will be updated.

  • Istar_norm_band (float) – total intensity of the star in the band considered.

  • x_pos_pl (float) – x coordinate of the planet in the sky-projected orbital frame.

  • y_pos_pl (float) – y coordinate of the planet in the sky-projected orbital frame.

  • lambda_rad_pl (float) – Spin-orbit angle of the planet.

  • params (dict) – Fixed/variable user parameters.

  • sum_prop_dic_pl (dict) – dictionary containing the value of all parameters of interest (par_list), summed over the planet-occulted region in the exposure considered, and for the band of interest.

  • coord_reg_dic_pl (dict) – dictionary containing the value of all parameters of interest (par_list), averaged over the planet-occulted region in the exposure considered, and for the band of interest.

  • range_reg (dict) – dictionary containing the range of average values the parameters of interest (range_par_list) can take during this exposure.

  • range_par_list (list) – list of parameters of interest, whose range of values, stored in range_reg_dic_ar, will be updated.

  • Focc_star_band (float) – total flux occulted by the active region in the exposure and band considered.

  • cb_band (list) – Polynomial coefficients used to compute thr RV component of the planet-occulted region due to convective blueshift.

  • theo_dic (dict) – parameters used to generate and describe the stellar grid and planet-occulted regions grid.

  • ar_occ (bool) – Optional, whether active regions are present in the oversampled exposure considered. Default is False.

  • reduced_ar_prop (dict) – Optional, active region properties used to account for the possible presence of active region cells in the planet-occulted region. Default is an empty dictionary.

  • st_prof_grids (dict) – spectral grids and associated properties

Returns:
  • Focc_star_band (float) – the input Focc_star_band updated with the flux occulted by the planet considered.

  • cond_occ (bool) – updated version of the input cond_occ. Tells us whether or not the planet occulted the exposure considered.

sum_region_prop(star_params, line_occ_HP_band, iband, fixed_args, par_list, Fsurf_grid_band, Fsurf_grid_emit_band, coord_grid, Ssub_Sstar, cb_band, range_par_list, range_reg, sum_prop_dic, coord_reg_dic, params, lambda_rad_pl_loc, ar_contrast, inst, st_prof_grids, linevar_par_vis, coeff_line, corr_nsub_ov_ar, grid_dic, gen_ar_flag_map, corr_Fstar_grid_ar, corr_Far_grid)[source]#

Planet-occulted or active region properties: calculations

Calculates the average and summed properties from a local (planet-occulted or active) stellar surface region during an exposure.

The flux emitted by a local element writes

\[dF[\nu] = I[\nu](\cos{\theta}) dA \, \vec{N}(dA).\vec{N}(\mathrm{LOS})\]

with \(dF[\nu]\) emitted in the direction \(\vec{N}(\mathrm{LOS})\) of the LOS, \(dA = R_\mathrm{\star}^2 \sin{\theta} d\theta d\phi\) the spherical surface element at the surface of the star, and \(\vec{N}(dA)\) its normal. By definition \(\vec{N}(dA).\vec{N}(\mathrm{LOS}) = \cos{\theta} = \mu\) so that

\[dF[\nu] = I[\nu](\cos{\theta}) R_\mathrm{\star}^2 \sin{\theta} d\theta d\phi \cos{\theta}\]

Which can also write, with \(dS = dx dy = dA \cos{\theta}\) the projection of dA onto the plane of sky (where XY is the plane perpendicular to the LOS (Z))

\[dF[\nu] = I[\nu](\cos{\theta}) dS[\theta]\]

Here the fluxes are normalized by the stellar surface, ie \(dS[\theta] = d_\mathrm{grid}^2/(\pi R_\mathrm{\star}^2)\), since \(d_\mathrm{grid}\) is defined in units of \(R_\mathrm{\star}\). The total flux emitted by the star in the direction of the LOS is then, with \(\mu = \cos(\theta)\) and \(d\mu = -\sin{\theta} d\theta\)

\[\begin{split}F_\mathrm{\star}[\nu] &= ( \int_{\phi = 0}^{2 \pi} \int_{\theta = 0}^{\pi / 2} I[\nu](\cos{\theta}) \sin{\theta} d\theta d\phi \cos{\theta} )/\pi \\ &= 2 \int_{\mu = 0}^{1} I[\nu](\mu) \mu d\mu \\ &= 2 I_0[\nu] \int_{\mu = 0}^{1} \mathrm{LD}(\mu) \mu d\mu \\ &= 2 I_0[\nu] \mathrm{Int}_0\end{split}\]

If there is no limb-darkening then \(\mathrm{Int}_0 = 1/2\) and \(F_\mathrm{\star}[\nu] = I_0[\nu]\)

In the non-oversampled case

  • we add the values, even if each index is only updated once, so that the subroutine can be used directly with oversampling

  • all tables have been initialized to 0

In the oversampled case

  • average values are co-added over regions oversampling the total region occulted during an exposure. We update values cumulated during an exposure through every passage through the function.

  • the flux emitted by a surface element is

    \[dF(\mu) = I[\nu](\mu) S_\mathrm{sub}/S_\mathrm{\star} = I[\nu](xy) S_\mathrm{sub}/S_\mathrm{\star}\]

    Here we must consider the flux that is emitted by a surface element during the time T it is occulted by the planet

    \[dF_\mathrm{occ}(xy) = dF(xy) T_\mathrm{occ}(xy)\]

    If we assume the planet velocity is constant during the exposure, and it has no latitudinal motion, then

    \[dF_\mathrm{occ}(xy) = dF(xy) d_\mathrm{occ}(xy)/v_\mathrm{pl}\]

    Where \(d_\mathrm{occ}\) is the distance between the planet centers from the first to the last moment it occults the surface element

    \[d_\mathrm{occ}(xy) = \sqrt{ R_\mathrm{p}^2 - y_\mathrm{grid}^2 } = d_\mathrm{occ}(y)\]
  • the weighted mean of a quantity V during an exposure would thus be (where \(xy_\mathrm{grid}\) describes the stellar grid cells occulted during an exposure)

    \[\begin{split}<A> &= \sum_{xy_\mathrm{grid}} V(xy) dF_\mathrm{occ}(xy) / \sum_{xy_\mathrm{grid}} dF_\mathrm{occ}(xy) \\ <A> &= \sum_{xy_\mathrm{grid}} V(xy) I[\nu](xy) S_\mathrm{sub}/S_\mathrm{\star} d_\mathrm{occ}(y)/v_\mathrm{pl} / \sum_{xy_\mathrm{grid}} I[\nu](xy) S_\mathrm{sub}/S_\mathrm{\star} d_\mathrm{occ}(y)/v_\mathrm{pl} \\ <A> &= \sum_{xy_\mathrm{grid}} V(xy) I[\nu](xy) d_\mathrm{occ}(y) / \sum_{xy_\mathrm{grid}} I[\nu](xy) d_\mathrm{occ}(y)\end{split}\]
  • instead of discretizing the exact surface occulted by the planet during a full exposure, we place the planet and its grid at consecutive positions during the exposure. Between two consecutive positions separated by d_mathrm{exp}^mathrm{oversamp}, the planet spent a time \(t_\mathrm{exp}^\mathrm{oversamp} = d_\mathrm{exp}^\mathrm{oversamp}/v_\mathrm{pl}\). If a surface element is occulted by the planet during N(xy) consecutive positions, then we can write the total occultation time as

    \[\begin{split}T_\mathrm{occ}(xy) &= N(xy) t_\mathrm{exp}^\mathrm{oversamp} \\ dF_\mathrm{occ}(xy) &= dF(xy) N(xy) d_\mathrm{exp}^\mathrm{oversamp}/v_\mathrm{pl}\end{split}\]

    the weighted mean of a quantity V during an exposure is then

    \[\begin{split}<A> &= \sum_{xy_\mathrm{grid}} V(xy) dF_\mathrm{occ}(xy) / \sum_{xy_\mathrm{grid}} dF_\mathrm{occ}(xy) \\ <A> &= \sum_{xy_\mathrm{grid}} V(xy) (dF(xy) N(xy) d_\mathrm{exp}^\mathrm{oversamp}/v_\mathrm{pl}) / \sum_{xy_\mathrm{grid}} (dF(xy) N(xy) d_\mathrm{exp}^\mathrm{oversamp}/v_\mathrm{pl}) \\ <A> &= \sum_{xy_\mathrm{grid}} V(xy) dF(xy) N(xy) / \sum_{xy_\mathrm{grid}} dF(xy) N(xy)\end{split}\]

    ie that we ‘add’ successively the N(xy) times a given surface element flux was occulted. The normalization factor corresponds to \(F_\mathrm{tot}^\mathrm{oversamp}\). To ensure that this approximation is good, N(xy) must be high enough, ie \(t_\mathrm{exp}^\mathrm{oversamp}\) and \(d_\mathrm{exp}^\mathrm{oversamp}\) small enough

  • note that \(S_\mathrm{sub}/S_\mathrm{\star}\) is normalized by \(R_\mathrm{\star}^2\), since \(d_\mathrm{grid}\) is defined from \(R_\mathrm{p}/R_\mathrm{\star}\)

Parameters:
  • star_params (dict) – stellar parameters (nominal/overwritten with variable input parameters)

  • line_occ_HP_band (str) – The precision with which to process the exposure.

  • iband (int) – Index of the band of interest.

  • args (dict) – Parameters used to generate the intrinsic profiles.

  • par_list (list) – List of parameters of interest, whose value in sum_prop_dic will be updated.

  • Fsurf_grid_band (array) – Stellar flux grid over local region in the band of interest.

  • coord_grid (dict) – Dictionary of coordinates for the local region.

  • Ssub_Sstar (float) – Surface ratio of a local region grid cell to a stellar grid cell.

  • cb_band (list) – Polynomial coefficients used to compute thr RV component of the planet-occulted region due to convective blueshift.

  • range_par_list (list) – List of parameters of interest, whose range of values, stored in range_reg_dic, will be updated.

  • range_reg (dict) – Dictionary containing the range of average values the parameters of interest (range_par_list) can take during this exposure.

  • sum_prop_dic (dict) – Dictionary containing the value of all parameters of interest (par_list), summed over the local region in the exposure considered, and for the band of interest.

  • coord_reg_dic (dict) – Dictionary containing the value of all parameters of interest (par_list), averaged over the local region in the exposure considered, and for the band of interest.

  • params (dict) – Fixed/variable user parameters.

  • lambda_rad_pl_loc (float) – Spin-orbit angle of the planet.

  • ar_contrast (float) – Contrast level of the active region considered.

  • st_prof_grids (dict) – spectral grids and associated properties

Returns:

None

occ_region_grid(RregRs, nsub_Dreg, planet=True)[source]#

Local region grid

Defines a square x/y/z grid enclosing a local region of the stellar surface in the ‘inclined’ star frame, with:

  • X axis is parallel to the star equator

  • Y axis is the projected spin axis

  • Z axis is along the LOS

Parameters:
  • RregRs (float) – the radius of the region in the XY plane. For a planet the projected region keeps a constant radius in the XY plane and its angular aperture increases toward the limbs. For an active region it is the angular aperture that is fixed and the radius of the projection that decreases toward the limb. RregRs is then the sine of the (half) angle defining the chord of the active region, corresponding to the maximum projected radius of the active region as it would be seen at the center of the star, and defines the largest square enclosing the active region.

  • nsub_Dreg (int) – the number of grid cells desired.

  • planet (bool) – Default False. Whether or not to perform additional processing for planet-occulted region grids.

Returns:
  • x_st_sky_grid (1D dict) – The x-coordinates of the grid cells.

  • y_st_sky_grid (1D dict) – The y-coordinates of the grid cells.

  • Ssub_Sstar (float) – The surface of each grid cell.

theo_intr2loc(grid_dic, system_prop, data_type, ncen_bins, edge_bins, cen_bins, nsub_star)[source]#

Intrinsic to local intensity scaling

Returns the scaling values or profiles to scale stellar line profiles from intrinsic to local in each cell.

Intrinsic spectra do not necessarily have the same flux as the disk-integrated profiles, but have been set to the same continuum or total flux (see proc_intr_data() and loc_prof_DI_mast()). Now that the intrinsic and disk-integrated profiles are equivalent in terms of flux we have \(F_\mathrm{intr}(w,t,vis) \sim F_\mathrm{DI}(w,vis)\). This is valid for broadband fluxes or the continuum of CCFs (see rescale_profiles()).

The model disk-integrated profile is defined as

\[\begin{split}F_\mathrm{DI,mod}(w,vis) &= (\sum_{\mathrm{all \, stellar \, cells}} F_\mathrm{intr}(w - w_\mathrm{shift},x,vis) \mathrm{LD}(cell,w) dS ) / A \\ & \sim (\sum_{\mathrm{all \, stellar \, cells}} F_\mathrm{DI}(w - w_\mathrm{shift},vis) \mathrm{LD}(cell,w) dS ) / A\end{split}\]

Where the shift accounts for the stellar surface velocity field. If we neglect these shifts (for spectra) or consider the continuum range (for CCF) then

\[F_\mathrm{DI,mod}(w,vis) \sim F_\mathrm{DI}(w,vis) (\sum_{\mathrm{all \, stellar \, cells}} \mathrm{LD}(cell,w) dS ) / A\]

Where A is a spectrum

\[A(w) = \sum_{\mathrm{all \, stellar \, cells}}(\mathrm{LD}(cell,w) dS )\]

If the line profile is calculated directly within the fit function we store the scaling profiles.

Parameters:

TBD

Returns:

TBD

calc_loc_line_prof(icell, rv_surf_star, Fsurf_cell_spec, flux_loc_cell, mu_cell, fixed_args, star_params, inst, st_prof_grids, input_cell_all)[source]#

Local line profile calculation

Calculates local profile from a given cell of the stellar disk.

Parameters:
  • TBD

  • fixed_args (dict) – parameters that are not modified by the function.

Returns:

TBD

class CFunctionWrapper[source]#

Bases: object

C profile calculation

Defines the C function used in the optimization. The implementation of a class and the getstate and setstate functions is necessary to use the C function when pickling is used in emcee (when multiprocessing is used).

coadd_loc_gauss_prof_with_C(rv_surf_star_grid, ctrst_grid, FWHM_grid, args_cen_bins, Fsurf_grid_spec, args_ncen_bins, Fsurf_grid_spec_shape_0, gauss_grid)[source]#
coadd_loc_voigt_prof_with_C(rv_surf_star_grid, ctrst_grid, FWHM_grid, a_damp_grid, args_cen_bins, Fsurf_grid_spec, args_ncen_bins, Fsurf_grid_spec_shape_0, voigt_grid)[source]#
coadd_loc_dvoigt_prof_with_C(rv_surf_star_grid, ctrst_grid, FWHM_grid, rv_l2c_grid, FWHM_l2c_grid, amp_l2c_grid, args_cen_bins, Fsurf_grid_spec, args_ncen_bins, Fsurf_grid_spec_shape_0, a_damp_c2l_grid, a_damp_grid, dvoigt_grid)[source]#
coadd_loc_dgauss_prof_with_C(rv_surf_star_grid, ctrst_grid, FWHM_grid, rv_l2c_grid, FWHM_l2c_grid, amp_l2c_grid, args_cen_bins, Fsurf_grid_spec, args_ncen_bins, Fsurf_grid_spec_shape_0, dgauss_grid)[source]#
coadd_loc_cgauss_prof_with_C(rv_surf_star_grid, ctrst_grid, FWHM_grid, skew, kurt, args_cen_bins, Fsurf_grid_spec, args_ncen_bins, Fsurf_grid_spec_shape_0, cgauss_grid)[source]#
coadd_loc_pgauss_prof_with_C(rv_surf_star_grid, ctrst_grid, FWHM_grid, polcont__ord4_grid, polcont__ord6_grid, dRV_joint_grid, args_cen_bins, Fsurf_grid_spec, args_ncen_bins, Fsurf_grid_spec_shape_0, pgauss_grid)[source]#
coadd_loc_line_prof(Fsurf_grid_spec, rv_surf_star_grid, icell_list, flux_intr_grid, mu_grid, star_params, fixed_args, inst, st_prof_grids, input_cell_all)[source]#

Local line profile co-addition

Cumulates local profiles from each cell of the stellar disk.

Parameters:

TBD

Returns:

TBD

coadd_loc_OS_prof(Fsurf_grid_spec, rv_surf_star_grid, func_prof, inst, st_prof_grids, input_cell_all)[source]#
coadd_loc_gauss_prof(rv_surf_star_grid, Fsurf_grid_spec, st_prof_grids, input_cell_all)[source]#

Local Gaussian line co-addition

Oversimplified way of cumulating the local profiles from each cell of the stellar disk. This version assumes gaussian line profiles in each cell.

Parameters:

TBD

Returns:

TBD

coadd_loc_voigt_prof(rv_surf_star_grid, Fsurf_grid_spec, st_prof_grids, input_cell_all)[source]#

Local Voigt line co-addition

Oversimplified way of cumulating the local profiles from each cell of the stellar disk. This version assumes voigt line profiles in each cell.

Parameters:

TBD

Returns:

TBD

coadd_loc_dvoigt_prof(rv_surf_star_grid, Fsurf_grid_spec, st_prof_grids, input_cell_all)[source]#

Local double Voigt line co-addition

Oversimplified way of cumulating the local profiles from each cell of the stellar disk. This version assumes double voigt line profiles in each cell.

Parameters:

TBD

Returns:

TBD

coadd_loc_cgauss_prof(rv_surf_star_grid, Fsurf_grid_spec, st_prof_grids, input_cell_all)[source]#

Local skewed Gaussian line co-addition

Oversimplified way of cumulating the local profiles from each cell of the stellar disk. This version assumes skewed gaussian line profiles in each cell.

Parameters:

TBD

Returns:

TBD

coadd_loc_dgauss_prof(rv_surf_star_grid, Fsurf_grid_spec, st_prof_grids, input_cell_all)[source]#

Local double Gaussian line co-addition

Oversimplified way of cumulating the local profiles from each cell of the stellar disk. This version assumes double gaussian line profiles in each cell.

Parameters:

TBD

Returns:

TBD

coadd_loc_pgauss_prof(rv_surf_star_grid, Fsurf_grid_spec, st_prof_grids, input_cell_all)[source]#

Local sidelobed Gaussian line co-addition

Oversimplified way of cumulating the local profiles from each cell of the stellar disk. This version assumes sidelobed gaussian line profiles in each cell.

Parameters:

TBD

Returns:

TBD

use_C_coadd_loc_OS_prof(Fsurf_grid_spec, rv_surf_star_grid, func_prof, inst, st_prof_grids, input_cell_all, c_function_wrapper)[source]#
use_C_coadd_loc_gauss_prof(rv_surf_star_grid, Fsurf_grid_spec, c_function_wrapper, st_prof_grids, input_cell_all)[source]#

C++ local Gaussian line co-addition

C++ implementation of coadd_loc_gauss_prof().

Parameters:

TBD

Returns:

TBD

use_C_coadd_loc_voigt_prof(rv_surf_star_grid, Fsurf_grid_spec, c_function_wrapper, st_prof_grids, input_cell_all)[source]#

C++ local Voigt line co-addition

C++ implementation of coadd_loc_voigt_prof().

Parameters:

TBD

Returns:

TBD

use_C_coadd_loc_dvoigt_prof(rv_surf_star_grid, Fsurf_grid_spec, c_function_wrapper, st_prof_grids, input_cell_all)[source]#

C++ local double Voigt line co-addition

C++ implementation of coadd_loc_dvoigt_prof().

Parameters:

TBD

Returns:

TBD

use_C_coadd_loc_cgauss_prof(rv_surf_star_grid, Fsurf_grid_spec, c_function_wrapper, st_prof_grids, input_cell_all)[source]#

C++ local skewed Gaussian line co-addition

C++ implementation of coadd_loc_cgauss_prof().

Parameters:

TBD

Returns:

TBD

use_C_coadd_loc_dgauss_prof(rv_surf_star_grid, Fsurf_grid_spec, c_function_wrapper, st_prof_grids, input_cell_all)[source]#

C++ local double Gaussian line co-addition

C++ implementation of coadd_loc_dgauss_prof().

Parameters:

TBD

Returns:

TBD

use_C_coadd_loc_pgauss_prof(rv_surf_star_grid, Fsurf_grid_spec, c_function_wrapper, st_prof_grids, input_cell_all)[source]#

C++ local sidelobed Gaussian line co-addition

C++ implementation of coadd_loc_pgauss_prof().

Parameters:

TBD

Returns:

TBD

gen_DI_prof(system_ar_prop, system_prop, system_param, grid_dic, coord_pl_ar, param, fixed_args, st_prof_grids, Fsurf_grid_spec, intr_prof_dic, sp_polcont_coeffs, inst, vis, isub_ord, iexp_list)[source]#

Disk-integrated profile: generic model

Calculates a disk-integrated stellar profile in the most complete possible way:
  • stellar continuum

  • absorbed by stellar photospheric lines

  • added to stellar emission lines

  • absorbed by interstellar absorption lines

Profiles are computed in the star rest frame, over observed or model spectral grids.

Parameters:
  • TBD

  • fixed_args (dict) – parameters that are not modified by the function.

Returns:

TBD

discrete_star_prof_func(system_prop_achrom, star_params_eff, grid_dic, param, fixed_args, st_prof_grids, Fsurf_grid_spec, intr_prof_dic, inst)[source]#

Disk-integrated profile: discretized model

The disk-integrated profile is built upon a discretized grid of the stellar surface to account for any type of intensity and velocity field. Additional contributions to the disk-integrated profile (continuum, emission and absorption lines, ISM) can be included through the call to gen_DI_prof().

Parameters:
  • TBD

  • fixed_args (dict) – parameters that are not modified by the function.

Returns:

TBD

plocc_prof(fixed_args, studied_pl, coord_dic, idx_w, star_I_prop, key_chrom, star_params, grid_dic, inst, st_prof_grids, linevar_par_vis)[source]#

Planet-occulted line profile

Line profiles can be

  • theoretical (calculated with a stellar atmospheric model)

  • measured (from the input data)

  • analytical (calculated in RV or wavelength space, but over a single line).

Spectral dependence

  • chromatic mode: planet-to-star radius ratio and/or stellar intensy are chromatic (spectral mode only)

  • closest-achromatic mode: profile width is smaller than the typical scale of chromatic variations (spectral mode only)

  • achromatic mode: white values are used (default in CCF mode, optional in spectral mode)

Profiles can be calculated at three precision levels

  • high. Intrinsic spectra are summed over each occulted cells. This option is only possible in chromatic / closest-achromatic mode (intrinsic spectra cannot be summed over individual cells for each chromatic band, since different parts of the spectra are affected differently)

  • medium. Intrinsic profiles are defined for each occulted region, based on the average region properties, and cumulated. In chromatic mode each profile is respectively scaled and shifted using the chromatic RV and flux scaling table from the region

  • low. Intrinsic profiles are defined for each exposure, based on the average exposure properties. In chromatic mode each profile is respectively scaled and shifted using the chromatic RV and flux scaling table from the exposure

When several planets are transiting the properties are averaged over the complementary regions they occult, in particular the flux scaling, so that the final profile cumulated over all planets should have the flux corresponding to the summed planet-to-star surface ratios

Parameters:
  • TBD

  • fixed_args (dict) – parameters that are not modified by the function.

  • st_prof_grids (dict) – spectral grids and associated properties

Returns:

TBD

init_surf_shift(gen_dic, inst, vis, data_dic, coord_dic, align_mode)[source]#

Planet-occulted rv

Returns measured or theoretical planet-occulted rv

Parameters:

TBD

Returns:

TBD

def_surf_shift(align_mode, dic_rv, i_in, data_exp, pl_ref, data_type, star_I_prop, dim_exp, nord, nspec)[source]#

Planet-occulted rv shifts

Returns rv shifts of stellar surface in star rest frame, from measured or theoretical planet-occulted rv

Parameters:

TBD

Returns:

TBD

calc_plocced_tiles(pl_prop, x_sky_grid, y_sky_grid)[source]#

‘Planet-occulted’ tiles

Parameters:
  • pl_prop (dict) – relevant planet properties.

  • x_sky_grid (1D array) – x coordinates of the stellar grid in the inclined star frame. (at st, cen, and end)

  • y_sky_grid (1D array) – y coordinates of the stellar grid in the inclined star frame. (at st, cen, and end)

Returns:

cond_in_pl (1D array) – array of booleans telling us which cells in the stellar grid are occulted by the planet.

generate_ar_prop(mock_dic, data_dic, gen_dic)[source]#

Automatic active region generation

Generates distribution of active regions and updates relevant dictionaries. The properties of each region is randomly drawn from a uniform or gaussian distribution.

Parameters:
  • mock_dic (dict) – mock dictionary.

  • data_dic (dict) – data dictionary.

  • gen_dic (dict) – general dictionary.

Returns:

None

retrieve_ar_prop_from_param(param, inst, vis)[source]#

Active region parameters: retrieval and formatting

Transforms a dictionary with ‘raw’ active region properties in the format param_ISinstrument_VSvisit__ARarname to a more convenient active region dictionary of the form :

ar_prop = { arname : {‘lat’ : , ‘Tc_ar’ : , ….}}

The formatted dictionary contains the initial active region properties as well as additional derived active region properties, such as the longitude and latitude of the active region as well as its visibility criterion. We assume active region parameter are never defined as common across multiple visits / instruments.

Parameters:
  • param (dict) – ‘raw’ active region properties.

  • inst (str) – instrument considered. Should match the instrument in the ‘raw’ active region parameter name (see format above).

  • vis (str) – visit considered. Should match the visit in the ‘raw’ active region parameter name (see format above).

Returns:

contamin_prop (dict) – formatted active region dictionary.

calc_ar_region_prop(grid_dic, star_params, line_occ_HP_band, cond_occ, contamin_prop, iband, star_I_prop, system_contamin_prop, params, proc_band, elem_consid, Ssub_Sstar, Ssub_Sstar_ref, Istar_norm_band, sum_prop_dic, coord_reg_dic, range_reg, Focc_star_band, par_list, range_par_list, fixed_args, cb_band, inst, st_prof_grids, linevar_par_vis, coeff_line)[source]#

Active region properties: define and update

Identify the active region in each exposure provided and calculate its properties. Accounts for the overlap of active regions by making the brightest region win the overlap. Update the provided dictionaries which contain the average and sum of the properties of interest over the active region.

Parameters:
  • star_params (dict) – stellar parameters (nominal/overwritten with variable input parameters)

  • line_occ_HP_band (str) – the precision with which to process the exposure.

  • cond_occ (bool) – whether there is an occultation by at least one active region in the exposure considered.

  • contamin_prop (dict) – formatted active region properties dictionary (see retrieve_ar_prop_from_param).

  • iband (int) – index of the band used to retrieve the corresponding planet and active region limb-darkening properties.

  • star_I_prop (dict) – quiet star intensity properties.

  • system_contamin_prop (dict) – active region limb-darkening properties.

  • params (dict) – Fixed/variable user parameters.

  • proc_band (list) – active regions to be processed to account for the overlap of active regions.

  • elem_consid (str) – name of the active region being processed.

  • Ssub_Sstar (float) – surface of grid cells in the active region-occulted region grid.

  • Ssub_Sstar_ref (float) – surface of grid cells in the stellar grid.

  • Istar_norm_band (float) – total intensity of the star in the band considered.

  • sum_prop_dic (dict) – dictionary containing the value of all parameters of interest (par_list), summed over the active region in the exposure considered, and for the band of interest.

  • coord_reg_dic (dict) – dictionary containing the value of all parameters of interest (par_list), averaged over the active region in the exposure considered, and for the band of interest.

  • range_reg (dict) – dictionary containing the range of average values the parameters of interest (range_par_list) can take during this exposure.

  • Focc_star_band (float) – total flux occulted by the active region in the exposure and band considered.

  • par_list (list) – List of parameters of interest, whose value in sum_prop_dic will be updated.

  • range_par_list (list) – list of parameters of interest, whose range of values, stored in range_reg, will be updated.

  • fixed_args (dict) – parameters used to generate the intrinsic profiles, which are not modified within this function.

  • cb_band (list) – coefficients used to calculate the convective blueshift RV contribution.

  • st_prof_grids (dict) – spectral grids and associated properties

Returns:
  • Focc_star_band (float) – the input Focc_star_band updated with the flux occulted by the active region considered.

  • cond_occ (bool) – updated version of the input cond_occ. Tells us whether or not the active region is visible in the exposure considered.