This page details the methods and classes provided by the OneCovariance module.
Full Documentation
- class cov_input.FileInput(bias_dict)
Bases:
objectProvides methods to read-in look-up tables listed in a configuration file. Apart from the redshift distribution(s), they are optional additions that can speed up the covariance code or simply feed it a model that is not configured. All input files will be checked for internal consistencies. In the Setup class more consistency tests across different variable and file inputs will be performed. The new configuration file that the Input class can generate will be appended with a list of all the files used.
- Attributes:
- too many to list but all relevant ones are put into
- dictionaries and explained in the method ‘read_input’
- __find_filename_two_inserts(fn, n_tomo1, n_tomo2)
- __get_Cell_tabs(config)
Calls the read-in method for all tabulated projected power spectra which are used to calculate the covariance matrix. It then performs internal consistency checks and gives appropriate warnings or raises exceptions.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- File structure
- ————–
- # ell t1 t2 C(ell)[t1, t2, s1] … C(ell)[t1, t2, sN]
- 2 1 1 xxe-x … xxe-x
- 2 1 … xxe-x … xxe-x
- 2 … … xxe-x … xxe-x
- 2 max max xxe-x … xxe-x
- 3 1 1 xxe-x … xxe-x
- … … … … …
- 1.0e5 max max xxe-x … xxe-x
- or N_unique_tomo_combinations files with one ell column and
- N_sampledims Cell columns
- # ell C(ell)[s1] … C(ell)[sN]
- 2 xxe-x … xxe-x
- 3 xxe-x … xxe-x
- … … … …
- 1.0e5 xxe-x … xxe-x
- s -> galaxy sample bin number (out of N)
[currently only one supported]
- t -> tomographic bin combination (out of M)
for kappakappa: M = tomo_lens**2 for gkappa: M = tomo_lens*tomo_clust for gg: M = tomo_clust**2
- __get_arbitrary_filter_tabs(config)
Reads in the … Allows for an auto-generation of filenames if all files are named in the same way and only the numbers for the tomographic bin combination is changed. In such a case, replace the two bin number with a ‘?’ each.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- __get_arbitrary_radial_weights_tabs(config)
Reads in the … Allows for an auto-generation of filenames if all files are named in the same way and only the numbers for the tomographic bin combination is changed. In such a case, replace the two bin number with a ‘?’ each.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- __get_cosebi_tabs(config)
Reads in the … Allows for an auto-generation of filenames if all files are named in the same way and only the numbers for the tomographic bin combination is changed. In such a case, replace the two bin number with a ‘?’ each.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- __get_effbias_tabs(config)
Calls the read-in method for the tabulated effective bias which is used to calculate the covariance matrix. It then performs internal consistency checks and gives appropriate warnings or raises exceptions.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- File structure
- ————–
- # z bias(z)[sample 1] … bias(z)[sample N]
- 0.1 1.2 … 1.7
- 0.2 1.3 … 1.9
- … … … …
- 1.1 1.9 … 3.2
- __get_mor_tabs(config)
Calls the read-in method for the tabulated mass-observable relation which is used to calculate the covariance matrix. It then performs internal consistency checks and gives appropriate warnings or raises exceptions.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- File structure
- ————–
- # log10(M) mor(M)
9.0 8.3e+2 9.1 1.9e+3
- … …
- 18.0 1.8e+17
- __get_npair_tabs(config)
Reads in the number of galaxy pairs per angular bin for an accurate calculation of the shot noise. If no npair file is given, an approximation of the shot noise contribution will be used. Allows for an auto-generation of filenames if all files are named in the same way and only the numbers for the tomographic bin combination is changed. In such a case, replace the two bin number with a ‘?’ each.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- __get_occnum_tabs(config)
Calls the read-in method for the tabulated occupation number which is used to calculate the covariance matrix. It then performs internal consistency checks and gives appropriate warnings or raises exceptions.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- File structure
- ————–
- # log10(M) occnum(M)[sample 1] … occnum(M)[sample N]
9.0 0.0 … 0.0 9.1 0.0 … 0.0
- … … … …
- 18.0 0.0 … 1.0e-34
- (The example above lists extreme values for M, therefore, most
- values will just be 0, of course not all…)
- __get_occprob_tabs(config)
Calls the read-in method for the tabulated occupation probability which is used to calculate the covariance matrix. It then performs internal consistency checks and gives appropriate warnings or raises exceptions.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- File structure
- ————–
- # the following should be provided per galaxy sample bin
- # log10(M) log10(M for sample) occprob(M, M for sample)
9.0 10.0 0.0 9.0 10.1 0.0
- … … …
9.0 11.0 0.0 9.1 10.0 0.0
- … … …
- 18.0 11.0 0.0
- # of all galaxies should be considered (sampledim = 1)
- # log10(M) occprob(M, M for sample)
9.0 0.0 9.1 0.0
- … …
- 18.0 0.0
- (The example above lists extreme values for M and sample bin M,
- therefore, most values will just be 0, of course not all…)
- __get_powspec_tabs(config)
Calls the read-in method for all tabulated power spectra which are used to calculate the covariance matrix. It then performs internal consistency checks and gives appropriate warnings or raises exceptions.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- File structure
- ————–
- # z k P(z,k)[sample 1] … P(z,k)[sample N]
- 0.1 4.0e-5 265.1 … 555.0
- 0.2 3.9e-5 286.4 … 599.7
- … … … … …
- 1.1 3.0e+2 0.02 … 0.07
- __get_trispec_tabs(config)
Calls the read-in method for all tabulated trispectra which are used to calculate the covariance matrix. It then performs internal consistency checks and gives appropriate warnings or raises exceptions. The list of available redshifts are defined in the filename, e.g., trispectra_0.1.ascii for redshift z=0.1. The code will search for extensions ‘_redshift’ with a given filename.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- File structure
- ————–
- # log10k1 log10k2 m n gggg gggm ggmm gmgm mmgm mmmm
- -1e1
- -1e1
0 0 …. …. …. …. …. ….
… … … … …. …. …. …. …. …. -1e1 +2e1 0 n …. …. …. …. …. …. +2e1 -1e1 1 1 …. …. …. …. …. …. … … … … …. …. …. …. …. …. +2e1 +2e1 m n …. …. …. …. …. ….
- (m,n: optional galaxy sample bins, if only one bin set to 0 0)
- __read_config_for_consistency_checks(config, config_name='config.ini')
Reads in some variables from the configuration file that specify how the covariance should be calculated. These are all used for internal consistency checks in this and subsequently called methods.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_Cell_files(Cfiles, type)
Reads in one file with a tabulated projected power spectrum which is used to calculate the covariance.
- Parameters:
- Cfileslist
List of names of the projected power spectrum file.
- typestring
Name of the type to read in
- File structure
- ————–
- For gg
- # ell t1 t2 C(ell)[t1, t2, s1,s1] … C(ell)[t1, t2, sN,sN]
- 2 1 1 xxe-x … xxe-x
- 2 1 … xxe-x … xxe-x
- 2 … … xxe-x … xxe-x
- 2 max max xxe-x … xxe-x
- 3 1 1 xxe-x … xxe-x
- … … … … …
- 1.0e5 max max xxe-x … xxe-x
- For gkappa
- # ell t1 t2 C(ell)[t1, t2, s1] … C(ell)[t1, t2, sN]
- 2 1 1 xxe-x … xxe-x
- 2 1 … xxe-x … xxe-x
- 2 … … xxe-x … xxe-x
- 2 max max xxe-x … xxe-x
- 3 1 1 xxe-x … xxe-x
- … … … … …
- 1.0e5 max max xxe-x … xxe-x
- For kappakappa
- # ell t1 t2 C(ell)[t1, t2]
- 2 1 1 xxe-x
- 2 1 … xxe-x
- 2 … … xxe-x
- 2 max max xxe-x
- 3 1 1 xxe-x
- … … …
- 1.0e5 max max xxe-x
- s -> galaxy sample bin number (out of N)
all(!) sample bin combinations required
- t -> all(!) tomographic bin combination (out of T1*T2)
for kappakappa: M = tomo_lens**2 for gkappa: M = tomo_lens*tomo_clust for gg: M = tomo_clust**2
- __read_in_Cell_manyfiles(Cfile, type)
Reads in one file with a tabulated projected power spectrum which is used to calculate the covariance.
- Parameters:
- Cfilestring
Name of the projected power spectrum file.
- typestring
Name of the type to read in
- File structure
- ————–
- For gg
- # ell C(ell)[s1,s1] … C(ell)[sN,sN]
- 2 xxe-x … xxe-x
- 2 xxe-x … xxe-x
- 2 xxe-x … xxe-x
- 2 xxe-x … xxe-x
- 3 xxe-x … xxe-x
- … … …
- 1.0e5 xxe-x … xxe-x
- For gkappa
- # ell C(ell)[s1] … C(ell)[sN]
- 2 xxe-x … xxe-x
- 2 xxe-x … xxe-x
- 2 xxe-x … xxe-x
- 2 xxe-x … xxe-x
- 3 xxe-x … xxe-x
- … … …
- 1.0e5 xxe-x … xxe-x
- For kappakappa
- # ell C(ell)[s1,s1]
- 2 xxe-x
- 2 xxe-x
- 2 xxe-x
- 2 xxe-x
- 3 xxe-x
- … …
- 1.0e5 xxe-x
- s -> galaxy sample bin number (out of N)
all(!) sample bin combinations required
- t -> all(!) tomographic bin combination (out of T1*T2)
for kappakappa: M = tomo_lens**2 for gkappa: M = tomo_lens*tomo_clust for gg: M = tomo_clust**2
- __read_in_Tell_files(Tfiles)
Reads in one file with a tabulated projected trispectrum which is used to calculate the covariance.
- Parameters:
- Tfileslist
List of names of the projected trispectrum file.
- File structure
- ————–
- # ell1 ell2 T(ell)[s1] … T(ell)[sN]
- 2 2 xxe-x … xxe-x
- 2 … xxe-x … xxe-x
- 2 ellmax xxe-x … xxe-x
- 3 2 xxe-x … xxe-x
- … … … … …
- ellmax ellmax xxe-x … xxe-x
- s -> galaxy sample bin number (out of N)
[currently only one supported]
- N_unique_tomo_combinations files with one ell column and
- N_sampledims Cell columns
for kappakappa: M = tomo_lens**2 for gkappa: M = tomo_lens*tomo_clust for gg: M = tomo_clust**2
- __read_in_Tn_pm_files(Tfile)
Reads in …
- Parameters:
- Tfilestring
Name of the COSEBI Tn_pm kernel file.
- File structure
- ————–
- # theta Tn_pm
- __read_in_Wn_files(wfile)
Reads in …
- Parameters:
- wfilestring
Name of the COSEBI kernel file.
- File structure
- ————–
- # ln(ell) Wn_log/lin
- 2 0.123456789
- 3 0.234567891
- … …
- 100 0.912345678
- __read_in_bias_files(config, config_name)
Reads in the redshift dependent but scale-independent bias for the clustering. If no bias is given the HoD or unbiased clustering will be assumed.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- File structure
- ————–
- # z n(z)
- 0.1 4.1e-4
- 0.2 1.3e-3
- … …
- 1.1 0.0
- __read_in_csmf_files(config)
Reads in the files for the conditional stellar mass function
- __read_in_effbias_files(bfile)
Reads in one file with a tabulated effective bias which is used to calculate the covariance.
- Parameters:
- bfilestring
Name of the power spectrum file.
- File structure
- ————–
- # z bias(z)[sample 1] … bias(z)[sample N]
- 0.1 1.2 … 1.7
- 0.2 1.3 … 1.9
- … … … …
- 1.1 1.9 … 3.2
- __read_in_fourier_filter_files(wfile)
Reads in …
- Parameters:
- wfilestring
Name of the filter file.
- File structure
- ————–
- # ell Wn_log/lin
- 2 0.123456789
- 3 0.234567891
- … …
- 100 0.912345678
- __read_in_mor_files(mfile)
Reads in one file with a tabulated mass-observable relation which is used to calculate the covariance.
- Parameters:
- mfilestring
Name of the mass-observable relation file.
- File structure
- ————–
- # log10(M) mor(M)
9.0 8.3e+2 9.1 1.9e+3
- … …
- 18.0 1.8e+17
- __read_in_npair_files(nfile)
Reads in the number of galaxy pairs per angular bin for an accurate calculation of the shot noise. If no npair file is given, an approximation of the shot noise contribution will be used.
- Parameters:
- nfilestring
Name of the number of galaxy pairs file.
- File structure
- ————–
- N_pairs must be the last column (as in the treecorr output, or
just a 2 column file)
- # theta … N_pairs
- 0.5 … 100
- 0.6 … 300
- … … …
- 100 … 2000000
- __read_in_occnum_files(nfile)
Reads in one file with a tabulated occupation number which is used to calculate the covariance.
- Parameters:
- nfilestring
Name of the occupation number file.
- File structure
- ————–
- # log10(M) occnum(M)[sample 1] … occnum(M)[sample N]
9.0 0.0 … 0.0 9.1 0.0 … 0.0
- … … … …
- 18.0 0.0 … 1.0e-34
- (The example above lists extreme values for M, therefore, most
- values will just be 0, of course not all…)
- __read_in_occprob_files(ofiles, sampledim)
Reads in one file with a tabulated occupation distribution which is used to calculate the covariance.
- Parameters:
- ofilesstring
Name of the occupation distribution files.
- sampledimint
Number of galaxy samples (e.g., in stellar mass bins).
- File structure
- ————–
- # the following should be provided per galaxy sample bin
- # log10(M) log10(M for sample) occprob(M, M for sample)
9.0 10.0 0.0 9.0 10.1 0.0
- … … …
9.0 11.0 0.0 9.1 10.0 0.0
- … … …
- 18.0 11.0 0.0
- # of all galaxies should be considered (sampledim = 1)
- # log10(M) occprob(M, M for sample)
9.0 0.0 9.1 0.0
- … …
- 18.0 0.0
- (The example above lists extreme values for M and sample bin M,
- therefore, most values will just be 0, of course not all…)
- __read_in_powspec_files(Pfile)
Reads in one file with a tabulated power spectrum which is used to calculate the covariance.
- Parameters:
- Pfilestring
Name of the power spectrum file.
- File structure
- ————–
- # z k P(z,k)[sample 1] … P(z,k)[sample N]
- 0.1 4.0e-5 265.1 … 555.0
- 0.2 3.9e-5 286.4 … 599.7
- … … … … …
- 1.1 3.0e+2 0.02 … 0.07
- __read_in_radial_weight_files(wfile)
Reads in …
- Parameters:
- wfilestring
Name of the filter file.
- File structure
- ————–
- # z radial filter
- 0 0.123456789
- 0.1 0.234567891
- … …
- 5.0 0.912345678
- __read_in_real_filter_files(wfile)
Reads in …
- Parameters:
- wfilestring
Name of the filter file.
- File structure
- ————–
- # theta R(theta)
- 2 0.123456789
- 3 0.234567891
- … …
- 100 0.912345678
- __read_in_trispec_files(Tfiles)
Reads in all files with a tabulated trispectrum which is used to calculate the covariance.
- Parameters:
- Tfilesstring
Name of the trispectrum files.
- File structure
- ————–
- # log10k1 log10k2 m n gggg gggm ggmm gmgm mmgm mmmm
- -1e1
- -1e1
0 0 …. …. …. …. …. ….
… … … … …. …. …. …. …. …. -1e1 +2e1 0 n …. …. …. …. …. …. +2e1 -1e1 1 1 …. …. …. …. …. …. … … … … …. …. …. …. …. …. +2e1 +2e1 m n …. …. …. …. …. ….
- (m,n: optional galaxy sample bins, if only one bin set to 0 0)
- __read_in_z_files(config, config_name)
Reads in the redshift distributions for which the covariance should be calculated. If no redshift distribution is given, an exception is raised.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- File structure
- ————–
- # z n(z)
- 0.1 4.1e-4
- 0.2 1.3e-3
- … …
- 1.1 0.0
- __write_params()
This methods appends to the save_configs file created in the Input class which contains all the parameters that are not None, whether they have been explicitly set in the original configuration file or whether they have been implicitly set by this class.
- __zip_to_dicts()
This method stores all private variables from this class, that are needed to calculate the covariance, into dictionaries. It creates a separate dictionary needed to write the parameters back into a save_configs file.
- read_input(config_name='config.ini')
This method reads in all the look-up tables necessary and optional to calculate the covariance matrix. It also checks whether compulsory parameters have been set. The parameters are then zipped into dictionaries. Finally, a file is produced that lists all explicitly and implicitly set parameters for future reference.
- Parameters:
- config_namestring
default : ‘config.ini’ Name of the configuration file.
- class cov_input.Input
Bases:
objectProvides methods to read-in all parameters from a configuration file that are needed for the covariance code. Some parameters are compulsory, others are optional. Whenever an optional parameter is not set explicitly and a fall-back value is inserted, a message will be displayed to inform the user what the value has been set to. Lastly, a new configuration file can be generated that lists all values used. A full list of all input values is given in the config.ini .
- Attributes:
- Too many to list, but all relevant ones are put into
- dictionaries and explained in the method ‘read_input’
- __read_in_IA_dict(config, config_name)
Reads in relevant information for the intrinsic alignment model for which the covariance should be calculated. Every value that is not specified either raises an exception or gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_arbitrary_summary_settings(config, config_name)
Reads in further information needed to calculate the covariance for arbitrary summary statistics. Every value that is not specified either raises an exception or gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_bias_dict(config, config_name)
Reads in relevant information for the bias model for which the covariance should be calculated. Every value that is not specified either raises an exception or gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_cosmo_dict(config)
Reads in the parameters for the cosmological model for which the covariance should be calculated. Every value that is not specified gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- __read_in_covCOSEBI_settings(config, config_name)
Reads in further information needed to calculate the covariance for the estimator ‘cosebi’. Every value that is not specified either raises an exception or gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_covELLspace_settings(config, config_name)
Reads in further information needed to calculate the covariance for the estimator ‘C_ell’. Every value that is not specified either raises an exception or gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_covRspace_settings(config, config_name)
Reads in further information needed to calculate the covariance for the estimator ‘projected_real’. Every value that is not specified either raises an exception or gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_covTHETAspace_settings(config, config_name)
Reads in further information needed to calculate the covariance for the estimator ‘xi_pm’. Every value that is not specified either raises an exception or gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_cov_dict(config, config_name)
Reads in which parts of the covariance should be calculated. Every value that is not specified either raises an exception or gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_covbandpowers_settings(config, config_name)
Reads in further information needed to calculate the covariance for the estimator ‘bandpowers’. Every value that is not specified either raises an exception or gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_hm_prec(config)
Reads in information needed to call the mass function from the hmf module (by Steven Murray). Every value that is not specified gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- __read_in_hod_dict(config, config_name)
Reads in relevant information for the halo occupation distribution model for which the covariance should be calculated. Every value that is not specified either raises an exception or gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_misc(config)
Reads in miscellaneous information.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- __read_in_obs_dict(config, config_name)
Reads in for which observables the covariance should be calculated. Every value that is not specified either raises an exception or gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_output_dict(config)
Reads in the path, name and style for the output files. This includes the output file for the covariance as well as the configuration file. If no output file should be printed the result will be displayed in the terminal, the return of the read_input method (‘self.output_dir+self.output_file’) will be 0. Every value that is not specified gets a fall-back value.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- __read_in_powspec_prec(config)
Reads in information needed to calculate power spectra. Every value that is not specified gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- __read_in_survey_params_dict(config, config_name)
Reads in relevant information for the specific survey for which the covariance should be calculated. Every value that is not specified either raises an exception or gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- config_namestring
Name of the config file. Needed for giving meaningful exception texts.
- __read_in_trispec_prec(config)
Reads in information needed to calculate trispectra. Every value that is not specified gets a fall-back value which is reported to the user.
- Parameters:
- configclass
This class holds all the information specified the config file. It originates from the configparser module.
- __write_save_configs_file(config_pars)
This methods creates a save_configs file which contains all the parameters that are not None, whether they have been explicitly set in the original configuration file or whether they have been implicitly set by this class.
- __zip_to_dicts()
This method stores all private variables from this class, that are needed to calculate the covariance, into dictionaries. It creates a second dictionary ‘_abr’ if the first can contain a variable that is None or is an array. The second dictionary is only needed to write the parameters back into a save_configs file.
- read_input(config_name='config.ini')
This method reads in all the parameters necessary to calculate the covariance matrix. It also checks whether compulsory parameters have been set. The parameters are then zipped into dictionaries. Finally, a file is produced that lists all explicitly and implicitly set parameters for future reference.
- Parameters:
- config_namestring
default : ‘config.ini’ Name of the configuration file.
- class cov_setup.GaussLegendre(support, integrand, log_support, log_integrand, order, rel_acc)
Bases:
objectThis class implements Gauss legendre integration using the Legendre polynomials to approximate an integral over an arbitrary function by a polynomial up to some order.
- Parameters:
- support1D array
the support of the integrand, i.e. the integration variable
- integrand1D array
the integrand, must be of the same length as support
- log_support: bool
should the integration variable be interpolated logarithmically
- log_integrand: bool
should the integrand be interpolated logarithmically
- orderint
the order of the Gauss-Legendre quadrature
- rel_accfloat
relative accuracy to be reached. This is always estimated by the relative difference between the integral evaluated with polynomial order n and n + 2
- __integrate_fixed_order()
Calculates the integral of an oscillatory integrand using the extrema of the integrand and integrating piecewise between them using the quadrature rule.
- Returns:
- the integral over the support
- __quadrature(lo, hi, roots, weights)
Calculates the Gauss-Legendre quadrature in the interval lo and hi. The roots and weights must be provided as tabulated input.
- Parameters:
- lofloat
lower integration limit
- hifloat
upper integrationl limit
- roots1D array
roots of the polynomials
- weights1D array
weights of the quadrature
- integrate()
Calculates the integral of an oscillatory integrand using the extrema of the integrand and integrating piecewise between them using the quadrature rule. The integral is calculated in the supported interval by increasing the polynomial order until a fixed relative accuracy is reached.
- Returns:
- the integral over the support
- update_integrand(new_integrand)
The extrema for one kernel function do not changed when multiplied with a smooth function (e.g., ell*Cell). Therefore, we can update the integrand to safe computational time with this function.
- class cov_setup.Setup(cosmo_dict, bias_dict, survey_params_dict, prec, read_in_tables)
Bases:
objectThis class provides various methods that set the cosmological model via astropy, and normalizes the tabulated redshift distributions. It also contains consistency checks between input in the configuration file and the look-up tables, the redshift range, number of tomographic bins, the k-range, the mass range and the number of galaxy samples (e.g., split in stellar mass bins). All consistency checks are automatically performed when the Setup class is called.
- __check_z_distribution_value_loc_in_bin()
Ensuring that the redshift distribution contains values which are situated in the middle of any redshift bin.
- __consistency_checks_for_M_support_in_tabs(bias_dict, hm_prec)
Performs consistency checks for the halo occupation distribution and the configuration in [bias] and [halomodel evaluation]. For the mass range, the priority is occnum_tab > occprob_tab > mor_tab, only the highest priority is checked since only the HOD class will ignore the rest. Gives warnings if they are incompatible.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- __consistency_checks_for_k_support_in_tabs(powspec_prec)
Performs consistency checks for the tabulated power spectra and the configuration in [powspec evaluation]. Gives warnings if they are incompatible.
- Parameters:
- powspec_precdictionary
Contains precision information about the power spectra, this includes k-range and spacing. To be passed from the read_input method of the Input class.
- __consistency_checks_for_tomographic_dims(survey_params_dict)
Performs consistency checks for the number of tomographic bins for parameters specific to the survey. Also, checks against the number of sample bins. Enables smooth processing of 6x2pt analysis. Gives warnings or errors if they are incompatible.
- Parameters:
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins. To be passed from the read_input method of the Input class.
- __consistency_checks_for_z_support_in_tabs(read_in_tables)
Performs consistency checks for the tabulated power spectra and effective bias against the tabulated redshift distribution(s). Checks are done for redshift 0 to the maximum redshift. Gives warnings or errors if they are incompatible.
- __rebin_npair(npairs, theta_npair, theta_ul_bins, theta_bins)
- __set_cosmology(cosmo_dict)
Fixes the cosmology with a class from the astropy library for all future calculations. Uses a general ‘w0waCDM’ model.
- Parameters:
- cosmo_dictdictionary
Specifies all cosmological parameters. To be passed from the read_input method of the Input class.
- calc_a_lm(est1, est2, survey_params_dict)
Calculates the angular modes that fit into the survey area from a mask file with healpy or reads in those modes from an alm_file. Checks whether the survey area(s) are available and calculates them if not.
- Parameters:
- est1string
specifies the estimator for which the a_lm’s are needed, ‘gg’ for clustering, or ‘mm’ cosmic shear
- est2string
specifies the estimator for which the a_lm’s are needed, ‘gm’ for galaxy-galaxy lensing, or ‘mm’ cosmic shear
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. This function needs the name of the mask files and alm files and the read_in bools. To be passed from the read_input method of the Input class.
- calc_survey_area(survey_params_dict)
Reads in the survey area from a mask file with healpy for which the covariance should be calculated.
- Parameters:
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. This function needs the name of the mask files and the read_in bool. To be passed from the read_input method of the Input class. Updates the dictionary survey_params_dict with the calculated survey areas.
- consistency_checks_for_Cell_calculation(obs_dict, cosmo_dict, powspec_prec, ellrange, los_chi, do_not_update_ell)
- get_dnpair(obsbool, theta_ul_bins, survey_params_dict, npair_tab)
- get_npair(obsbool, theta_ul_bins, theta_bins, survey_params_dict, npair_tab)
- get_unique_elements(mode, covELL)
Returns the unique elements of a data vector
- symmetrise_matrix(mode, covELL)
- class cov_hod.HOD(bias_dict, hm_prec)
Bases:
objectThis class provides different models for the halo occupation distribution. All quantities are calculated at as a function halo mass.
- Attributes:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- double_powerlaw(hod_dict, pop)
Calculates the mass-observable relation for a specified range of halo masses.
- Parameters:
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- popstring
Is either ‘cen’ for central galaxies or ‘sat’ for satellite galaxies.
- Returns:
- Mobsarray
with unit M_sun/h with shape (M_bins)
- hod_update(bias_dict, hm_prec)
Updates the private variables Mrange and Mbins to a new mass range
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- lognormal(hod_dict, Mobs, pop)
One model to calculate the occupation probability per halo mass for a specified population of galaxies. Follows Eq. (15) of van Uitert et al. (2016)
- Parameters:
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- Mobsarray
Results from the mass-observable relation. To be calculated first.
- popstring
“cen” for centrals
“sat” for satellites
- Returns:
- lognarray
with shape (sample_bins, self.N_stellar_mass, M_bins)
- mass_bins(bias_dict, hm_prec)
If individual mass-ranges for samples of galaxies are given, compute their logaarithmically spaced mass ranges per sample
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- Returns:
- binsarray
Returns the mass bins define in hm_prec.
- modschechter(hod_dict, Mobs, pop)
One model to calculate the occupation probability per halo mass for a specified population of galaxies. Follows Eq. (17) of van Uitert et al. (2016)
- Parameters:
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- Mobsarray
Results from the mass-observable relation. To be calculated first.
- popstring
“cen” for centrals
“sat” for satellites
- Returns:
- schecharray
with shape (sample_bins, self.N_stellar_mass, M_bins)
- occ_num_and_prob(hod_dict, mor_tab, occprob_tab, occnum_tab)
Calculates the expected number of galaxies of a given mass, < N_gal | M >.
- Parameters:
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- mor_tabdictionary
default : None Look-up table for the mass-observable relation (optional). To be passed from the read_input method of the FileInput class.
- occprob_tabdictionary
default : None Look-up table for the occupation probability as a function of halo mass per galaxy sample (optional). To be passed from the read_input method of the FileInput class.
- occnum_tabdictionary
default : None Look-up table for the occupation number as a function of halo mass per galaxy sample (optional). To be passed from the read_input method of the FileInput class.
- Returns:
- occ_numarray
with shape (sample_bins, M_bins)
- occ_probarray
with shape (sample_bins, self.N_stellar_mass, M_bins)
- occ_num_and_prob_per_pop(hod_dict, pop, mor_tab, occprob_tab, occnum_tab)
Calculates the expected number of objects of a given type of a given mass, < N_cen/sat | M >.
- Parameters:
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- popstring
“cen” for centrals
“sat” for satellites
- mor_tabdictionary
default : None Look-up table for the mass-observable relation (optional). To be passed from the read_input method of the FileInput class.
- occprob_tabdictionary
default : None Look-up table for the occupation probability as a function of halo mass per galaxy sample (optional). To be passed from the read_input method of the FileInput class.
- occnum_tabdictionary
default : None Look-up table for the occupation number as a function of halo mass per galaxy sample (optional). To be passed from the read_input method of the FileInput class.
- Returns:
- occ_numarray
with shape (sample_bins, M_bins)
- occ_probarray
with shape (sample_bins, self.N_stellar_mass, M_bins) [Note1]
- [Note1] If the occupation number is given as a look-up table,
- then occ_prob will be NoneType
- class cov_halo_model.HaloModel(zet, cosmo_dict, bias_dict, hod_dict, survey_params_dict, prec, read_in_tables)
Bases:
SetupThis class calculates the necessary ingredients of the halo model which are later used to calculate the covariance. Important quantities are the mass function, the galaxy bias and the halo model integrals. All quantities are calculated at a single redshift. Inherits the functionality of the Setup class and contains instances of the hmf and hod class.
- __bias_tinker10_fittfunc(nu)
Evaluates the fitting function for the bias at the peak height, nu.
- Parameters:
- nufloat
The height of the peak in units of the variance.
- Returns:
- tinkerfloat
Fitting function evaluated at nu.
References
Tinker et al. (2010)
- __concentration(Mc_relation)
Calculates a mass-concentration relation for a given model with the following options
(i) ‘duffy08’ : Duffy et al. 2008 (II) ‘flat’ : concentration is one (ii) all this laziness…
- Parameters:
- Mc_relationstring
mass-concentration relation
- Returns:
- conarray
with shape(M_bins)
- __virial_radius()
Calculates the virial radius given a halo overdensity definition.
- Returns:
- virial_radiusarray
with shape(M_bins)
- bias(bias_dict, hm_prec)
Implements the bias model as a function of mass specified in the bias dictionary with the following options:
‘Tinker10’ empirical model (see __bias_tinker10_fittfunc)
shame we didn’t do more yet
All bias models are normalized, i.e., the integral over the peak height is required to be unity.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- Returns:
- tinkerarray
with shape (M_bins)
- calc_effective_bias(bias_dict, hod_dict, hm_prec)
Calculates the effective bias of tracers.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- Returns:
- biasarray
with shape (sample_bins)
- calc_mass_func(zet, cosmo_dict, hm_prec, powspec_prec)
Calculates the mass function from the hmf module for a given cosmology at the redshift ‘zet’.
- Parameters:
- zetfloat
Redshift at which the covariance should be evaluated.
- cosmo_dictdictionary
Specifies all cosmological parameters. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- powspec_precdictionary
Contains precision information about the power spectra, this includes k-range and spacing. To be passed from the read_input method of the Input class.
- Returns:
- mass_funcclass
- conditional_galaxy_stellar_mf(hod_dict, type)
Calculates the conditional stellar mass function for centrals and satellites
- Parameters:
- typestring
can be ‘sat’ or ‘cen’ for satellites and centrals respectively
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- Returns:
- csmf_typearray
the galaxy stellar mass with shape (300, M_bins)
- count_matter_bispectrum(bias_dict, hod_dict, hm_prec)
Calculates the three dimensional count-matter density cross-bispectrum for a collapsed triange at the wavenumbers specified in log10kbins and redshift specified in the class. This is used for later computation of the cross-correlation between the conditional stellar mass function and 2pt statistics.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- Returns:
- nBcmm_muarray
with shape (log10k bins, sample bins)
References
Takada and Bridle 2007, New Journal of Physics, 9, 446
- galaxy_stellar_mf(hod_dict, type)
Calculates the stellar mass function for centrals and satellites
- Parameters:
- typestring
can be ‘sat’ or ‘cen’ for satellites and centrals respectively
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- Returns:
- smfarray
the galaxy stellar mass with shape (sample bins, 300)
- galaxy_stellar_mf_bias(hod_dict, bias_dict, hm_prec, type)
Calculates the stellar mass function for centrals and satellites times the halo bias (phitilde)
- Parameters:
- typestring
can be ‘sat’ or ‘cen’ for satellites and centrals respectively
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- Returns:
- smfarray
the galaxy stellar mass with shape (sample bins, 300)
- get_count_matter_bispectrum(bias_dict, hod_dict, hm_prec, log10csmf_mass_bins)
Sets the splines for the matter count matter bispectrum
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.)
- halo_model_integral_I_alpha_mmm(bias_dict, hod_dict, hm_prec, alpha)
Calculates quantities for the halo model which is needed to calculate the trispectrum.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- alphaint
Auxillary label
- Returns:
- integral_mmmarray
with shape (log10k_bins, log10k_bins, sample_bins)
- halo_model_integral_I_alpha_mmm_spline_loglog(bias_dict, hod_dict, hm_prec, alpha)
Calculates a 2d spline of log10(k), log10(k) and the log10 halo model quantity I_alpha_mmm which is needed to calculate the trispectrum.
- Parameters:
- See documentation of the halo_model_integral_I_alpha_mmm -
- method.
- Returns:
- integralmmm_splineRectBivariateSpline
- halo_model_integral_I_alpha_x(bias_dict, hod_dict, hm_prec, alpha, type_x)
Calculates quantities for the halo model.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- alphaint
Auxillary label
- type_xstring
“m” for matter
“g” for tracers
- Returns:
- halo_model_integral_I_alpha_xarray
with shape (log10k_bins, sample_bins)
- References
- Dvornik et al. (2018), their Appendix A, Eq. (A15)
- halo_model_integral_I_alpha_x_spline_loglog(bias_dict, hod_dict, hm_prec, alpha, type_x)
Calculates a spline of log10(k) and the log10 halo model quantity I_alpha_x which is needed to calculate the trispectrum.
- Parameters:
- See documentation of the halo_model_integral_I_alpha_x - method.
- Returns:
- integralX_splinelist of UnivariateSplines
with shape (sample_bins)
- halo_model_integral_I_alpha_xy(bias_dict, hod_dict, hm_prec, alpha, type_x, type_y)
Calculates quantities for the halo model.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- alphaint
Auxillary label
- type_xstring
“m” for matter
“g” for tracers
- type_ystring
“m” for matter
“g” for tracers
- Returns:
- integral_xyarray
- with shape (log10k_bins, log10k_bins,
sample_bins, sample_bins)
References
Dvornik et al. (2018), their Appendix A, Eq. (A15)
- halo_model_integral_I_alpha_xy_spline_loglog(bias_dict, hod_dict, hm_prec, alpha, type_x, type_y)
Calculates a spline of log10(k) and the log10 halo model quantity I_alpha_xy which is needed to calculate the trispectrum.
- Parameters:
- See documentation of the halo_model_integral_I_alpha_xy -
- method.
- Returns:
- integralXY_splinenested list of UnivariateSplines
with shape (sample_bins, sample_bins)
- hurly_x(bias_dict, hod_dict, type_x)
Calculates quantities for the halo model.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- type_xstring
‘m’ for matter (Eq. 23 in reference paper)
‘cen’ for centrals (Eq. 24 in reference paper)
‘sat’ for satellites (Eq. 25 in reference paper)
- Returns:
- hurly_xarray
with shape (log10k_bins, sample_bins, M_bins)
References
- Dvornik et al. (2018), their Sect 3.1.
- Note: The normalization is different, we use n_gal for all
cases.
- hurly_x_spline_logk(bias_dict, hod_dict, type_x)
Calculates a spline of log10(k) and the halo model quantity hurly_x which is needed to calculate the trispectrum.
- Parameters:
- See documentation of the hurly_x - method.
- Returns:
- hurly_xnested list of UnivariateSplines
with shape (sample_bins, M_bins)
- nbar(hod_dict)
Calculates the average number density of tracers given an HoD description, i.e., the integral of the mass function over the occupation number of satellite and central galaxies.
- Parameters:
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- Returns:
- nbararray
with unit 1 / (Mpc/h)^3 with shape (sample_bins)
- nbar_cen(hod_dict)
Calculates the average number density of central galaxies given an HoD description, i.e., the integral of the mass function over the occupation number of central galaxies.
- Parameters:
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- Returns:
- nbar_cenarray
with unit 1 / (Mpc/h)^3 with shape (sample_bins)
- nbar_sat(hod_dict)
Calculates the average number density of satellite galaxies given an HoD description, i.e., the integral of the mass function over the occupation number of satellite galaxies.
- Parameters:
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- Returns:
- nbar_satarray
with unit 1 / (Mpc/h)^3 with shape (sample_bins)
- set_spline_galaxy_stellar_mf(hod_dict)
Sets up the splines for the galaxy stellar mass function as private variables of the halo_model class for both satellites and centrals
- Parameters:
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- set_spline_galaxy_stellar_mf_bias(hod_dict, bias_dict, hm_prec)
Sets up the splines for the galaxy stellar mass function as private variables of the halo_model class for both satellites and centrals
- Parameters:
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- small_k_damping(mode, krange, scale=0.1)
Function to exponentially damp the power of the 1-halo term on large scales / small wavenumbers.
- Parameters:
- modestring
Can be either ‘damped’ or ‘none’ for damping and no damping, respectively.
- Returns:
- erf(k)array
with shape (len(krange)) for ‘damped’
- 1(k)array
with shape (len(krange)) for ‘none’
- uk(bias_dict, type='cen')
Calculates the normalized Fourier transform of the NFW density profile. Requires a mass-concentration relation and the definition of ‘overdensity’ (default : 200, can be adjusted in [halomodel evaluation]: ‘mdef_params’.
- Parameters:
- Mc_relationstring
mass-concentration relation
- Returns:
- u_karray
with shape(log10k_bins, M_bins)
- class cov_polyspectra.PolySpectra(zet, cov_dict, obs_dict, cosmo_dict, bias_dict, hod_dict, survey_params_dict, prec, read_in_tables)
Bases:
HaloModelThis class calculates the power spectra, power spectra responses, and trispectra that are required for the covariance in k-space. Spectra for matter and tracer are evaluated at a single redshift. Inherits the functionality of the HaloModel class.
- Attributes:
- zetfloat
Redshift at which the covariance should be evaluated.
- cov_dictdictionary
Specifies which terms of the covariance (Gaussian, non-Gaussian, super-sample covariance) should be calculated. To be passed from the read_input method of the Input class.
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- ‘COSEBIs’dictionary
Specifies the exact details of the projection to COSEBIs, e.g. the number of modes to be calculated.
- ‘bandpowers’dictionary
Specifies the exact details of the projection to bandpowers, e.g. the ell modes and their spacing.
- cosmo_dictdictionary
Specifies all cosmological parameters. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- read_in_tablesdictionary
with the following keys (To be passed from the read_input method of the FileInput class.) ‘zclust’ : dictionary
Look-up table for the clustering redshifts and their number of tomographic bins. Relevant for clustering and galaxy- galaxy lensing estimators.
- ‘zlens’dictionary
Look-up table for the lensing redshifts and their number of tomographic bins. Relevant for cosmic shear and galaxy- galaxy lensing estimators.
- ‘Pxy’dictionary
default : None Look-up table for the power spectra (matter-matter, tracer- tracer, matter-tracer, optional).
- ‘Cxy’dictionary
default : None Look-up table for the C_ell projected power spectra (matter- matter, tracer- tracer, matter-tracer, optional).
- ‘effbias’dictionary
default : None Look-up table for the effective bias as a function of redshift(optional).
- ‘mor’dictionary
default : None Look-up table for the mass-observable relation (optional).
- ‘occprob’dictionary
default : None Look-up table for the occupation probability as a function of halo mass per galaxy sample (optional).
- ‘occnum’dictionary
default : None Look-up table for the occupation number as a function of halo mass per galaxy sample (optional).
- ‘tri’: dictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- P_gg(bias_dict, hod_dict, hm_prec)
Either calculations the tracer-tracer power spectrum or interpolates the power spectrum from a look-up table for the k-range set in powspec_prec and redshift zet. Returns None, if Pgg is not needed for the Gaussian or super-sample covariance.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- Returns:
- Pggarray
with unit ? with shape (log10k bins, sample bins, sample bins)
References
Dvornik et al. (2018), their Sect 3.1., Eq. (16)
- P_gm(bias_dict, hod_dict, hm_prec)
Either calculations the matter-tracer power spectrum or interpolates the power spectrum from a look-up table for the k-range set in powspec_prec and redshift zet. Returns None, if Pgm is not needed for the Gaussian or super-sample covariance.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- Returns:
- Pgmarray
with unit ? with shape (log10k bins, sample bins)
References
Dvornik et al. (2018), their Sect 3.1., Eq. (17)
- P_mm(bias_dict, hod_dict, prec)
Either calculations the matter-matter power spectrum or interpolates the power spectrum from a look-up table for the k-range set in powspec_prec and redshift zet. Returns None, if Pmm is not needed for the Gaussian covariance.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- Returns:
- Pmmarray
with unit (h/Mpc)^3 [so far, needs to be changed] with shape (log10k bins, sample bins)
References
Dvornik et al. (2018), their Sect 3.1.
- __P_xy_1h(bias_dict, hod_dict, hm_prec, type_x, type_y)
Calculates the 1-halo contribution of the xy power spectra (with x,y either matter ‘m’, central ‘cen’, or satellite ‘sat’).
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- type_xstring
“m” for matter
“cen” for centrals
“sat” for satellites
- type_ystring
same as type_x
- Returns:
- integralarray
with unit ? with shape (log10k bins, sample bins, sample bins)
- __P_xy_2h(bias_dict, hod_dict, hm_prec, type_x, type_y)
Calculates the 2-halo contribution of the xy power spectra (with x,y either matter ‘m’, central ‘cen’, or satellite ‘sat’).
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- type_xstring
“m” for matter
“cen” for centrals
“sat” for satellites
- type_ystring
same as type_x
- Returns:
- integralXYarray
with unit ? with shape (log10k bins, sample bins)
References
Dvornik et al. (2018), their Sect 3.1, where the normalization in Eq. (24) and (25) is different, i.e. in their notation n_g.
- __bispec_pt(mu, ki, kj)
Auxiliary function to calculate the 3-halo term for the trispectra. Is only needed by the __calc_int_for_trispec_3h method.
- Parameters:
- mufloat
cosine of angle between the ki and kj vector
- kifloat
wavenumber
- kjfloat
wavenumber
- __calc_int_for_trispec_2h(phi, ki, kj)
Calculates the 2-halo term for the trispectra. Is only needed by the integration routine in the trispectra_234h method.
- Parameters:
- phifloat
angle between the ki and kj vector
- kifloat
wavenumber
- kjfloat
wavenumber
- __calc_int_for_trispec_3h(phi, ki, kj)
Calculates the 3-halo term for the trispectra. Is only needed by the integration routine in the trispectra_234h method.
- Parameters:
- See documentation of the __calc_int_for_trispec_2h - method.
- __calc_int_for_trispec_4h(phi, ki, kj)
Calculates the 4-halo term for the trispectra. Is only needed by the integration routine in the trispectra_234h method.
- Parameters:
- See documentation of the __calc_int_for_trispec_2h - method.
- __check_for_tabulated_trispectra(tri_tab)
Checks whether pre-tabulated trispectra are available. If necessary, interpolates the trispectra in redshift, extrapolation is not supported.
- Parameters:
- tri_tabdictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional) for different wavenumbers and redshifts. To be passed from the read_input method of the FileInput class.
- Returns:
- tri_gggg, tri_gggm, tri_ggmm, tri_gmgm, tri_mmgm, tri_mmmmlist of bools
- and
- trispec_gggg, trispec_gggm, trispec_ggmm, trispec_gmgm, trispec_mmgm, trispec_mmmmlist of arrays
with unit ? with shape (powspec_prec[‘log10k_bins’],
powspec_prec[‘log10k_bins’], sample bins, sample bins)
- __get_idxlist_for_trispec()
Returns a list which contains the indices of a matrix with shape (trispec_prec[‘log10k_bins’], trispec_prec[‘log10k_bins’], sample_dim, sample_dim), where we only loop over independent matrix elements. The matrix is symmetric in k-space and sample-space.
- Returns:
- idxlistlist
with length 4 indices per trispec_prec[‘log10k_bins’] *(trispec_prec[‘log10k_bins’]+1)/2 * sample*(sample_dim+1)/2 entries
- __poisson(lam, fac=0.9)
Computing poisson factors necessary for halomodel integrals and HoD functions for the trispectrum.
- Parameters:
- lamint
…
- facfloat
…
- Returns:
- resfloat
- __pt_kernel_f2(mu, ki, kj)
Auxiliary function to calculate the 3 and 4-halo term for the trispectra. Is only needed by the __bispec_pt and __calc_int_for_trispec_4h method.
- Parameters:
- See documentation of the __bispec_pt - method.
- __pt_kernel_f3(mu, ki, kj)
Auxiliary function to calculate the 4-halo term for the trispectra. Is only needed by the __calc_int_for_trispec_4h method.
- Parameters:
- See documentation of the __bispec_pt - method.
- __pt_kernel_g2(mu, ki, kj)
Auxiliary function to calculate the 4-halo term for the trispectra. Is only needed by the __calc_int_for_trispec_4h method.
- Parameters:
- See documentation of the __bispec_pt - method.
- __trispectra_1h(bias_dict, hod_dict, hm_prec, tri_gggg, tri_gggm, tri_ggmm, tri_gmgm, tri_mmgm, tri_mmmm)
Calculates the 1-halo term for the trispectra for all combinations of matter (‘m’) and tracer (‘g’). Uses the multiprocessing library to speed up the calculation with all available cores. Returns None, if a trispectrum term is not needed for the covariance or if it is available as a look-up table.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- tri_xxxxbool
Is False if this particular trispectrum is already available as a look-up table. ‘x’ is either ‘m’ for matter or ‘g’ for tracer.
- Returns:
- trispec1h_gggg, trispec1h_gggm, trispec1h_ggmm, trispec1h_gmgm, trispec1h_mmgm, trispec1h_mmmmlist of arrays
with unit ? with shape (tri log10k bins, tri log10k bins,
sample bins, sample bins)
References
Dvornik et al. (2018), their Appendix A, Eq. (A22)
- __trispectra_234h(bias_dict, hod_dict, hm_prec)
Calculates the 234-halo terms for the trispectra. Uses the multiprocessing library to speed up the calculation with all available cores.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- Returns:
- trispec_2h + trispec_3h + trispec_4harray
with unit ? with shape (tri log10k bins,tri log10k bins)
References
- Pielorz et al. (2010) for the formalism of the 234-halo term
following and fitting perturbation theory
- calc_int_for_trispec_4h(phi, ki, kj)
- get_trispec_files(output_dict, bias_dict, hod_dict, prec, zmax, deltaz=0.5, zmin=0)
Calculates and outputs the trispectra for all desired combinations of matter (‘m’) and tracer (‘g’) for all redshifts between zmin and zmax with deltaz steps in the k-range specified in trispec_prec.
- Parameters:
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- zmaxfloat
Maximum redshift for which the trispectrum should be calculated.
- deltazfloat
default : 0.5 Step size for which trispectra are calculated. zmin is increased until the redshift exceeds zmax.
- zminfloat
default : 0 Minimum redshift for which the trispectrum should be calculated.
- powspec_responses(bias_dict, hod_dict, hm_prec)
Calculates the power spectra responses del Pxy (k) / del delta_b. Returns None, if the a response term is not needed for the covariance.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- Returns:
- response_P_gg, response_P_gm, response_P_mmlist of arrays
with unit ? with shape (log10k bins, sample bins)
References
Dvornik et al. (2018), their Appendix A, Eq. (A12) - (A14)
- trispectra(output_dict, bias_dict, hod_dict, hm_prec, tri_tab)
Calculates the trispectra for all combinations of matter (‘m’) and tracer (‘g’). Extrapolates and interpolates the trispectra from the k-range specified in trispec_prec to the k-range in powspec_prec. Returns None, if a trispectrum term is not needed for the covariance.
- Parameters:
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- tri_tabdictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional) for different wavenumbers and redshifts. To be passed from the read_input method of the FileInput class.
- Returns:
- trispec_gggg, trispec_gggm, trispec_ggmm, trispec_gmgm, trispec_mmgm, trispec_mmmmlist of arrays
with unit ? with shape (log10k bins, log10k bins,
sample bins, sample bins)
References
Dvornik et al. (2018), their Appendix A, Eq. (A21), (A22) Pielorz et al. (2010) for the formalism of the 234-halo term
following and fitting perturbation theory
- update_mass_func(zet, bias_dict, hod_dict, prec)
Updates the redshift of the halo mass function and recalculates required, subsequent quantities which depend on redshift and are called multiple times to avoid overhead. Should be called if the halo mass function object already exists and only the only updated parameter is the redshift.
- Parameters:
- zetfloat
Redshift at which the covariance should be evaluated.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- class cov_k_space.CovKSpace(zet, cov_dict, obs_dict, cosmo_dict, bias_dict, hod_dict, survey_params_dict, prec, read_in_tables)
Bases:
PolySpectraThis class calculates the k-space covariance for power spectra estimators (matter-matter, tracer-tracer and tracer-matter) at a single redshift. Inherits the functionality of the PolySpectra class.
- Parameters:
- zetfloat
Redshift at which the covariance should be evaluated.
- cov_dictdictionary
Specifies which terms of the covariance (Gaussian, non-Gaussian, super-sample covariance) should be calculated. To be passed from the read_input method of the Input class.
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- ‘COSEBIs’dictionary
Specifies the exact details of the projection to COSEBIs, e.g. the number of modes to be calculated.
- ‘bandpowers’dictionary
Specifies the exact details of the projection to bandpowers, e.g. the ell modes and their spacing.
- cosmo_dictdictionary
Specifies all cosmological parameters. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- read_in_tablesdictionary
with the following keys (To be passed from the read_input method of the FileInput class.) ‘zclust’ : dictionary
Look-up table for the clustering redshifts and their number of tomographic bins. Relevant for clustering and galaxy- galaxy lensing estimators.
- ‘zlens’dictionary
Look-up table for the lensing redshifts and their number of tomographic bins. Relevant for cosmic shear and galaxy- galaxy lensing estimators.
- ‘Pxy’dictionary
default : None Look-up table for the power spectra (matter-matter, tracer- tracer, matter-tracer, optional).
- ‘Cxy’dictionary
default : None Look-up table for the C_ell projected power spectra (matter- matter, tracer- tracer, matter-tracer, optional).
- ‘effbias’dictionary
default : None Look-up table for the effective bias as a function of redshift(optional).
- ‘mor’dictionary
default : None Look-up table for the mass-observable relation (optional).
- ‘occprob’dictionary
default : None Look-up table for the occupation probability as a function of halo mass per galaxy sample (optional).
- ‘occnum’dictionary
default : None Look-up table for the occupation number as a function of halo mass per galaxy sample (optional).
- ‘tri’: dictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- Attributes:
- see PolySpectra class
- __covK_split_gaussian(survey_params_dict, tomo_clust_idx=0, tomo_lens_idx=0)
Calculates the Gaussian (disconnected) covariance in k-space between two observables. Explicitly, splits the full Gaussian covariances into a term depending on the power spectra, the shot-noise and a mix term. If the shot_noise is not explicitely given (i.e., survey_params[‘shot_noise_clust’] for clustering and survey_params[‘shot_noise_gamma’] for lensing) the Gaussian covariance will not contain any contributions of noise.
- Parameters:
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the ‘shot_noise_clust’ which is basically 1 / n_3dgal (from simulations or approximations probably) and ‘shot_noise_gamma’ which is ~ ellipticity dispersion over n_3dgal. To be passed from the read_input method of the Input class.
- tomo_clust_idxint
default : 0 If n_eff_clust is not None, tomo_clust_idx specifies which tomographic bin should be used for the calculation.
- tomo_lens_idxint
default : 0 If n_eff_lens is not None, tomo_lens_idx specifies which tomographic bin should be used for the calculation.
- Returns:
- gaussgggg_sva, gaussgggg_mix, gaussgggg_sn, gaussgggm_sva, gaussgggm_mix, gaussgggm_sn, gaussggmm_sva, gaussggmm_mix, gaussggmm_sn, gaussgmgm_sva, gaussgmgm_mix, gaussgmgm_sn, gaussmmgm_sva, gaussmmgm_mix, gaussmmgm_sn, gaussmmmm_sva, gaussmmmm_mix, gaussmmmm_snlist of arrays
- with shape (log10k bins, log10k bins,
sample bins, sample bins)
- calc_covK(output_dict, bias_dict, hod_dict, survey_params_dict, prec, read_in_tables, tomo_clust_idx=0, tomo_lens_idx=0)
Calculates the full covariance between two observables in k-space as specified in the config file.
- Parameters:
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass halo integrations in the model.
- read_in_tablesdictionary with the following keys (To be
passed from the read_input method of the FileInput class.) ‘tri’ : dictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional) for different wavenumbers and redshifts.
- tomo_clust_idxint
default : 0 If n_eff_clust is not None, tomo_clust_idx specifies which tomographic bin should be used for the calculation.
- tomo_lens_idxint
default : 0 If n_eff_lens is not None, tomo_lens_idx specifies which tomographic bin should be used for the calculation.
- Returns:
- gauss, nongauss, ssclist of arrays
- each with 6 entries for the observables
[‘gggg’, ‘gggm’, ‘ggmm’, ‘gmgm’, ‘mmgm’, ‘mmmm’]
- each entry with shape
- each with shape (log10k bins, log10k bins,
sample bins, sample bins)
- covK_gaussian(survey_params_dict, tomo_clust_idx=0, tomo_lens_idx=0)
Calculates the Gaussian (disconnected) covariance in k-space between two observables. If the shot_noise is not explicitely given (i.e., survey_params[‘shot_noise_clust’] for clustering and survey_params[‘shot_noise_gamma’] for lensing) the Gaussian covariance will not contain any contributions of noise.
- Parameters:
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the ‘shot_noise_clust’ which is basically 1 / n_3dgal (from simulations or approximations probably) and ‘shot_noise_gamma’ which is ~ ellipticity dispersion over n_3dgal. To be passed from the read_input method of the Input class.
- tomo_clust_idxint
default : 0 If n_eff_clust is not None, tomo_clust_idx specifies which tomographic bin should be used for the calculation.
- tomo_lens_idxint
default : 0 If n_eff_lens is not None, tomo_lens_idx specifies which tomographic bin should be used for the calculation.
- Returns:
- gaussgggg, gaussgggm, gaussggmm, gaussgmgm, gaussmmgm, gaussmmmm, gaussgggg_sn, gaussgmgm_sn, gaussmmmm_snlist of arrays
- with shape (log10k bins, log10k bins,
sample bins, sample bins)
- covK_non_gaussian(output_dict, bias_dict, hod_dict, hm_prec, tri_tab)
Calculates the non-Gaussian (connected) covariance in k-space between two observables.
- Parameters:
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- tri_tabdictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional) for different wavenumbers and redshifts. To be passed from the read_input method of the FileInput class.
- Returns:
- trigggg, trigggm, triggmm, trigmgm, trimmgm, trimmmmlist of arrays
- with shape (log10k bins, log10k bins,
sample bins, sample bins)
- covK_ssc(bias_dict, hod_dict, hm_prec)
Calculates the super-sample covariance in k-space between two observables.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model. To be passed from the read_input method of the Input class.
- Returns:
- sscgggg, sscgggm, sscggmm, sscgmgm, sscmmgm, sscmmmmlist of arrays
- with shape (log10k bins, log10k bins,
sample bins, sample bins)
- class cov_ell_space.CovELLSpace(cov_dict, obs_dict, output_dict, cosmo_dict, bias_dict, iA_dict, hod_dict, survey_params_dict, prec, read_in_tables)
Bases:
PolySpectraThis class calculates the ell-space covariance for angular power spectra estimators (kappa-kappa, tracer-tracer and tracer-kappa). Inherits the functionality of the PolySpectra class.
- Parameters:
- cov_dictdictionary
Specifies which terms of the covariance (Gaussian, non-Gaussian, super-sample covariance) should be calculated. To be passed from the read_input method of the Input class.
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space, e.g., ell_min/max and the number of ell-modes to be calculated.
- cosmo_dictdictionary
Specifies all cosmological parameters. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- iA_dict: dictionary
Specifies all the information about the intrinsic alignment model. To be passed from the read_input method in the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- read_in_tablesdictionary
with the following keys (To be passed from the read_input method of the FileInput class.) ‘zclust’ : dictionary
Look-up table for the clustering redshifts and their number of tomographic bins. Relevant for clustering and galaxy- galaxy lensing estimators.
- ‘zlens’dictionary
Look-up table for the lensing redshifts and their number of tomographic bins. Relevant for cosmic shear and galaxy- galaxy lensing estimators.
- ‘survey_area_clust’dictionary
Contains information about the survey footprint that is read from the fits file of the survey (processed by healpy). Possible keys: ‘area’, ‘ell’, ‘a_lm’
- ‘Pxy’dictionary
default : None Look-up table for the power spectra (matter-matter, tracer- tracer, matter-tracer, optional).
- ‘Cxy’dictionary
default : None Look-up table for the C_ell projected power spectra (matter- matter, tracer- tracer, matter-tracer, optional).
- ‘effbias’dictionary
default : None Look-up table for the effective bias as a function of redshift(optional).
- ‘mor’dictionary
default : None Look-up table for the mass-observable relation (optional).
- ‘occprob’dictionary
default : None Look-up table for the occupation probability as a function of halo mass per galaxy sample (optional).
- ‘occnum’dictionary
default : None Look-up table for the occupation number as a function of halo mass per galaxy sample (optional).
- ‘tri’: dictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- Attributes:
- see CovKSpace class
- ellrangearray
Multipoles at which the covariance is calculated
- deg2torad2float
Conversion factor from degrees to radian squared
- arcmin2torad2float
Conversion factor from arcminutes to radian squared
- spline_zclustlist
List of spline objects for the redshift distribution for each tomographic bin of the clustering analysis
- spline_zlenslist
List of spline objects for the redshift distribution for each tomographic bin of the lensing analysis
- los_integration_chiarray
Values of the comoving distance at which the line of sight integration is carried out.
- spline_z_of_chispline_object
…
- spline_lensweightlist
List of spline objects for the lensing weight for each tomographic bin of the lensing analysis
- Cell_ggarray
Array storing the C_ell of the clustering analysis with shape (# ell modes, # sample bins, # tomographic bins, # tomographic bins)
- Cell_gm, Cell_gkappaarray
Array storing the C_ell of the galaxy-galaxy lensing analysis with shape (# ell modes, # sample bins, # tomographic bins, # tomographic bins)
- Cell_mm, Cell_kappakappaarray
Array storing the C_ell of the cosmic shear analysis with shape (# ell modes, # tomographic bins, # tomographic bins)
- __bin_Gaussian(covELLspacesettings, survey_params_dict, covariance, field1_spec, field2_spec, field3_spec, field4_spec, probe12, probe34)
Auxillary function binning the Gaussian covariance matrix in ell-bins
- __bin_cov_ell_csmf(ellrange_12_ul, cov, unique_12)
Auxillary function binning the cross-covariance matrix between the SMF and the LSS in ell-bins.
- __bin_cov_ell_gauss(ellrange_12_ul, ellrange_34_ul, area_12, area_34, cov, unique_12, unique_34)
- __bin_cov_ell_nongauss(ellrange_12_ul, ellrange_34_ul, ellrange_12, ellrange_34, area_12, area_34, cov, connected, unique_12, unique_34)
- __bin_non_Gaussian(covELLspacesettings, survey_params_dict, covariance, field1_spec, field2_spec, field3_spec, field4_spec, probe12, probe34, connected)
Auxillary function binning the Non-Gaussian covariance matrix in ell-bins
- __calc_prefac6x2pt_covELL(prefac_noarea, tomo_shape, survey_area, survey_area2)
- __calc_prefac_covELL(covELLspacesettings, tomo_shape, survey_area, survey_area2=None)
Calculates the prefactor, 1/(2*ell+1)/f_sky, which is used if the pure ell-space covariance should be used for inference.
- __check_for_tabulated_Cells(Cxy_tab)
Checks wether previously caclulated Cells are stored in read in files as provided in the input
- Parameters:
- Cxy_tabdictionary
default : None Look-up table for the C_ell projected power spectra (matter- matter, tracer- tracer, matter-tracer, optional).
- Returns:
- [Cgg, Cgm, Cmm]: list of arrays
Contain the read in files for the Cells as previously specified. If none are specified, returns ‘None’
- [gg_tab_bool, gm_tab_bool, mm_tab_bool]boolean
Flags whether the input files have been specified and read
- __check_for_tabulated_Tells(Tuvxy_tab)
Checks wether previously caclulated trispectra are stored in read in files as provided in the input
- Parameters:
- Tuvxy_tabdictionary
default : None Look-up table for the T_ell projected tri-spectra (gggg, gggm, ggmm, gmgm , mmgm, mmmm, optional).
- Returns:
- [Tgggg, Tgggm, Tggmm, Tgmgm, Tmmgm, Tmmmm]: list of arrays
Contain the read in files for the Cells as previously specified. If none are specified, returns ‘None’
- __check_krange_support(obs_dict, cosmo_dict, bias_dict, hod_dict, prec)
Performs consistency checks whether the k-range support is big enough to house a given ell_range calculations for the Cells. If not, the ranges are updated accordingly and the user is notified.
- Parameters:
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space, e.g., ell_min/max and the number of ell-modes to be calculated.
- cosmo_dictdictionary
Specifies all cosmological parameters. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- __covELL_split_gaussian(covELLspacesettings, survey_params_dict, calc_prefac)
Calculates the Gaussian (disconnected) covariance in ell space for the specified observables and splits it into sample-variance (SVA), shot noise (SN) and SNxSVA(mix) terms.
- Parameters:
- covELLspacesettingsdictionary
Specifies the redshift spacing used for the line-of-sight integration.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- calc_prefacbool
default : True If True, returns the full Cell-covariance. If False, it omits the prefactor 1/(2*ell+1)/f_sky, where f_sky is the observed fraction on the sky. Alternatively, all prefactors are unity.
- Returns:
- gaussELLgggg_sva, gaussELLgggg_mix, gaussELLgggg_sn,
- gaussELLgggm_sva, gaussELLgggm_mix, gaussELLgggm_sn,
- gaussELLggmm_sva, gaussELLggmm_mix, gaussELLggmm_sn,
- gaussELLgmgm_sva, gaussELLgmgm_mix, gaussELLgmgm_sn,
- gaussELLmmgm_sva, gaussELLmmgm_mix, gaussELLmmgm_sn,
- gaussELLmmmm_sva, gaussELLmmmm_mix, gaussELLmmmm_sn: list of
arrays
- with shape (ell bins, ell bins,
sample bins, sample bins, n_tomo_clust/lens, n_tomo_clust/lens, n_tomo_clust/lens, n_tomo_clust/lens)
- __get_flat_index_spec(i_tomo, j_tomo, case)
- __get_updated_los_integration_chi(chi_min, chi_max, covELLspacesettings)
Returns an updated version of the line-of-sight integration range.
- Parameters:
- chimin, chimaxfloat
minimum and maximum comoving distance of the integration range
- covELLspacesettingsdictionary
Specifies the redshift spacing used for the line-of-sight integration.
- __set_lensweight_splines(covELLspacesettings, iA_dict)
Calculates and splines the lensing weight for later integration along the line-of-sight.
- Parameters:
- covELLspacesettingsdictionary
Specifies the redshift spacing used for the line-of-sight integration.
- __set_lensweight_splines_mu(covELLspacesettings)
Calculates and splines the lensing weight for later integration along the line-of-sight.
- Parameters:
- covELLspacesettingsdictionary
Specifies the redshift spacing used for the line-of-sight integration.
- __set_multipoles(covELLspacesettings)
Calculates the multioples at which the covariance is calculated. Also sets the multipoles for the binned ell-space covariance for the spectroscopic and photometric samples.
- Parameters:
- covELLspacesettingsdictionary
Specifies the multipoles at which the covariance is evaluated.
- Returns:
- ellrangearray
with shape (ell bins)
- __set_redshift_distribution_splines(covELLspacesettings, read_in_tables)
Sets the splines the redshift distributions for later integration along the line-of-sight.
- Parameters:
- covELLspacesettingsdictionary
Specifies the order of the polynomial for the interpolation of redshift distributions
- __update_los_integration_chi(chi_min, chi_max, covELLspacesettings)
Function to update the line-of-sight integration range.
- Parameters:
- chimin, chimaxfloat
minimum and maximum comoving distance of the integration range
- covELLspacesettingsdictionary
Specifies the redshift spacing used for the line-of-sight integration.
- calc_Cells_Limber(covELLspacesettings, bias_dict, iA_dict, hod_dict, prec, Cxy_tab)
Calculates the Limber projection of the power spectrum for all tracers and tomographic bin combinations over the ell range specified in covELLspacesettings
- Parameters:
- covELLspacesettingsdictionary
Specifies the redshift spacing used for the line-of-sight integration.
- bias_dictdictionary
Specifies all the information about the bias model. To be passedfrom the read_input method of the Input class.
- iA_dict: dictionary
Specifies all the information about the intrinsic alignment model. To be passed from the read_input method in the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the differentgalaxy populations. To be passed from the read_input method of the Input class.
- precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- Cxy_tabdictionary
Look-up table for the C_ell projected power spectra (matter- matter, tracer- tracer, matter-tracer).
- Returns:
- Cell_gg, Cell_gm, Cell_mmlist of arrays
Angular power spectra for the different tracers. They each have the shape (len(self.ellrange), self.sample_dim, self.n_tomo_clust, self.n_tomo_clust)
- calc_Cells_nonLimber(covELLspacesettings, Cxy_tab)
Calculates the non-Limber projection of the power spectrum for all tracers and tomographic bin combinations over the ell range specified in covELLspacesettings
- Parameters:
- covELLspacesettingsdictionary
Specifies the redshift spacing used for the line-of-sight integration.
- Cxy_tabdictionary
Look-up table for the C_ell projected power spectra (matter- matter, tracer- tracer, matter-tracer).
- Returns:
- None
Sets the private variables self.Cell_xx to the non-Limber version for multipoles below 2000
- calc_covELL(obs_dict, output_dict, bias_dict, hod_dict, survey_params_dict, prec, read_in_tables)
Calculates the full covariance between the specified observables in ell-space config file.
- Parameters:
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space, e.g., ell_min/max and the number of ell-modes to be calculated.
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- read_in_tablesdictionary
with the following keys (To be passed from the read_input method of the FileInput class.) ‘zclust’ : dictionary
Look-up table for the clustering redshifts and their number of tomographic bins. Relevant for clustering and galaxy- galaxy lensing estimators.
- ‘zlens’dictionary
Look-up table for the lensing redshifts and their number of tomographic bins. Relevant for cosmic shear and galaxy- galaxy lensing estimators.
- ‘survey_area_clust’dictionary
Contains information about the survey footprint that is read from the fits file of the survey (processed by healpy). Possible keys: ‘area’, ‘ell’, ‘a_lm’
- ‘Pxy’dictionary
default : None Look-up table for the power spectra (matter-matter, tracer- tracer, matter-tracer, optional).
- ‘Cxy’dictionary
default : None Look-up table for the C_ell projected power spectra (matter- matter, tracer- tracer, matter-tracer, optional).
- ‘effbias’dictionary
default : None Look-up table for the effective bias as a function of redshift(optional).
- ‘mor’dictionary
default : None Look-up table for the mass-observable relation (optional).
- ‘occprob’dictionary
default : None Look-up table for the occupation probability as a function of halo mass per galaxy sample (optional).
- ‘occnum’dictionary
default : None Look-up table for the occupation number as a function of halo mass per galaxy sample (optional).
- ‘tri’: dictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- Returns:
- gauss, nongauss, ssclist of arrays
- each with 6 entries for the observables
[‘gggg’, ‘gggm’, ‘ggmm’, ‘gmgm’, ‘mmgm’, ‘mmmm’]
- each entry with shape (if given in ini file)
- (ell bins, ell bins,
sample bins, sample bins, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens)
- calc_covELL_csmf(covELLspacesettings, survey_params_dict)
Calculates the covariance of the conditional stellar mass function and its cross-correlation with the tracers defined in the config file.
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- Returns:
- covELL_csmf_SN()
Calculates the shot noise component of the stellar mass function covariance matrix
- Returns:
- smf_snarray
with shape (csmf_mass_bins, csmf_mass_bins, csmf_tomo_bins, csmf_tomo_bins)
- covELL_csmf_SSC(survey_params_dict)
Calculates the SSC component of the stellar mass function covariance matrix
- Returns:
- smf_sscarray
with shape (csmf_mass_bins, csmf_mass_bins, csmf_tomo_bins, csmf_tomo_bins)
- covELL_csmf_cross_LSS_ssc(covELLspacesettings, survey_params_dict)
Calculates the super sample variance term for the stellar mass function cross LSS covariance
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space, e.g., ell_min/max and the number of ell-modes to be calculated.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- Returns:
- covELL_smf_cross_gg, covELL_smf_cross_gm, covELL_smf_cross_mmlist of arrays
with shapes (number of ell bins, number of smf bins, sample dims, n_tomo_smf, n_tomo_clust/lens, n_tomo_clust/lens)
- covELL_csmf_cross_LSS_sva(covELLspacesettings)
Calculates the sample variance term for the stellar mass function cross LSS covariance
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space, e.g., ell_min/max and the number of ell-modes to be calculated.
- Returns:
- covELL_smf_cross_gg, covELL_smf_cross_gm, covELL_smf_cross_mmlist of arrays
with shapes (number of ell bins, number of smf bins, sample dims, n_tomo_smf, n_tomo_clust/lens, n_tomo_clust/lens)
- covELL_gaussian(covELLspacesettings, survey_params_dict, calc_prefac=True)
Calculates the Gaussian (disconnected) covariance in ell space between two observables.
- Parameters:
- covELLspacesettingsdictionary
Specifies the redshift spacing used for the line-of-sight integration.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- calc_prefacbool
default : True If True, returns the full Cell-covariance. If False, it omits the prefactor 1/(2*ell+1)/f_sky, where f_sky is the observed fraction on the sky.
- Returns:
- gaussELLgggg, gaussELLgggm, gaussELLggmm,
- gaussELLgmgm, gaussELLmmgm, gaussELLmmmm,
- gaussELLgggg_sn, gaussELLgmgm_sn, gaussELLmmmm_snlist of
arrays
- with shape (ell bins, ell bins,
sample bins, sample bins, n_tomo_clust/lens, n_tomo_clust/lens, n_tomo_clust/lens, n_tomo_clust/lens)
- covELL_non_gaussian(covELLspacesettings, output_dict, bias_dict, hod_dict, prec, tri_tab)
Calculates the non-Gaussian part of the covariance using Limber’s approximation for all specified observables in ell-space config file.
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space, e.g., ell_min/max and the number of ell-modes to be calculated.
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- tri_tabdictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- Returns:
- nongausslist of arrays
- with 6 entries for the observables
[‘gggg’, ‘gggm’, ‘ggmm’, ‘gmgm’, ‘mmgm’, ‘mmmm’]
- each entry with shape (if given in ini file)
- (ell bins, ell bins,
sample bins, sample bins, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens)
- covELL_non_gaussian_non_Limber(covELLspacesettings, output_dict, bias_dict, hod_dict, prec, tri_tab, nongaussELLgggg)
Calculates the non-Gaussian part of the covariance using the full expression. This will slow down the code significantly. (still work in progress)
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space, e.g., ell_min/max and the number of ell-modes to be calculated.
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- tri_tabdictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- Returns:
- nongausslist of arrays
- with 6 entries for the observables
[‘gggg’, ‘gggm’, ‘ggmm’, ‘gmgm’, ‘mmgm’, ‘mmmm’]
- each entry with shape (if given in ini file)
- (ell bins, ell bins,
sample bins, sample bins, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens)
- covELL_ssc(bias_dict, hod_dict, prec, survey_params_dict, covELLspacesettings)
Calculates the super-sample part of the covariance using Limber’s approximation for all specified observables in ell-space config file.
- Parameters:
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space, e.g., ell_min/max and the number of ell-modes to be calculated.
- Returns:
- ssclist of arrays
- with 6 entries for the observables
[‘gggg’, ‘gggm’, ‘ggmm’, ‘gmgm’, ‘mmgm’, ‘mmmm’]
- each entry with shape (if given in ini file)
- (ell bins, ell bins,
sample bins, sample bins, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens)
- get_Cells(obs_dict, output_dict, bias_dict, iA_dict, hod_dict, prec, read_in_tables)
Calculates the angular power spectra either with the Limber or full non-Limber projection.
- Parameters:
- obs_dictdictionary
- with the following keys (To be passed from the read_input method
- of the Input class.)
- ‘observables’dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space, e.g., ell_min/max and the number of ell-modes to be calculated.
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- iA_dict: dictionary
Specifies all the information about the intrinsic alignment model. To be passed from the read_input method in the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- read_in_tablesdictionary
with the following keys (To be passed from the read_input method of the FileInput class.) ‘zclust’ : dictionary
Look-up table for the clustering redshifts and their number of tomographic bins. Relevant for clustering and galaxy- galaxy lensing estimators.
- ‘zlens’dictionary
Look-up table for the lensing redshifts and their number of tomographic bins. Relevant for cosmic shear and galaxy- galaxy lensing estimators.
- ‘survey_area_clust’dictionary
Contains information about the survey footprint that is read from the fits file of the survey (processed by healpy). Possible keys: ‘area’, ‘ell’, ‘a_lm’
- ‘Pxy’dictionary
default : None Look-up table for the power spectra (matter-matter, tracer- tracer, matter-tracer, optional).
- ‘Cxy’dictionary
default : None Look-up table for the C_ell projected power spectra (matter- matter, tracer- tracer, matter-tracer, optional).
- ‘effbias’dictionary
default : None Look-up table for the effective bias as a function of redshift(optional).
- ‘mor’dictionary
default : None Look-up table for the mass-observable relation (optional).
- ‘occprob’dictionary
default : None Look-up table for the occupation probability as a function of halo mass per galaxy sample (optional).
- ‘occnum’dictionary
default : None Look-up table for the occupation number as a function of halo mass per galaxy sample (optional).
- ‘tri’: dictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- class cov_theta_space.CovTHETASpace(cov_dict, obs_dict, output_dict, cosmo_dict, bias_dict, iA_dict, hod_dict, survey_params_dict, prec, read_in_tables)
Bases:
CovELLSpaceThis class calculates the real space covariance for shear-shear correlation functions xi_+/-, for position-shear correlations gamma_t (galaxy-galaxy lensing), and position-position correlations (galaxy clustering). Inherits the functionality of the CovELLSpace class.
- Parameters:
- cov_dictdictionary
Specifies which terms of the covariance (Gaussian, non-Gaussian, super-sample covariance) should be calculated. To be passed from the read_input method of the Input class.
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- ‘COSEBIs’dictionary
Specifies the exact details of the projection to COSEBIs, e.g. the number of modes to be calculated.
- ‘bandpowers’dictionary
Specifies the exact details of the projection to bandpowers, e.g. the ell modes and their spacing.
- cosmo_dictdictionary
Specifies all cosmological parameters. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- iA_dict: dictionary
Specifies all the information about the intrinsic alignment model. To be passed from the read_input method in the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- read_in_tablesdictionary
with the following keys (To be passed from the read_input method of the FileInput class.) ‘zclust’ : dictionary
Look-up table for the clustering redshifts and their number of tomographic bins. Relevant for clustering and galaxy- galaxy lensing estimators.
- ‘zlens’dictionary
Look-up table for the lensing redshifts and their number of tomographic bins. Relevant for cosmic shear and galaxy- galaxy lensing estimators.
- ‘survey_area_clust’dictionary
Contains information about the survey footprint that is read from the fits file of the survey (processed by healpy). Possible keys: ‘area’, ‘ell’, ‘a_lm’
- ‘Pxy’dictionary
default : None Look-up table for the power spectra (matter-matter, tracer- tracer, matter-tracer, optional).
- ‘Cxy’dictionary
default : None Look-up table for the C_ell projected power spectra (matter- matter, tracer- tracer, matter-tracer, optional).
- ‘effbias’dictionary
default : None Look-up table for the effective bias as a function of redshift(optional).
- ‘mor’dictionary
default : None Look-up table for the mass-observable relation (optional).
- ‘occprob’dictionary
default : None Look-up table for the occupation probability as a function of halo mass per galaxy sample (optional).
- ‘occnum’dictionary
default : None Look-up table for the occupation number as a function of halo mass per galaxy sample (optional).
- ‘tri’: dictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- __covTHETA_4pt_projection(covELLspacesettings, survey_params_dict, output_dict, bias_dict, hod_dict, hm_prec, tri_tab, calc_prefac, connected)
Auxillary function to integrate four point functions in real space between all observables specified in the input file.
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- tri_tabdictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- calc_prefacboolean
Specifies whether the ell-independent prefactor should be multiplied or not. Is set to True by default.
- connectedboolean
If True the trispectrum is considered If False the SSC is considered
- Returns:
- tri_ww, tri_wgt, tri_wxip, tri_wxim, tri_gtgt,
- tri_xipgt, tri_ximgt, tri_xipxip, tri_xipxim, tri_ximxim
- each entry with shape (theta bins, theta bins,
sample bins, sample bins, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens)
- __covTHETA_split_gaussian(covELLspacesettings, survey_params_dict, calc_prefac)
Calculates the Gaussian (disconnected) covariance in real space for the specified observables and splits it into sample-variance (SVA), shot noise (SN) and SNxSVA(mix) terms.
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- calc_prefacboolean
Specifies whether the ell-independent prefactor should be multiplied or not. Is set to True by default.
- __get_signal(obs_dict)
Calculates the clustering signal which might be used in the clustering-z covariance
- Parameters:
- Returns:
- Sets private variable self.w_gg with shape
- (observables[‘THETAspace’][‘theta_bins’], sample_dim, n_tomo_clust, n_tomo_clust)
- __get_triplet_mix_term(CovTHETASpace_settings, survey_params_dict, gauss_xipxip_mix, gauss_xipxim_mix, gauss_ximxim_mix)
Calculates the mixed term directly from a catalogue and therefore accounts for a more accurate prediction, especially at the survey edges
- __get_weights()
- __plot_signal(output_dict)
Creates a corner plot of the signal
- Parameters:
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- __set_theta_bins(covTHETAspacesettings)
Calculates the theta values at which the covariance is calculated
- Parameters:
- covTHETAspacesettingsdictionary
Specifies the angular bins at which the covariance is evaluated.
- Returns:
- thetabinsarray
with shape (observables[‘THETAspace’][‘theta_bins’])
- theta_ul_binsarray
bin boundaries with shape (observables[‘THETAspace’][‘theta_bins’] + 1)
- calc_covTHETA(obs_dict, output_dict, bias_dict, hod_dict, survey_params_dict, prec, read_in_tables)
Calculates the full covariance between all observables in real space as specified in the config file.
- Parameters:
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- ‘COSEBIs’dictionary
Specifies the exact details of the projection to COSEBIs, e.g. the number of modes to be calculated.
- ‘bandpowers’dictionary
Specifies the exact details of the projection to bandpowers, e.g. the ell modes and their spacing.
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- read_in_tablesdictionary
with the following keys (To be passed from the read_input method of the FileInput class.) ‘zclust’ : dictionary
Look-up table for the clustering redshifts and their number of tomographic bins. Relevant for clustering and galaxy- galaxy lensing estimators.
- ‘zlens’dictionary
Look-up table for the lensing redshifts and their number of tomographic bins. Relevant for cosmic shear and galaxy- galaxy lensing estimators.
- ‘survey_area_clust’dictionary
Contains information about the survey footprint that is read from the fits file of the survey (processed by healpy). Possible keys: ‘area’, ‘ell’, ‘a_lm’
- ‘Pxy’dictionary
default : None Look-up table for the power spectra (matter-matter, tracer- tracer, matter-tracer, optional).
- ‘Cxy’dictionary
default : None Look-up table for the C_ell projected power spectra (matter- matter, tracer- tracer, matter-tracer, optional).
- ‘effbias’dictionary
default : None Look-up table for the effective bias as a function of redshift(optional).
- ‘mor’dictionary
default : None Look-up table for the mass-observable relation (optional).
- ‘occprob’dictionary
default : None Look-up table for the occupation probability as a function of halo mass per galaxy sample (optional).
- ‘occnum’dictionary
default : None Look-up table for the occupation number as a function of halo mass per galaxy sample (optional).
- ‘tri’: dictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- Returns:
- gauss, nongauss, ssclist of arrays
- each with 10 entries for the observables
- [‘ww’, ‘wgt’, ‘wxi+’, ‘wxi-’, ‘gtgt’, ‘xi+gt’,
‘xigt-’, ‘xi+xi+’, ‘xi+xi-’, ‘xi-xi-‘]
- each entry with shape (theta bins, theta bins,
sample bins, sample bins, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens)
- covTHETA_gaussian(covELLspacesettings, survey_params_dict, calc_prefac=True)
Calculates the Gaussian (disconnected) covariance in real space for the all specified observables.
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- calc_prefacboolean
Specifies whether the ell-independent prefactor should be multiplied or not. Is set to True by default.
- Returns:
- gauss_ww, gauss_wgt, gauss_wxip, gauss_wxim, gauss_gtgt, gauss_xipgt, gauss_ximgt, gauss_xipxip, gauss_xipxim, gauss_ximxim, gauss_ww_sn, gauss_gtgt_sn, gauss_xipm_snlist of arrays
- with shape (theta bins, theta bins,
sample bins, sample bins, n_tomo_clust/lens, n_tomo_clust/lens, n_tomo_clust/lens, n_tomo_clust/lens)
- covTHETA_non_gaussian(covELLspacesettings, survey_params_dict, output_dict, bias_dict, hod_dict, hm_prec, tri_tab, calc_prefac)
Calculates the non-Gaussian covariance between all observables in real space as specified in the config file.
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- tri_tabdictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- calc_prefacboolean
Specifies whether the ell-independent prefactor should be multiplied or not. Is set to True by default.
- Returns:
- nongauss_ww, nongauss_wgt, nongauss_wxip, nongauss_wxim, nongauss_gtgt,
- nongauss_xipgt, nongauss_ximgt, nongauss_xipxip, nongauss_xipxim, nongauss_ximxim
- each entry with shape (theta bins, theta bins,
sample bins, sample bins, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens)
- covTHETA_ssc(covELLspacesettings, survey_params_dict, output_dict, bias_dict, hod_dict, hm_prec, tri_tab, calc_prefac)
Calculates the super sample covariance between all observables in real space as specified in the config file.
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- tri_tabdictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- calc_prefacboolean
Specifies whether the ell-independent prefactor should be multiplied or not. Is set to True by default.
- Returns:
- ssc_ww, ssc_wgt, ssc_wxip, ssc_wxim, ssc_gtgt, ssc_xipgt, ssc_ximgt, ssc_xipxip, ssc_xipxim, ssc_ximxim
- each entry with shape (theta bins, theta bins,
sample bins, sample bins, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens)
- class cov_bandpowers.CovBandPowers(cov_dict, obs_dict, output_dict, cosmo_dict, bias_dict, iA_dict, hod_dict, survey_params_dict, prec, read_in_tables)
Bases:
CovTHETASpaceThis class calculates the bandpower covariance for all probes specified. The calculations are carried out using the realspace covariance. All functionality from CovTHETASpace is inherited. The bandpower covariance is, however, calculated from ell space.
- Parameters:
- cov_dictdictionary
Specifies which terms of the covariance (Gaussian, non-Gaussian, super-sample covariance) should be calculated. To be passed from the read_input method of the Input class.
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- ‘bandpowers’dictionary
Specifies the exact details for the bandpower covariance.
- cosmo_dictdictionary
Specifies all cosmological parameters. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- iA_dict: dictionary
Specifies all the information about the intrinsic alignment model. To be passed from the read_input method in the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- read_in_tablesdictionary
with the following keys (To be passed from the read_input method of the FileInput class.) ‘zclust’ : dictionary
Look-up table for the clustering redshifts and their number of tomographic bins. Relevant for clustering and galaxy- galaxy lensing estimators.
- ‘zlens’dictionary
Look-up table for the lensing redshifts and their number of tomographic bins. Relevant for cosmic shear and galaxy- galaxy lensing estimators.
- ‘survey_area_clust’dictionary
Contains information about the survey footprint that is read from the fits file of the survey (processed by healpy). Possible keys: ‘area’, ‘ell’, ‘a_lm’
- ‘Pxy’dictionary
default : None Look-up table for the power spectra (matter-matter, tracer- tracer, matter-tracer, optional).
- ‘Cxy’dictionary
default : None Look-up table for the C_ell projected power spectra (matter- matter, tracer- tracer, matter-tracer, optional).
- ‘effbias’dictionary
default : None Look-up table for the effective bias as a function of redshift(optional).
- ‘mor’dictionary
default : None Look-up table for the mass-observable relation (optional).
- ‘occprob’dictionary
default : None Look-up table for the occupation probability as a function of halo mass per galaxy sample (optional).
- ‘occnum’dictionary
default : None Look-up table for the occupation number as a function of halo mass per galaxy sample (optional).
- ‘tri’: dictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- __call_levin_many_args_WE_non_par(ells, ell_up, ell_lo, theta_range, T_of_theta)
Auxillary function for the calculation of the weight functions for the bandpowers. Carries out the integrals over the Bessel functions in parallel for many arguments.
- Returns:
- result_WEE, result_WEB, result_WnEarrays
The 3 weight for bandpower in a single ell_band but at all ells. Have the same length as ells
- __covbandpowers_4pt_projection(covELLspacesettings, survey_params_dict, output_dict, bias_dict, hod_dict, prec, tri_tab, connected)
Auxillary function to integrate four point functions from ell space to bandpower space for all observables specified in the input file.
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- tri_tabdictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- connectedboolean
If True the trispectrum is considered If False the SSC is considered
- Returns:
- nongauss_CEgggg, nongauss_CEgggm, nongauss_CEggmm, nongauss_CBggmm, nongauss_CEgmgm, nongauss_CEmmgm, nongauss_CBmmgm, nongauss_CEEmmmm, nongauss_CEBmmmm, nongauss_CBBmmmm
- each entry with shape (ell bins, ell bins,
sample bins, sample bins, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens)
- __covbandpowers_split_gaussian(obs_dict, survey_params_dict)
Calculates the Gaussian (disconnected) covariance for band powers for the specified observables and splits it into sample-variance (SVA), shot noise (SN) and SNxSVA(mix) terms.
- Parameters:
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- ‘bandpowers’dictionary
Specifies the exact details for the bandpower covariance.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- calc_prefacboolean
Specifies whether the ell-independent prefactor should be multiplied or not. Is set to True by default.
- __get_Hann_window(obs_dict)
Precomputes the Hann window for the apodisation, yielding the function T(theta).
- __get_WXY()
Function precomputing bandpower weight functions WEE, WEB and WnE for later integration
- __get_bandpowers()
Calculates the signal of the Bandpowers in all tomographic bin combination and all tracers specified.
- __get_norm()
Precomputes the normalisation for the band powers
- __get_shotnoise_integrals()
Function precomputing the integrals for the shot/shape noise over theta
- __set_multipoles(covbandpowersettings)
Calculates the (bandpower) multioples at which the covariance is calculated
- Parameters:
- covbandpowersettingsdictionary
Specifies the multipoles at which the covariance for bandpowers is evaluated.
- Returns:
- ellrangearray
with shape (ell bins)
- calc_covbandpowers(obs_dict, output_dict, bias_dict, hod_dict, survey_params_dict, prec, read_in_tables)
Calculates the full covariance between all observables for bandpowers as specified in the config file.
- Parameters:
- obs_dictdictionary
- with the following keys (To be passed from the read_input method
- of the Input class.)
- ‘observables’dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- precdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘hm’ : dictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- ‘powspec’dictionary
Contains precision information about the power spectra, this includes k-range and spacing.
- ‘trispec’dictionary
Contains precision information about the trispectra, this includes k-range and spacing and the desired precision limits.
- read_in_tablesdictionary
with the following keys (To be passed from the read_input method of the FileInput class.) ‘zclust’ : dictionary
Look-up table for the clustering redshifts and their number of tomographic bins. Relevant for clustering and galaxy- galaxy lensing estimators.
- ‘zlens’dictionary
Look-up table for the lensing redshifts and their number of tomographic bins. Relevant for cosmic shear and galaxy- galaxy lensing estimators.
- ‘survey_area_clust’dictionary
Contains information about the survey footprint that is read from the fits file of the survey (processed by healpy). Possible keys: ‘area’, ‘ell’, ‘a_lm’
- ‘Pxy’dictionary
default : None Look-up table for the power spectra (matter-matter, tracer- tracer, matter-tracer, optional).
- ‘Cxy’dictionary
default : None Look-up table for the C_ell projected power spectra (matter- matter, tracer- tracer, matter-tracer, optional).
- ‘effbias’dictionary
default : None Look-up table for the effective bias as a function of redshift(optional).
- ‘mor’dictionary
default : None Look-up table for the mass-observable relation (optional).
- ‘occprob’dictionary
default : None Look-up table for the occupation probability as a function of halo mass per galaxy sample (optional).
- ‘occnum’dictionary
default : None Look-up table for the occupation number as a function of halo mass per galaxy sample (optional).
- ‘tri’: dictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- Returns:
- gauss, nongauss, ssclist of arrays
- each with 10 entries for the observables
- [‘CEgggg’, ‘CEgggm’, ‘CEggmm’, ‘CBggmm’, ‘CEgmgm’, ‘CEmmgm’,
‘CBmmgm’, ‘CEEmmmm’, ‘CEBmmmm’, ‘CBBmmmm’]
- each entry with shape (theta bins, theta bins,
sample bins, sample bins, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens)
- covbandpowers_gaussian(obs_dict, survey_params_dict)
Calculates the Gaussian (disconnected) covariance for bandpowers for the all specified observables.
- Parameters:
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- ‘bandpowers’dictionary
Specifies the exact details for the bandpower covariance.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- Returns:
- Depending whether split_gaussian is true or not.
- split_gauss == True:
gauss_BPgggg_sva, gauss_BPgggg_mix, gauss_BPgggg_sn, gauss_BPgggm_sva, gauss_BPgggm_mix, gauss_BPgggm_sn, gauss_BPEggmm_sva, gauss_BPEggmm_mix, gauss_BPEggmm_sn, gauss_BPBggmm_sva, gauss_BPBggmm_mix, gauss_BPBggmm_sn, gauss_BPgmgm_sva, gauss_BPgmgm_mix, gauss_BPgmgm_sn, gauss_BPEmmgm_sva, gauss_BPEmmgm_mix, gauss_BPEmmgm_sn, gauss_BPBmmgm_sva, gauss_BPBmmgm_mix, gauss_BPBmmgm_sn, gauss_BPEEmmmm_sva, gauss_BPEEmmmm_mix, gauss_BPEEmmmm_sn, gauss_BPEBmmmm_sva, gauss_BPEBmmmm_mix, gauss_BPEBmmmm_sn, gauss_BPBBmmmm_sva, gauss_BPBBmmmm_mix, gauss_BPBBmmmm_sn : list of arrays
- each with shape (ell bins, ell bins,
sample bins, sample bins, n_tomo_clust/lens, n_tomo_clust/lens, n_tomo_clust/lens, n_tomo_clust/lens)
- split_gauss == False
gauss_BPgggg, gauss_BPgggm, gauss_BPEggmm, gauss_BPBggmm, gauss_BPgmgm, gauss_BPEmmgm, gauss_BPBmmgm, gauss_BPEEmmmm, gauss_BPEBmmmm, gauss_BPBBmmmm, gauss_BPgggg_sn, gauss_BPgmgm_sn, gauss_BPEEmmmm_sn, gauss_BPBBmmmm_sn
- each with shape (ell bins, ell bins,
sample bins, sample bins, n_tomo_clust/lens, n_tomo_clust/lens, n_tomo_clust/lens, n_tomo_clust/lens)
- Note
- The shot-noise terms are denoted with ‘_sn’. To get the full
- covariance contribution to the diagonal terms of the covariance
- matrix, one needs to add gauss_xy + gauss_xy_sn. They
- are kept separated.
- covbandpowers_non_gaussian(covELLspacesettings, survey_params_dict, output_dict, bias_dict, hod_dict, prec, tri_tab)
Calculates the non-Gaussian covariance between all observables for the band powers as specified in the config file.
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- tri_tabdictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- Returns:
- nongauss_BPgggg, nongauss_BPgggm, nongauss_BPEggmm, nongauss_BPBggmm, nongauss_BPgmgm, nongauss_BPEmmgm, nongauss_BPBmmgm, nongauss_BPEEmmmm, nongauss_BPEBmmmm, nongauss_BPBBmmmmlist of arrays
- each entry with shape (ell bins, ell bins,
sample bins, sample bins, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens)
- covbandpowers_ssc(covELLspacesettings, survey_params_dict, output_dict, bias_dict, hod_dict, prec, tri_tab)
Calculates the super sample covariance between all observables for bandpowers as specified in the config file.
- Parameters:
- covELLspacesettingsdictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- output_dictdictionary
Specifies whether a file for the trispectra should be written to save computational time in the future. Gives the full path and name for the output file. To be passed from the read_input method of the Input class.
- bias_dictdictionary
Specifies all the information about the bias model. To be passed from the read_input method of the Input class.
- hod_dictdictionary
Specifies all the information about the halo occupation distribution used. This defines the shot noise level of the covariance and includes the mass bin definition of the different galaxy populations. To be passed from the read_input method of the Input class.
- survey_params_dictdictionary
Specifies all the information unique to a specific survey. Relevant values are the effective number density of galaxies for all tomographic bins as well as the ellipticity dispersion for galaxy shapes. To be passed from the read_input method of the Input class.
- hm_precdictionary
Contains precision information about the HaloModel (also, see hmf documentation by Steven Murray), this includes mass range and spacing for the mass integrations in the halo model.
- tri_tabdictionary
Look-up table for the trispectra (for all combinations of matter ‘m’ and tracer ‘g’, optional). Possible keys: ‘’, ‘z’, ‘mmmm’, ‘mmgm’, ‘gmgm’, ‘ggmm’, ‘gggm’, ‘gggg’
- Returns:
- nongauss_BPgggg, nongauss_BPgggm, nongauss_BPEggmm, nongauss_BPBggmm, nongauss_BPgmgm, nongauss_BPEmmgm, nongauss_BPBmmgm, nongauss_BPEEmmmm, nongauss_BPEBmmmm, nongauss_BPBBmmmmlist of arrays
- each entry with shape (ell bins, ell bins,
sample bins, sample bins, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens, no_tomo_clustlens)
- class cov_output.Output(output_dict, projected_clust=None, projected_lens=None)
Bases:
objectClass writing the output of the OneCovariance code. Methods of this class collect all the necessary blocks of the covariance matrix.
- __add_string_to_filename(addin, fname)
- __check_filetype()
- __check_for_empty_input(out, shape)
- __correlation_matrix(cov)
- __create_matrix(covlist, is_i_smaller_j, is_m_smaller_n, is_ij_lensing=False, is_mn_lensing=False)
- __create_matrix_arbitrary(covlist, is_i_smaller_j, is_m_smaller_n, probe1, probe2, summary, is_ij_lensing=False, is_mn_lensing=False)
- __create_matrix_arbitrary_diagonal_clustering(covlist, is_ij_clustering, is_mn_clustering, probe1, probe2, summary, is_ij_lensing=False, is_mn_lensing=False)
- __create_matrix_csmf(covlist, want_diagonal_csmf=False)
- __create_matrix_csmf_cross_LSS(covlist, is_i_smaller_j, want_diagonal_csmf=False)
- __create_matrix_csmf_cross_LSS_arbitrary(covlist, probe, summary, is_i_smaller_j, want_diagonal_csmf=False)
- __create_matrix_csmf_cross_LSS_diagonal_clustering(covlist, is_ij_clustering, want_diagonal_csmf=False, is_ij_lensing=False)
- __create_matrix_csmf_cross_LSS_diagonal_clustering_arbitrary(covlist, probe, summary, is_i_smaller_j, want_diagonal_csmf=False, is_ij_lensing=False)
- __create_matrix_diagonal(covlist, diagonal_1, diagonal_2, is_i_smaller_j, is_m_smaller_n)
- __create_matrix_diagonal_clustering(covlist, is_ij_clustering, is_mn_clustering, is_ij_lensing=False, is_mn_lensing=False)
- __get_idxlist(proj_quant, sampledim)
- __get_obslist(obs_dict, xipm=False)
- __get_sampledim(gauss, nongauss, ssc)
- __get_tomodim(gauss, nongauss, ssc)
- __mesh_2d_matrix_together(covdiag, covoff)
- __none_to_zero(gauss, nongauss, ssc)
- __write_cov_list(cov_dict, obs_dict, n_tomo_clust, n_tomo_lens, sampledim, proj_quant, gauss, nongauss, ssc, fct_args)
- __write_cov_list_arbitrary(cov_dict, obs_dict, n_tomo_clust, n_tomo_lens, sampledim, read_in_tables, gauss, nongauss, ssc, fct_args)
- __write_cov_list_arbitrary_cosmosis_style(cov_dict, obs_dict, n_tomo_clust, n_tomo_lens, sampledim, read_in_tables, gauss, nongauss, ssc, fct_args)
- __write_cov_list_cosmosis_style(cov_dict, obs_dict, n_tomo_clust, n_tomo_lens, sampledim, proj_quant, gauss, nongauss, ssc, fct_args)
- __write_cov_matrix_arbitrary(obs_dict, cov_dict, n_tomo_clust, n_tomo_lens, sampledim, read_in_tables, gauss, nongauss, ssc, fct_args)
- __write_cov_matrix_new(obs_dict, cov_dict, n_tomo_clust, n_tomo_lens, sampledim, proj_quant, gauss, nongauss, ssc, fct_args)
- plot_corrcoeff_matrix(obs_dict, covmatrix, cov_diag, proj_quant, n_tomo_clust, n_tomo_lens, sampledim, filename=None, fct_args=None)
Plots the Pearson correlation coefficient of the covariance matrix to a file depending on the specifications in the config.ini.
- Parameters:
- cov_dictdictionary
Specifies which terms of the covariance (Gaussian, non-Gaussian, super-sample covariance) should be calculated. To be passed from the read_input method of the Input class.
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- ‘COSEBIs’dictionary
Specifies the exact details of the projection to COSEBIs, e.g. the number of modes to be calculated.
- ‘bandpowers’dictionary
Specifies the exact details of the projection to bandpowers, e.g. the ell modes and their spacing.
- covmatrix2d array
The full covariance matrix with all contributions
- cov_diag2d array
The diagonal block part of the covariance matrix
- n_tomo_clustint
Number of clustering (lens) bins
- n_tomo_lensint
Number of lensing (source) bins
- sampledimint
Number of sample bins
- filenamestr
Filename of the plot
- plot_corrcoeff_matrix_6x2pt(obs_dict, covmatrix, cov_diag, proj_quant, n_tomo_clust, n_tomo_lens, sampledim, filename=None, fct_args=None)
Plots the Pearson correlation coefficient of the covariance matrix to a file depending on the specifications in the config.ini.
- Parameters:
- cov_dictdictionary
Specifies which terms of the covariance (Gaussian, non-Gaussian, super-sample covariance) should be calculated. To be passed from the read_input method of the Input class.
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- ‘COSEBIs’dictionary
Specifies the exact details of the projection to COSEBIs, e.g. the number of modes to be calculated.
- ‘bandpowers’dictionary
Specifies the exact details of the projection to bandpowers, e.g. the ell modes and their spacing.
- covmatrix2d array
The full covariance matrix with all contributions
- cov_diag2d array
The diagonal block part of the covariance matrix
- n_tomo_clustint
Number of clustering (lens) bins
- n_tomo_lensint
Number of lensing (source) bins
- sampledimint
Number of sample bins
- filenamestr
Filename of the plot
- plot_corrcoeff_matrix_arbitrary(obs_dict, covmatrix, cov_diag, summary, n_tomo_clust, n_tomo_lens, sampledim, filename=None, fct_args=None)
Plots the Pearson correlation coefficient of the covariance matrix to a file depending on the specifications in the config.ini.
- Parameters:
- cov_dictdictionary
Specifies which terms of the covariance (Gaussian, non-Gaussian, super-sample covariance) should be calculated. To be passed from the read_input method of the Input class.
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- ‘COSEBIs’dictionary
Specifies the exact details of the projection to COSEBIs, e.g. the number of modes to be calculated.
- ‘bandpowers’dictionary
Specifies the exact details of the projection to bandpowers, e.g. the ell modes and their spacing.
- covmatrix2d array
The full covariance matrix with all contributions
- cov_diag2d array
The diagonal block part of the covariance matrix
- n_tomo_clustint
Number of clustering (lens) bins
- n_tomo_lensint
Number of lensing (source) bins
- sampledimint
Number of sample bins
- filenamestr
Filename of the plot
- project_to_2d(mode, covmatrix, tomo1=None, tomo2=None)
- project_to_2d_notomo(covmatrix)
- select_tomographic_bins(obs_dict, proj_quant, n_tomo_clust, n_tomo_lens, full_covariance)
- select_tomographic_bins_arbitrary(obs_dict, summary, n_tomo_clust, n_tomo_lens, full_covariance)
- write_Cells(ellrange, n_tomo_clust, n_tomo_lens, Cells)
- write_arbitrary_cov(cov_dict, obs_dict, n_tomo_clust, n_tomo_lens, read_in_tables, gauss, nongauss, ssc)
Writes the covariance matrix to a file depending on the specifications in the config.ini.
- Parameters:
- cov_dictdictionary
Specifies which terms of the covariance (Gaussian, non-Gaussian, super-sample covariance) should be calculated. To be passed from the read_input method of the Input class.
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- ‘COSEBIs’dictionary
Specifies the exact details of the projection to COSEBIs, e.g. the number of modes to be calculated.
- ‘bandpowers’dictionary
Specifies the exact details of the projection to bandpowers, e.g. the ell modes and their spacing.
- n_tomo_clustint
Number of clustering (lens) bins
- n_tomo_lensint
Number of lensing (source) bins
- proj_quantarray
The projected quantity associated with the covariance, e.g. theta, or ell
- gausslist of arrays
Gaussian covariance split into the different components
- nongausslist of arrays
Non-Gaussian covariance
- ssclist of arrays
Supersample covariance
- write_cov(cov_dict, obs_dict, n_tomo_clust, n_tomo_lens, proj_quant, gauss, nongauss, ssc)
Writes the covariance matrix to a file depending on the specifications in the config.ini.
- Parameters:
- cov_dictdictionary
Specifies which terms of the covariance (Gaussian, non-Gaussian, super-sample covariance) should be calculated. To be passed from the read_input method of the Input class.
- obs_dictdictionary
with the following keys (To be passed from the read_input method of the Input class.) ‘observables’ : dictionary
Specifies which observables (cosmic shear, galaxy-galaxy lensing and/or clustering) should be calculated. Also, indicates whether cross-terms are evaluated.
- ‘ELLspace’dictionary
Specifies the exact details of the projection to ell space. The projection from wavefactor k to angular scale ell is done first, followed by the projection to real space in this class
- ‘THETAspace’dictionary
Specifies the exact details of the projection to real space, e.g., theta_min/max and the number of theta bins to be calculated.
- ‘COSEBIs’dictionary
Specifies the exact details of the projection to COSEBIs, e.g. the number of modes to be calculated.
- ‘bandpowers’dictionary
Specifies the exact details of the projection to bandpowers, e.g. the ell modes and their spacing.
- n_tomo_clustint
Number of clustering (lens) bins
- n_tomo_lensint
Number of lensing (source) bins
- proj_quantarray
The projected quantity associated with the covariance, e.g. theta, or ell
- gausslist of arrays
Gaussian covariance split into the different components
- nongausslist of arrays
Non-Gaussian covariance
- ssclist of arrays
Supersample covariance
- write_trispectra(zet, krange, sampledim, trispec, tri_bool)