|
Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
|
#include <gsl/gsl_integration.h>#include <gsl/gsl_spline.h>

Go to the source code of this file.
Classes | |
| struct | pz_info |
| struct | dNdz_info |
| struct | smail_params |
Macros | |
| #define | Z_MIN_SOURCES 0. |
| #define | Z_MAX_SOURCES 5.0 |
Functions | |
| void | ccl_dNdz_tomog (double z, double bin_zmin, double bin_zmax, pz_info *photo_info, dNdz_info *dN_info, double *tomoout, int *status) |
| dNdz_info * | ccl_create_dNdz_info (void *params, double(*dNdz_func)(double, void *, int *)) |
| dNdz_info * | ccl_create_Smail_dNdz_info (double alpha, double beta, double z0) |
| void | ccl_free_dNdz_info (dNdz_info *dN_info) |
| pz_info * | ccl_create_photoz_info (void *params, double(*pz_func)(double, double, void *, int *)) |
| pz_info * | ccl_create_gaussian_photoz_info (double sigma_z0) |
| void | ccl_free_photoz_info (pz_info *my_photoz_info) |
| #define Z_MAX_SOURCES 5.0 |
Definition at line 13 of file ccl_redshifts.h.
Referenced by ccl_dNdz_tomog().
| #define Z_MIN_SOURCES 0. |
We assume no relevant source redshift distributions exceed z= 5
Definition at line 12 of file ccl_redshifts.h.
Referenced by ccl_dNdz_tomog().
This function creates a structure amalgamating the information on an analytic true dNdz, plus some parameters.
| params | parameters for the analytic dNdz form |
| dNdz_func | dNdz function |
Definition at line 94 of file ccl_redshifts.c.
References halomod_bm::params, and dNdz_info::your_dN_params.
Referenced by main().
This function creates a structure containing the photo-z model for the built-in Gaussian photo-z pdf.
| sigma_z0 | The photo-z uncertainty at z=0. The photo-z uncertainty is assumed to scale like (1 + z). |
Definition at line 67 of file ccl_redshifts.c.
References gaussian_pz(), pz_info::your_pz_func, and pz_info::your_pz_params.
Referenced by main().
This function creates a structure amalgamating the information on the photo-z model, P(z) plus some parameters.
| params | parameters for the P(z) function |
| pz_func | P(z) function |
Definition at line 21 of file ccl_redshifts.c.
References halomod_bm::params, and pz_info::your_pz_params.
Referenced by main().
This function creates a structure containing the true dNdz for the built-in Smail-type analytic form: dNdz ~ z^alpha exp(- (z/z0)^beta)
| alpha | |
| z0 | |
| beta |
Definition at line 120 of file ccl_redshifts.c.
References smail_params::alpha, beta, smail_params::beta, dNdz_smail(), dNdz_info::your_dN_func, dNdz_info::your_dN_params, and smail_params::z0.
Referenced by main().
| void ccl_dNdz_tomog | ( | double | z, |
| double | bin_zmin, | ||
| double | bin_zmax, | ||
| pz_info * | photo_info, | ||
| dNdz_info * | dN_info, | ||
| double * | tomoout, | ||
| int * | status | ||
| ) |
Return dNdz in a particular tomographic bin, convolved with a photo-z model (defined by the user), and normalized.
| z | redshift |
| dNdz_type | the choice of dN/dz from Chang+ |
| bin_zmin | the minimum redshift of the tomorgraphic bin |
| bin_zmax | the maximum redshift of the tomographic bin |
| photo_info | the P(z) info struct |
| tomoout | the output dN/dz |
| status | Status flag. 0 if there are no errors, nonzero otherwise. |
Definition at line 222 of file ccl_redshifts.c.
References norm_params::bin_zmax_, norm_params::bin_zmin_, ccl_cosmology_read_config(), ccl_dNdz(), CCL_ERROR_INTEG, CCL_ERROR_MISSING_CONFIG_FILE, ccl_gsl, ccl_norm_integrand(), ccl_photoz(), ccl_raise_exception(), ccl_raise_gsl_warning(), ccl_splines, norm_params::dN_information, ccl_gsl_params::INTEGRATION_DNDZ_EPSREL, ccl_gsl_params::N_ITERATION, pz_params::pz_information, norm_params::pz_information, pz_params::status, norm_params::status, z, Z_MAX_SOURCES, Z_MIN_SOURCES, and pz_params::z_true.
Referenced by main().
| void ccl_free_dNdz_info | ( | dNdz_info * | dN_info | ) |
Free memory holding the structure containing dNdz information.
| dN_info | that holds user-defined dNdz and parameters |
Definition at line 152 of file ccl_redshifts.c.
Referenced by main().
| void ccl_free_photoz_info | ( | pz_info * | my_photoz_info | ) |
Free memory holding the structure containing user-input photoz information.
| my_photoz_info | that holds user-defined P(z) and parameters |
Definition at line 84 of file ccl_redshifts.c.
Referenced by main().