Main Module¶
MGLensing.MGL¶
A class to handle the initialization and operations of the MGL (Modified Gravity Lensing) pipeline. This class is responsible for setting up the survey, checking the probe type, initializing data and theoretical models, and computing various cosmological quantities such as power spectra, expansion rate, comoving distance, and error bars.
Attributes:¶
- config_dicdict
Dictionary containing the configuration parameters loaded from the provided YAML file.
- Surveyobject
An instance of the survey setup class (e.g., LSSTSetUp or EuclidSetUp) based on the survey information in the configuration.
- probestr
The type of observable probe (e.g., ‘3x2pt’, ‘WL’, ‘GC’).
- pathstr
The path for output files.
- chain_namestr
The name of the output chain.
- hdf5_namestr
The name of the HDF5 file for MCMC sampling.
- mcmc_resumebool
Flag indicating whether to resume MCMC sampling.
- mcmc_verbosebool
Flag indicating whether to enable verbose output for MCMC sampling.
- mcmc_neffint
The effective number of samples for MCMC.
- mcmc_nliveint
The number of live points for MCMC.
- mcmc_poolint
The number of processes in the pool for MCMC.
- data_model_dicdict
Dictionary containing the data model specifications.
- theo_model_dicdict
Dictionary containing the theoretical model specifications.
- params_priorsdict
Dictionary containing the prior values of parameters.
- params_modellist
List of parameter names that are not fixed.
- params_fixeddict
Dictionary containing the fixed parameter values.
- params_fiducialdict
Dictionary containing the fiducial parameter values.
- Dataobject
An instance of the DataClass initialized with the data model and survey.
- TheoryModelobject
An instance of the Theory class initialized with the survey and theoretical model.
- Likeobject
An instance of the MGLike class initialized with the theoretical model and data.
Methods:¶
- get_power_spectra(params, theo_model):
Compute power spectra (mattre-matter, matter-galaxy, galaxy-galaxy).
- get_expansion_and_rcom(params):
Compute expansion and comoving distance for a given cosmology.
- get_c_ells(params, theo_model):
Compute angular power spectra for a given model.
- get_errorbars(params):
Compute errorbars for angular power spectra from a Gaussian covariance.
- get_sigma8_from_a_s_from_chain(params, nl_model):
Calculate the sigma8 parameter from a given set of cosmological parameters and a non-linear model from a chain.
- gen_output_header():
Generates the output header for the configuration and parameters.
- test():
Test-computation of a likelihood.