|
FML
|
This class reads transfer/power-spectrum data from the output of a Einstein-Boltzmann solver. More...
#include <CAMBReader.h>
Public Member Functions | |
| LinearTransferData () | |
| LinearTransferData (std::string fileformat) | |
| LinearTransferData (double Omegab, double OmegaCDM, double OmegaMNu, double kpivot_mpc, double As, double ns, double h, std::string fileformat="CAMB") | |
| operator bool () const | |
| Has the splines been created? | |
| void | read_transfer (std::string infofilename, bool verbose=false) |
| Read the infofile, read transferfiles listed in that and make splines of T(k,z) | |
| DVector2D | read_transfer_single (std::string filename) const |
| Read a single transfer function. | |
| std::pair< DVector, DVector > | read_power_single (std::string filename) const |
| Read a single power-spectrum file. | |
| double | get_cdm_transfer_function (double k_hmpc, double a) const |
| CDM transfer function (T = Delta/k^2) in units of Mpc^2. | |
| double | get_baryon_transfer_function (double k_hmpc, double a) const |
| Baryon transfer function (T = Delta/k^2) in units of Mpc^2. | |
| double | get_photon_transfer_function (double k_hmpc, double a) const |
| Photon transfer function (T = Delta/k^2) in units of Mpc^2. | |
| double | get_neutrino_transfer_function (double k_hmpc, double a) const |
| Neutrino transfer function (T = Delta/k^2) in units of Mpc^2. | |
| double | get_massive_neutrino_transfer_function (double k_hmpc, double a) const |
| Massive neutrino transfer function (T = Delta/k^2) in units of Mpc^2. | |
| double | get_cdm_baryon_transfer_function (double k_hmpc, double a) const |
| Weighted CDM+Baryon transfer function (T = Delta/k^2) in units of Mpc^2 Since baryons are CDM in the simulations this is the one to use. | |
| double | get_total_transfer_function (double k_hmpc, double a) const |
| Total (CDM+b+nu) transfer function (T = Delta/k^2) in units of Mpc^2. | |
| double | get_weyl_transfer_function (double k_hmpc, double a) const |
| Weyl transfer function. | |
| double | get_newtonian_velocity_divergence_transfer (int species, double k_hmpc, double a) const |
| theta/(aH R), in Newtonian gauge. | |
| double | get_baryon_growth_rate (double k_hmpc, double a) const |
| Weighted baryon growth rate. | |
| double | get_cdm_baryon_growth_rate (double k_hmpc, double a) const |
| Weighted CDM+Baryon growth rate. | |
| double | get_cdm_growth_rate (double k_hmpc, double a) const |
| CDM growth rate. | |
| double | get_massive_neutrino_growth_rate (double k_hmpc, double a) const |
| Massive neutrino growth rate. | |
| double | get_total_growth_rate (double k_hmpc, double a) const |
| Total (CDM+b+nu) growth rate. | |
| double | get_primordial_power_spectrum (double k_hmpc) const |
| Primordial power-spectrum today in units of (Mpc/h)^3. | |
| double | get_cdm_baryon_power_spectrum (double k_hmpc, double a) const |
| (CDM+b) power-spectrum in units of (Mpc/h)^3 | |
| double | get_massive_neutrino_power_spectrum (double k_hmpc, double a) const |
| Massive neutrino power-spectrum in units of (Mpc/h)^3. | |
| double | get_total_power_spectrum (double k_hmpc, double a) const |
| Total (CDM+b+nu) power-spectrum in units of (Mpc/h)^3. | |
| void | set_As (double _As) |
| void | set_ns (double _ns) |
| void | set_kpivot_mpc (double _kpivot_mpc) |
| double | get_As () const |
| double | get_ns () const |
| double | get_h () const |
| double | get_kpivot_mpc () const |
| double | get_Omegab () const |
| double | get_OmegaCDM () const |
| double | get_OmegaMNu () const |
| void | output (std::string filename, double a) const |
| Output some sample data. | |
| void | set_fileformat (std::string format) |
| Set the fileformat. | |
| double | get_zmin_splines () const |
| Get the range of the splines. | |
| double | get_zmax_splines () const |
| The largest redshift the splines reach. | |
| double | get_kmin_hmpc_splines () const |
| The smallest scale the splines reach. | |
| double | get_kmax_hmpc_splines () const |
| The largest redshift the splines reach. | |
| void | free () |
| Free up all memory. | |
Data Fields | |
| int | n_transfer_header_lines = 0 |
| int | ncol_transfer_file = 0 |
| int | transfer_col_k = -1 |
| int | transfer_col_cdm = -1 |
| int | transfer_col_baryon = -1 |
| int | transfer_col_photon = -1 |
| int | transfer_col_nu = -1 |
| int | transfer_col_mnu = -1 |
| int | transfer_col_total = -1 |
| int | transfer_col_nonu = -1 |
| int | transfer_col_totde = -1 |
| int | transfer_col_weyl = -1 |
| int | transfer_col_vcdm = -1 |
| int | transfer_col_vb = -1 |
| int | transfer_col_vbvc = -1 |
| int | n_pofk_header_lines = 0 |
| int | ncol_pofk_file = 0 |
| int | pofk_col_k = -1 |
| int | pofk_col_pofk = -1 |
This class reads transfer/power-spectrum data from the output of a Einstein-Boltzmann solver.
We have only implemented CAMB, but other formats should just be providing the column numbers above
Definition at line 115 of file CAMBReader.h.
|
inline |
Definition at line 185 of file CAMBReader.h.
|
inline |
Definition at line 186 of file CAMBReader.h.
|
inline |
Definition at line 187 of file CAMBReader.h.
|
inline |
Free up all memory.
Definition at line 333 of file CAMBReader.h.
|
inline |
Definition at line 259 of file CAMBReader.h.
|
inline |
Weighted baryon growth rate.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 818 of file CAMBReader.h.
|
inline |
Baryon transfer function (T = Delta/k^2) in units of Mpc^2.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 808 of file CAMBReader.h.
|
inline |
Weighted CDM+Baryon growth rate.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 838 of file CAMBReader.h.
|
inline |
(CDM+b) power-spectrum in units of (Mpc/h)^3
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 896 of file CAMBReader.h.
|
inline |
Weighted CDM+Baryon transfer function (T = Delta/k^2) in units of Mpc^2 Since baryons are CDM in the simulations this is the one to use.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 828 of file CAMBReader.h.
|
inline |
CDM growth rate.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 736 of file CAMBReader.h.
|
inline |
CDM transfer function (T = Delta/k^2) in units of Mpc^2.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 726 of file CAMBReader.h.
|
inline |
Definition at line 261 of file CAMBReader.h.
|
inline |
The largest redshift the splines reach.
Definition at line 447 of file CAMBReader.h.
|
inline |
The smallest scale the splines reach.
Definition at line 445 of file CAMBReader.h.
|
inline |
Definition at line 262 of file CAMBReader.h.
|
inline |
Massive neutrino growth rate.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 705 of file CAMBReader.h.
|
inline |
Massive neutrino power-spectrum in units of (Mpc/h)^3.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 909 of file CAMBReader.h.
|
inline |
Massive neutrino transfer function (T = Delta/k^2) in units of Mpc^2.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 695 of file CAMBReader.h.
|
inline |
Neutrino transfer function (T = Delta/k^2) in units of Mpc^2.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 685 of file CAMBReader.h.
|
inline |
theta/(aH R), in Newtonian gauge.
species: 0=CDM, 1=baryon, 2=CDM+baryon. CAMB stores -theta/(aH k_Mpc^2); this is a direct velocity, not dln(delta)/dlna.
Definition at line 224 of file CAMBReader.h.
|
inline |
Definition at line 260 of file CAMBReader.h.
|
inline |
Definition at line 263 of file CAMBReader.h.
|
inline |
Definition at line 264 of file CAMBReader.h.
|
inline |
Definition at line 265 of file CAMBReader.h.
|
inline |
Photon transfer function (T = Delta/k^2) in units of Mpc^2.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 675 of file CAMBReader.h.
|
inline |
Primordial power-spectrum today in units of (Mpc/h)^3.
| [in] | k | Fourier wavenumber in h/Mpc |
Definition at line 887 of file CAMBReader.h.
|
inline |
Total (CDM+b+nu) growth rate.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 879 of file CAMBReader.h.
|
inline |
Total (CDM+b+nu) power-spectrum in units of (Mpc/h)^3.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 869 of file CAMBReader.h.
|
inline |
Total (CDM+b+nu) transfer function (T = Delta/k^2) in units of Mpc^2.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 849 of file CAMBReader.h.
|
inline |
Weyl transfer function.
| [in] | k | Fourier wavenumber in h/Mpc |
| [in] | a | Scalefactor |
Definition at line 665 of file CAMBReader.h.
|
inline |
The largest redshift the splines reach.
Definition at line 443 of file CAMBReader.h.
|
inline |
Get the range of the splines.
The smallest redshift the splines reach.
Definition at line 441 of file CAMBReader.h.
|
inlineexplicit |
Has the splines been created?
Definition at line 201 of file CAMBReader.h.
|
inline |
Output some sample data.
Output some of the data we have read in and splines to see that its ok.
Definition at line 920 of file CAMBReader.h.
|
inline |
Read a single power-spectrum file.
Read a single power-spectrum file and return the data as (k, P(k))
| [in] | filename | Filename of a CAMB P(k) file |
Definition at line 399 of file CAMBReader.h.
|
inline |
Read the infofile, read transferfiles listed in that and make splines of T(k,z)
Read an infofile with the format (folder num_redshift) and then each line contains (transferfile_i redshift_i).
The files are sorted by redshift if they are not ordered from low to high.
| [in] | infofile | Filename of infofile containing info about transfer data from CAMB |
Definition at line 454 of file CAMBReader.h.
|
inline |
Read a single transfer function.
Read a single transfer file and return the data as a 2D array the first entry is k and the other entries can be found as LinearTransferData::transfer_col_cdm etc.
| [in] | filename | Filename of a CAMB T(k) file |
Definition at line 354 of file CAMBReader.h.
|
inline |
Definition at line 256 of file CAMBReader.h.
|
inline |
Set the fileformat.
Definition at line 286 of file CAMBReader.h.
|
inline |
Definition at line 258 of file CAMBReader.h.
|
inline |
Definition at line 257 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::n_pofk_header_lines = 0 |
Definition at line 180 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::n_transfer_header_lines = 0 |
Definition at line 163 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::ncol_pofk_file = 0 |
Definition at line 181 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::ncol_transfer_file = 0 |
Definition at line 164 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::pofk_col_k = -1 |
Definition at line 182 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::pofk_col_pofk = -1 |
Definition at line 183 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_baryon = -1 |
Definition at line 167 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_cdm = -1 |
Definition at line 166 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_k = -1 |
Definition at line 165 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_mnu = -1 |
Definition at line 170 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_nonu = -1 |
Definition at line 172 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_nu = -1 |
Definition at line 169 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_photon = -1 |
Definition at line 168 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_total = -1 |
Definition at line 171 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_totde = -1 |
Definition at line 173 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_vb = -1 |
Definition at line 176 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_vbvc = -1 |
Definition at line 177 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_vcdm = -1 |
Definition at line 175 of file CAMBReader.h.
| int FML::FILEUTILS::LinearTransferData::transfer_col_weyl = -1 |
Definition at line 174 of file CAMBReader.h.