Model¶
-
class
vega.model.Model(corr_item, fiducial, scale_params, data=None)[source]¶ Class for computing Lyman-alpha forest correlation function models.
Parameters: - corr_item (CorrelationItem) – Item object with the component config
- fiducial (dict) – fiducial config
- scale_params (ScaleParameters) – ScaleParameters object
- data (Data, optional) – data object corresponding to the cf component, by default None
-
compute(pars, pk_full, pk_smooth)[source]¶ Compute correlation function model using the peak/smooth (wiggles/no-wiggles) decomposition.
Parameters: - pars (dict) – Computation parameters
- pk_full (1D Array) – Full fiducial linear power spectrum
- pk_smooth (1D Array) – Smooth component of the fiducial linear power spectrum
Returns: Full correlation function
Return type: 1D Array
-
compute_direct(pars, pk_full)[source]¶ Compute full correlation function model directly from the full power spectrum.
Parameters: - pars (dict) – Computation parameters
- pk_full (1D Array) – Full fiducial linear power spectrum
Returns: Full correlation function
Return type: 1D Array
-
static
init_broadband(bb_input, cf_name, bin_size_rp_data, bin_size_rp_model)[source]¶ Read the broadband config and initialize what we need.
Parameters: - bb_input (ConfigParser) – broadband section from the config file
- cf_name (string) – Name of corr item
- bin_size_rp_data (float) – Size of data r parallel bins
- bin_size_rp_model (float) – Size of model r parallel bins
Returns: list with configs of broadband terms
Return type: list
-
class
vega.correlation_func.CorrelationFunction(config, fiducial, coords_grid, scale_params, tracer1, tracer2, bb_config=None, metal_corr=False)[source]¶ Correlation function computation and handling.
# ! Slow operations should be kept in init as that is only called once
# ! Compute is called many times and should be fast
Extensions should have their separate method of the form ‘compute_extension’ that can be called from outside
Parameters: - config (ConfigParser) – model section of config file
- fiducial (dict) – fiducial config
- coords_grid (dict) – Dictionary with coordinate grid - r, mu, z
- scale_params (ScaleParameters) – ScaleParameters object
- tracer1 (dict) – Config of tracer 1
- tracer2 (dict) – Config of tracer 2
- bb_config (list, optional) – list with configs of broadband terms, by default None
- metal_corr (bool, optional) – Whether this is a metal correlation, by default False
-
broadband(bb_term, params)[source]¶ Compute broadband term.
Calculates a power-law broadband in r and mu or rp,rt.
Parameters: - bb_term (dict) – broadband term config
- params (dict) – Computation parameters
Returns: Output broadband
Return type: 1d Array
-
broadband_sky(bb_term, params)[source]¶ Compute sky broadband term.
Calculates a Gaussian broadband in rp,rt for the sky residuals.
Parameters: - bb_term (dict) – broadband term config
- params (dict) – Computation parameters
Returns: Output broadband
Return type: 1d Array
-
compute(pk, pk_lin, PktoXi_obj, params)[source]¶ Compute correlation function for input P(k).
Parameters: - pk (ND Array) – Input power spectrum
- pk_lin (1D Array) – Linear isotropic power spectrum
- PktoXi_obj (vega.PktoXi) – An instance of the transform object used to turn Pk into Xi
- params (dict) – Computation parameters
Returns: Output correlation function
Return type: 1D Array
-
compute_bias_evol(params)[source]¶ Compute bias evolution for the correlation function.
Parameters: params (dict) – Computation parameters Returns: Bias evolution for tracer Return type: ND Array
-
compute_broadband(params, pos_type)[source]¶ Compute the broadband terms for one position (pre-distortion/post-distortion) and one type (multiplicative/additive).
Parameters: - params (dict) – Computation parameters
- pos_type (string) – String with position and type, must be one of: ‘pre-mul’ or ‘pre-add’ or ‘post-mul’ or ‘post-add’
Returns: Output broadband
Return type: 1d Array
-
compute_core(pk, PktoXi_obj, params)[source]¶ Compute the core of the correlation function.
This does the Hankel transform of the input P(k), sums the necessary multipoles and rescales the coordinates
Parameters: - pk (ND Array) – Input power spectrum
- PktoXi_obj (vega.PktoXi) – An instance of the transform object used to turn Pk into Xi
- params (dict) – Computation parameters
Returns: Output correlation function
Return type: 1D Array
-
compute_desi_instrumental_systematics(params, bin_size_rp)[source]¶ Compute DESI instrumental systematics model TODO add link to Satya’s paper describing this
Parameters: - params (dict) – Computation parameters
- bin_size_rp (float) – Bin size along the line-of-sight
Returns: Output correction
Return type: 1D Array
-
compute_growth(z_grid=None, z_fid=None, Omega_m=None, Omega_de=None)[source]¶ Compute growth factor.
Implements eq. 7.77 from S. Dodelson’s Modern Cosmology book.
Returns: Growth factor Return type: ND Array
-
compute_qso_radiation(params)[source]¶ Model the contribution of QSO radiation to the cross (the transverse proximity effect)
Parameters: params (dict) – Computation parameters Returns: Xi QSO radiation model Return type: 1D
-
compute_xi_asymmetry(pk, PktoXi_obj, params)[source]¶ Calculate the cross-correlation contribution from standard asymmetry (Bonvin et al. 2014).
Parameters: - pk (ND Array) – Input power spectrum
- PktoXi_obj (vega.PktoXi) – An instance of the transform object used to turn Pk into Xi
- params (dict) – Computation parameters
Returns: Output xi asymmetry
Return type: 1D Array
-
compute_xi_relativistic(pk, PktoXi_obj, params)[source]¶ Calculate the cross-correlation contribution from relativistic effects (Bonvin et al. 2014).
Parameters: - pk (ND Array) – Input power spectrum
- PktoXi_obj (vega.PktoXi) – An instance of the transform object used to turn Pk into Xi
- params (dict) – Computation parameters
Returns: Output xi relativistic
Return type: 1D Array
-
class
vega.power_spectrum.PowerSpectrum(config, fiducial, tracer1, tracer2, dataset_name=None)[source]¶ Power Spectrum computation and handling.
# ! Slow operations should be kept in init as that is only called once
# ! Compute is called many times and should be fast
Extensions should have their separate method of the form ‘compute_extension’ that can be called from outside
Parameters: - config (dict) – pk config object
- fiducial (dict) – fiducial config
- tracer1 (dict) – Config of tracer 1
- tracer2 (dict) – Config of tracer 1
- dataset_name (string) – Name of dataset, by default None
-
compute(pk_lin, params, fast_metals=False)[source]¶ Computes a power spectrum for the tracers using the input linear P(k) and parameters.
Parameters: - pk_lin (1D array) – Linear Power Spectrum
- params (dict) – Computation parameters
Returns: Power spectrum
Return type: ND Array
-
compute_Gk(params)[source]¶ Model the effect of binning of the cf.
Parameters: params (dict) – Computation parameters Returns: G(k) Return type: ND Array
-
compute_bias_beta_hcd(bias, beta, params)[source]¶ Compute effective biases that include HCD modeling.
Parameters: - bias (float) – Bias for tracer
- beta (float) – Beta for tracer
- params (dict) – Computation parameters
Returns: Effective bias and beta
Return type: (float, float)
-
compute_bias_beta_uv(bias, beta, params)[source]¶ Compute effective biases that include UV modeling.
Parameters: - bias (float) – Bias for tracer
- beta (float) – Beta for tracer
- params (dict) – Computation parameters
Returns: Effective bias and beta
Return type: (float, float)
-
compute_dnl_arinyo(params)[source]¶ Non linear term from Arinyo et al 2015.
Parameters: params (dict) – Computation parameters Returns: D_NL factor Return type: ND Array
-
compute_dnl_mcdonald()[source]¶ Non linear term from McDonald 2003.
Returns: D_NL factor Return type: ND Array
-
compute_fullshape_exp_smoothing(params)[source]¶ Compute a Gaussian and exp smoothing for the full correlation function (usefull for london_mocks_v6.0).
Parameters: params (dict) – Computation parameters Returns: Smoothing factor Return type: ND Array
-
compute_fullshape_gauss_smoothing(params)[source]¶ Compute a Gaussian smoothing for the full correlation function.
Parameters: params (dict) – Computation parameters Returns: Smoothing factor Return type: ND Array
-
compute_kaiser(bias1, beta1, bias2, beta2, fast_metals=False)[source]¶ Compute Kaiser model.
Parameters: - bias1 (float) – Bias for tracer 1
- beta1 (float) – Beta for tracer 1
- bias2 (float) – Bias for tracer 2
- beta2 (float) – Beta for tracer 2
Returns: Kaiser term
Return type: ND Array
-
compute_peak_nl(params)[source]¶ Compute the non-linear gaussian correction for the peak component.
Parameters: params (dict) – Computation parameters Returns: Smoothing factor for the peak Return type: ND Array