antaress.ANTARESS_grids.ANTARESS_prof_grid module#
- 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_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]#
- var_stellar_prop(fixed_args, theo_dic, system_prop, system_ar_prop, star_params, param_in)[source]#
Stellar properties: variables
Defines variable stellar properties.
- Parameters:
TBD
- Returns:
TBD
- custom_DI_prof(param, x, args=None)[source]#
Disk-integrated profile: model function
Calculates custom disk-integrated stellar profile. The disk-integrated profile is built upon a discretized grid of the stellar surface to allow accounting for any type of intensity and velocity field. This routine is separated from init_custom_DI_prof() so that it can be used in fitting routines with varying parameters.
- Parameters:
TBD
- Returns:
TBD
- init_custom_DI_prof(fixed_args, gen_dic, param_in)[source]#
Disk-integrated profile: grid initialization
Initializes stellar and intrinsic profile grids.
- Parameters:
TBD
- Returns:
TBD
- init_custom_DI_par(fixed_args, gen_dic, system_prop, star_params, params, RV_guess_tab)[source]#
Disk-integrated profile: parameter initialization
Initializes stellar parameters controlling either disk-integrated or local stellar grids. Fit parameters are initialized to default stellar properties.
- Parameters:
TBD
- Returns:
TBD
- init_st_intr_prof(args, grid_dic, param)[source]#
Intrinsic stellar profiles: initialization
Initializes intrinsic profile grid and properties. Called upon initialization of the disk-integrated stellar profile grid, or in fit mode if the stellar grid or the intrinsic profile grid vary
- Parameters:
TBD
- Returns:
TBD
- gen_theo_atm(st_atm, star_params)[source]#
Theoretical stellar atmosphere
Initializes SME grid to generate intrinsic stellar profiles
- Parameters:
TBD
- Returns:
TBD
- gen_theo_intr_prof(sme_grid)[source]#
Theoretical intrinsic stellar profiles
Returns grid of theoretical intrinsic profiles as a function of \(\mu\)
- Parameters:
TBD
- Returns:
TBD
- theo_intr2loc(grid_dic, system_prop, fixed_args, ncen_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, args, param)[source]#
Local line profile calculation
Calculates local profile from a given cell of the stellar disk.
- Parameters:
TBD
- Returns:
TBD
- coadd_loc_line_prof(rv_surf_star_grid, icell_list, Fsurf_grid_spec, flux_intr_grid, mu_grid, param, args)[source]#
Local line profile co-addition
Cumulates local profiles from each cell of the stellar disk.
- Parameters:
TBD
- Returns:
TBD
- coadd_loc_gauss_prof(rv_surf_star_grid, Fsurf_grid_spec, args)[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, args)[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_cgauss_prof(rv_surf_star_grid, Fsurf_grid_spec, args)[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, args)[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, args)[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_gauss_prof(rv_surf_star_grid, Fsurf_grid_spec, args)[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, args)[source]#
C++ local Voigt line co-addition
C++ implementation of coadd_loc_voigt_prof().
- Parameters:
TBD
- Returns:
TBD
- use_C_coadd_loc_cgauss_prof(rv_surf_star_grid, Fsurf_grid_spec, args)[source]#
C++ local skewed Gaussian line co-addition
C++ implementation of coadd_loc_cgauss_prof().
- Parameters:
TBD
- Returns:
TBD