|
Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
|

Go to the source code of this file.
Classes | |
| struct | CCL_ClTracer |
| struct | CCL_ClWorkspace |
Typedefs | |
| typedef enum ccl_tracer_t | ccl_tracer_t |
| typedef enum ccl_tracer_func_t | ccl_tracer_func_t |
Enumerations | |
| enum | ccl_tracer_t { ccl_number_counts_tracer = 1, ccl_weak_lensing_tracer = 2, ccl_cmb_lensing_tracer = 3 } |
| enum | ccl_tracer_func_t { ccl_trf_nz = 201, ccl_trf_bz = 202, ccl_trf_sz = 203, ccl_trf_rf = 204, ccl_trf_ba = 205, ccl_trf_wL = 206, ccl_trf_wM = 207 } |
Functions | |
| CCL_ClTracer * | ccl_cl_tracer (ccl_cosmology *cosmo, int tracer_type, int has_rsd, int has_magnification, int has_intrinsic_alignment, int nz_n, double *z_n, double *n, int nz_b, double *z_b, double *b, int nz_s, double *z_s, double *s, int nz_ba, double *z_ba, double *ba, int nz_rf, double *z_rf, double *rf, double z_source, int *status) |
| CCL_ClTracer * | ccl_cl_tracer_number_counts (ccl_cosmology *cosmo, int has_rsd, int has_magnification, int nz_n, double *z_n, double *n, int nz_b, double *z_b, double *b, int nz_s, double *z_s, double *s, int *status) |
| CCL_ClTracer * | ccl_cl_tracer_number_counts_simple (ccl_cosmology *cosmo, int nz_n, double *z_n, double *n, int nz_b, double *z_b, double *b, int *status) |
| CCL_ClTracer * | ccl_cl_tracer_lensing (ccl_cosmology *cosmo, int has_alignment, int nz_n, double *z_n, double *n, int nz_ba, double *z_ba, double *ba, int nz_rf, double *z_rf, double *rf, int *status) |
| CCL_ClTracer * | ccl_cl_tracer_lensing_simple (ccl_cosmology *cosmo, int nz_n, double *z_n, double *n, int *status) |
| CCL_ClTracer * | ccl_cl_tracer_cmblens (ccl_cosmology *cosmo, double z_source, int *status) |
| void | ccl_cl_tracer_free (CCL_ClTracer *clt) |
| double | ccl_get_tracer_fa (ccl_cosmology *cosmo, CCL_ClTracer *clt, double a, int func_code, int *status) |
| int | ccl_get_tracer_fas (ccl_cosmology *cosmo, CCL_ClTracer *clt, int na, double *a, double *fa, int func_code, int *status) |
| CCL_ClWorkspace * | ccl_cl_workspace_new (int lmax, int l_limber, double l_logstep, int l_linstep, int *status) |
| CCL_ClWorkspace * | ccl_cl_workspace_new_limber (int lmax, double l_logstep, int l_linstep, int *status) |
| void | ccl_cl_workspace_free (CCL_ClWorkspace *w) |
| void | ccl_angular_cls (ccl_cosmology *cosmo, CCL_ClWorkspace *w, CCL_ClTracer *clt1, CCL_ClTracer *clt2, int nl_out, int *l, double *cl, int *status) |
| typedef enum ccl_tracer_func_t ccl_tracer_func_t |
| typedef enum ccl_tracer_t ccl_tracer_t |
| enum ccl_tracer_func_t |
| Enumerator | |
|---|---|
| ccl_trf_nz | |
| ccl_trf_bz | |
| ccl_trf_sz | |
| ccl_trf_rf | |
| ccl_trf_ba | |
| ccl_trf_wL | |
| ccl_trf_wM | |
Definition at line 12 of file ccl_cls.h.
| enum ccl_tracer_t |
| Enumerator | |
|---|---|
| ccl_number_counts_tracer | |
| ccl_weak_lensing_tracer | |
| ccl_cmb_lensing_tracer | |
| void ccl_angular_cls | ( | ccl_cosmology * | cosmo, |
| CCL_ClWorkspace * | w, | ||
| CCL_ClTracer * | clt1, | ||
| CCL_ClTracer * | clt2, | ||
| int | nl_out, | ||
| int * | l, | ||
| double * | cl, | ||
| int * | status | ||
| ) |
Computes limber or non-limber power spectrum for two different tracers
| cosmo | Cosmological parameters |
| w | a ClWorkspace |
| clt1 | a Cltracer |
| clt2 | a Cltracer |
| nl_out | the maximum to ell to compute C_ell |
| l | an array of ell values |
| cl | the C_ell output array |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 943 of file ccl_cls.c.
References ccl_angular_cl_native(), ccl_check_status(), ccl_cosmology_set_status_message(), CCL_ERROR_MEMORY, CCL_ERROR_SPLINE_EV, ccl_spline_eval(), ccl_spline_free(), ccl_spline_init(), ccl_weak_lensing_tracer, CCL_ClTracer::has_magnification, CCL_ClWorkspace::l_arr, CCL_ClWorkspace::l_limber, CCL_ClWorkspace::lmax, CCL_ClWorkspace::n_ls, and CCL_ClTracer::tracer_type.
Referenced by compare_cls(), compare_corr(), main(), and test_angpow_precision().
| CCL_ClTracer* ccl_cl_tracer | ( | ccl_cosmology * | cosmo, |
| int | tracer_type, | ||
| int | has_rsd, | ||
| int | has_magnification, | ||
| int | has_intrinsic_alignment, | ||
| int | nz_n, | ||
| double * | z_n, | ||
| double * | n, | ||
| int | nz_b, | ||
| double * | z_b, | ||
| double * | b, | ||
| int | nz_s, | ||
| double * | z_s, | ||
| double * | s, | ||
| int | nz_ba, | ||
| double * | z_ba, | ||
| double * | ba, | ||
| int | nz_rf, | ||
| double * | z_rf, | ||
| double * | rf, | ||
| double | z_source, | ||
| int * | status | ||
| ) |
Constructor for a ClTracer.
| Tracer_type | pass ccl_number_counts_tracer (number counts), ccl_weak_lensing_tracer (weak lensing) or ccl_cmb_lensing_tracer (CMB lensing) |
| has_rsd | Set to 1 if you want to compute the RSD contribution to number counts (0 otherwise) |
| has_magnification | Set to 1 if you want to compute the magnification contribution to number counts (0 otherwise) |
| has_intrinsic_alignment | Set to 1 if you want to compute the IA contribution to shear |
| nz_n | Number of bins in z_n and n |
| z_n | Redshifts for each redshift interval of n |
| n | Number count of objects per redshift interval (Note: arbitrary normalization - renormalized inside) |
| nz_b | Number of bins in z_b and b |
| z_b | Redshifts for each redshift interval of b |
| b | Clustering bias in each redshift bin |
| nz_s | Number of bins in z_s and s |
| z_s | Redshifts for each redshift interval of s |
| s | Magnification bias in each redshift bin |
| nz_ba | Number of bins in z_ba and ba |
| z_ba | Redshifts for each redshift interval of ba |
| ba | Alignment bias in each redshift bin |
| nz_rf | Number of bins in z_f and f |
| z_rf | Redshifts for each redshift interval of rf |
| rf | Aligned red fraction in each redshift bin |
| z_source | Redshift of source plane for CMB lensing (z~1100 for CMB lensing). |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 575 of file ccl_cls.c.
References ccl_check_status(), and cl_tracer().
Referenced by ccl_cl_tracer_cmblens(), ccl_cl_tracer_lensing(), ccl_cl_tracer_lensing_simple(), ccl_cl_tracer_number_counts(), and ccl_cl_tracer_number_counts_simple().
| CCL_ClTracer* ccl_cl_tracer_cmblens | ( | ccl_cosmology * | cosmo, |
| double | z_source, | ||
| int * | status | ||
| ) |
Simplified constructor for a CMB lensing ClTracer.
| z_source | Redshift of source plane (z~1100 for CMB lensing). |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 614 of file ccl_cls.c.
References ccl_cl_tracer(), and ccl_cmb_lensing_tracer.
Referenced by compare_cls(), and main().
| void ccl_cl_tracer_free | ( | CCL_ClTracer * | clt | ) |
Destructor for a Cltracer
| clt | a Cltracer |
Definition at line 592 of file ccl_cls.c.
References ccl_number_counts_tracer, ccl_spline_free(), ccl_weak_lensing_tracer, CCL_ClTracer::has_intrinsic_alignment, CCL_ClTracer::has_magnification, CCL_ClTracer::spl_ba, CCL_ClTracer::spl_bz, CCL_ClTracer::spl_nz, CCL_ClTracer::spl_rf, CCL_ClTracer::spl_sz, CCL_ClTracer::spl_wL, CCL_ClTracer::spl_wM, and CCL_ClTracer::tracer_type.
Referenced by compare_cls(), main(), and test_angpow_precision().
| CCL_ClTracer* ccl_cl_tracer_lensing | ( | ccl_cosmology * | cosmo, |
| int | has_alignment, | ||
| int | nz_n, | ||
| double * | z_n, | ||
| double * | n, | ||
| int | nz_ba, | ||
| double * | z_ba, | ||
| double * | ba, | ||
| int | nz_rf, | ||
| double * | z_rf, | ||
| double * | rf, | ||
| int * | status | ||
| ) |
Simplified constructor for a lensing ClTracer.
| has_intrinsic_alignment | Set to 1 if you want to compute the IA contribution to shear |
| nz_n | Number of bins in z_n and n |
| z_n | Redshifts for each redshift interval of n |
| n | Number count of objects per redshift interval (Note: arbitrary normalization - renormalized inside) |
| nz_ba | Number of bins in z_ba and ba |
| z_ba | Redshifts for each redshift interval of ba |
| ba | Alignment bias in each redshift bin |
| nz_rf | Number of bins in z_f and f |
| z_rf | Redshifts for each redshift interval of rf |
| rf | Aligned red fraction in each redshift bin |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 642 of file ccl_cls.c.
References ccl_cl_tracer(), and ccl_weak_lensing_tracer.
Referenced by compare_cls(), and compare_corr().
| CCL_ClTracer* ccl_cl_tracer_lensing_simple | ( | ccl_cosmology * | cosmo, |
| int | nz_n, | ||
| double * | z_n, | ||
| double * | n, | ||
| int * | status | ||
| ) |
Simplified constructor for a lensing ClTracer without intrinsic alignment.
| nz_n | Number of bins in z_n and n |
| z_n | Redshifts for each redshift interval of n |
| n | Number count of objects per redshift interval (Note: arbitrary normalization - renormalized inside) |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 653 of file ccl_cls.c.
References ccl_cl_tracer(), and ccl_weak_lensing_tracer.
Referenced by compare_cls(), compare_corr(), and main().
| CCL_ClTracer* ccl_cl_tracer_number_counts | ( | ccl_cosmology * | cosmo, |
| int | has_rsd, | ||
| int | has_magnification, | ||
| int | nz_n, | ||
| double * | z_n, | ||
| double * | n, | ||
| int | nz_b, | ||
| double * | z_b, | ||
| double * | b, | ||
| int | nz_s, | ||
| double * | z_s, | ||
| double * | s, | ||
| int * | status | ||
| ) |
Simplified constructor for a clustering ClTracer.
| cosmo | Cosmological parameters |
| has_rsd | Set to 1 if you want to compute the RSD contribution to number counts (0 otherwise) |
| has_magnification | Set to 1 if you want to compute the magnification contribution to number counts (0 otherwise) |
| nz_n | Number of bins in z_n and n |
| z_n | Redshifts for each redshift interval of n |
| n | Number count of objects per redshift interval (Note: arbitrary normalization - renormalized inside) |
| nz_b | Number of bins in z_b and b |
| z_b | Redshifts for each redshift interval of b |
| b | Clustering bias in each redshift bin |
| nz_s | Number of bins in z_s and s |
| z_s | Redshifts for each redshift interval of s |
| s | Magnification bias in each redshift bin |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 622 of file ccl_cls.c.
References ccl_cl_tracer(), and ccl_number_counts_tracer.
Referenced by main(), and test_angpow_precision().
| CCL_ClTracer* ccl_cl_tracer_number_counts_simple | ( | ccl_cosmology * | cosmo, |
| int | nz_n, | ||
| double * | z_n, | ||
| double * | n, | ||
| int | nz_b, | ||
| double * | z_b, | ||
| double * | b, | ||
| int * | status | ||
| ) |
Simplified constructor for a ClTracer without magnification nor RSD.
| nz_n | Number of bins in z_n and n |
| z_n | Redshifts for each redshift interval of n |
| n | Number count of objects per redshift interval (Note: arbitrary normalization - renormalized inside) |
| nz_b | Number of bins in z_b and b |
| z_b | Redshifts for each redshift interval of b |
| b | Clustering bias in each redshift bin |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 633 of file ccl_cls.c.
References ccl_cl_tracer(), and ccl_number_counts_tracer.
Referenced by compare_cls(), compare_corr(), and main().
| void ccl_cl_workspace_free | ( | CCL_ClWorkspace * | w | ) |
Definition at line 59 of file ccl_cls.c.
References CCL_ClWorkspace::l_arr.
Referenced by compare_cls(), compare_corr(), main(), and test_angpow_precision().
| CCL_ClWorkspace* ccl_cl_workspace_new | ( | int | lmax, |
| int | l_limber, | ||
| double | l_logstep, | ||
| int | l_linstep, | ||
| int * | status | ||
| ) |
Definition at line 65 of file ccl_cls.c.
References CCL_ERROR_MEMORY, CCL_MAX, CCL_ClWorkspace::l_arr, CCL_ClWorkspace::l_limber, CCL_ClWorkspace::l_linstep, CCL_ClWorkspace::l_logstep, CCL_ClWorkspace::lmax, CCL_ClWorkspace::n_ls, and w.
Referenced by ccl_cl_workspace_new_limber(), and test_angpow_precision().
| CCL_ClWorkspace* ccl_cl_workspace_new_limber | ( | int | lmax, |
| double | l_logstep, | ||
| int | l_linstep, | ||
| int * | status | ||
| ) |
Definition at line 124 of file ccl_cls.c.
References ccl_cl_workspace_new().
Referenced by compare_cls(), compare_corr(), and main().
| double ccl_get_tracer_fa | ( | ccl_cosmology * | cosmo, |
| CCL_ClTracer * | clt, | ||
| double | a, | ||
| int | func_code, | ||
| int * | status | ||
| ) |
Method to return certain redshift or distance-dependent internal quantities for a given tracer.
| cosmo | Cosmological parameters |
| clt | ClTracer object |
| a | scale factor at which the function is to be evaluated |
| func_code | integer defining which internal function to evaluate. Choose between: ccl_trf_nz (redshift distribution), ccl_trf_bz (clustering bias), ccl_trf_sz (magnification bias), ccl_trf_rf (aligned fraction), ccl_trf_ba (alignment bias), ccl_trf_wL (weak lensing window function), ccl_trf_wM (magnification window function) |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 1048 of file ccl_cls.c.
References ccl_comoving_radial_distance(), ccl_cosmology_set_status_message(), CCL_ERROR_INCONSISTENT, ccl_spline_eval(), ccl_trf_ba, ccl_trf_bz, ccl_trf_nz, ccl_trf_rf, ccl_trf_sz, ccl_trf_wL, ccl_trf_wM, check_clt_fa_inconsistency(), CCL_ClTracer::spl_ba, CCL_ClTracer::spl_bz, CCL_ClTracer::spl_nz, CCL_ClTracer::spl_rf, CCL_ClTracer::spl_sz, CCL_ClTracer::spl_wL, CCL_ClTracer::spl_wM, and x.
| int ccl_get_tracer_fas | ( | ccl_cosmology * | cosmo, |
| CCL_ClTracer * | clt, | ||
| int | na, | ||
| double * | a, | ||
| double * | fa, | ||
| int | func_code, | ||
| int * | status | ||
| ) |
Method to return certain redshift or distance-dependent internal quantities for a given tracer.
| cosmo | Cosmological parameters |
| clt | ClTracer object |
| na | number of points at which the function will be evaluated |
| a | na values of the scale factor at which the function is to be evaluated |
| fa | output array with na values that will store the interpolated function values |
| func_code | integer defining which internal function to evaluate. Choose between: ccl_trf_nz (redshift distribution), ccl_trf_bz (clustering bias), ccl_trf_sz (magnification bias), ccl_trf_rf (aligned fraction), ccl_trf_ba (alignment bias), ccl_trf_wL (weak lensing window function), ccl_trf_wM (magnification window function) |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 1091 of file ccl_cls.c.
References ccl_comoving_radial_distance(), ccl_cosmology_set_status_message(), CCL_ERROR_INCONSISTENT, ccl_spline_eval(), ccl_trf_ba, ccl_trf_bz, ccl_trf_nz, ccl_trf_rf, ccl_trf_sz, ccl_trf_wL, ccl_trf_wM, check_clt_fa_inconsistency(), CCL_ClTracer::spl_ba, CCL_ClTracer::spl_bz, CCL_ClTracer::spl_nz, CCL_ClTracer::spl_rf, CCL_ClTracer::spl_sz, CCL_ClTracer::spl_wL, CCL_ClTracer::spl_wM, and x.
Referenced by main().