Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
ccl_cls.h
Go to the documentation of this file.
1 
2 #ifndef __CCL_CLS_H_INCLUDED__
3 #define __CCL_CLS_H_INCLUDED__
4 
5 typedef enum ccl_tracer_t
6 {
10 } ccl_tracer_t;
11 
12 typedef enum ccl_tracer_func_t
13 {
14  ccl_trf_nz = 201, //Redshift distribution
15  ccl_trf_bz = 202, //Clustering bias
16  ccl_trf_sz = 203, //Magnification bias
17  ccl_trf_rf = 204, //Aligned fraction
18  ccl_trf_ba = 205, //Alignment bias
19  ccl_trf_wL = 206, //Weak lensing window function
20  ccl_trf_wM = 207, //Magnification window function
22 
24 
31 typedef struct {
32  int tracer_type; //Type (see above)
33  double prefac_lensing; //3*O_M*H_0^2/2
34  double chimax; //Limits in chi where we care about this tracer
35  double chimin;
36  double zmin; //Limits in chi where we care about this tracer
37  double zmax;
38  double chi_source; //Comoving distance to the source (for CMB lensing)
39  int has_rsd;
42  SplPar *spl_nz; //Spline for normalized N(z)
43  SplPar *spl_bz; //Spline for linear bias
44  SplPar *spl_sz; //Spline for magnification bias
45  SplPar *spl_rf; //Spline for red fraction
46  SplPar *spl_ba; //Spline for alignment bias
47  SplPar *spl_wL; //Spline for lensing kernel
48  SplPar *spl_wM; //Spline for magnification
49 } CCL_ClTracer;
50 
51 
79  int has_rsd,int has_magnification,int has_intrinsic_alignment,
80  int nz_n,double *z_n,double *n,
81  int nz_b,double *z_b,double *b,
82  int nz_s,double *z_s,double *s,
83  int nz_ba,double *z_ba,double *ba,
84  int nz_rf,double *z_rf,double *rf,
85  double z_source,int * status);
86 
106  int has_rsd,int has_magnification,
107  int nz_n,double *z_n,double *n,
108  int nz_b,double *z_b,double *b,
109  int nz_s,double *z_s,double *s, int * status);
110 
111 
125  int nz_n,double *z_n,double *n,
126  int nz_b,double *z_b,double *b, int * status);
127 
145  int has_alignment,
146  int nz_n,double *z_n,double *n,
147  int nz_ba,double *z_ba,double *ba,
148  int nz_rf,double *z_rf,double *rf, int * status);
149 
160  int nz_n,double *z_n,double *n, int * status);
161 
162 
170 CCL_ClTracer *ccl_cl_tracer_cmblens(ccl_cosmology *cosmo,double z_source,int *status);
171 
178 
192 double ccl_get_tracer_fa(ccl_cosmology *cosmo,CCL_ClTracer *clt,double a,int func_code,int *status);
193 
209 int ccl_get_tracer_fas(ccl_cosmology *cosmo,CCL_ClTracer *clt,int na,double *a,double *fa,
210  int func_code,int *status);
211 
212 //Workspace for C_ell computations
213 typedef struct {
214  int lmax; //*Maximum multipole
215  int l_limber; //*All power spectra for l>l_limber will be computed using Limber's approximation
216  double l_logstep; //*Logarithmic step factor used at low l
217  int l_linstep; //*Linear step used at high l
218  int n_ls; //Number of multipoles that result from the previous combination of parameters
219  int *l_arr; //*Array of multipole values resulting from the previous parameters
221 
222 //CCL_ClWorkspace constructor
223 CCL_ClWorkspace *ccl_cl_workspace_new(int lmax,int l_limber,
224  double l_logstep,int l_linstep,
225  int *status);
226 //CCL_ClWorkspace simplified constructor
227 CCL_ClWorkspace *ccl_cl_workspace_new_limber(int lmax, double l_logstep,int l_linstep,int *status);
228 //CCL_ClWorkspace destructor
230 
245  CCL_ClTracer *clt1,CCL_ClTracer *clt2,
246  int nl_out,int *l,double *cl,int *status);
247 
249 
250 
251 #endif
SplPar * spl_rf
Definition: ccl_cls.h:45
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)
Definition: ccl_cls.c:642
int has_intrinsic_alignment
Definition: ccl_cls.h:41
#define CCL_BEGIN_DECLS
Definition: ccl_defs.h:17
int has_magnification
Definition: ccl_cls.h:40
SplPar * spl_nz
Definition: ccl_cls.h:42
double zmin
Definition: ccl_cls.h:36
SplPar * spl_bz
Definition: ccl_cls.h:43
void ccl_cl_tracer_free(CCL_ClTracer *clt)
Definition: ccl_cls.c:592
int ccl_get_tracer_fas(ccl_cosmology *cosmo, CCL_ClTracer *clt, int na, double *a, double *fa, int func_code, int *status)
Definition: ccl_cls.c:1091
CCL_ClWorkspace * ccl_cl_workspace_new_limber(int lmax, double l_logstep, int l_linstep, int *status)
Definition: ccl_cls.c:124
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)
Definition: ccl_cls.c:943
double ccl_get_tracer_fa(ccl_cosmology *cosmo, CCL_ClTracer *clt, double a, int func_code, int *status)
Definition: ccl_cls.c:1048
SplPar * spl_sz
Definition: ccl_cls.h:44
int has_rsd
Definition: ccl_cls.h:39
SplPar * spl_wL
Definition: ccl_cls.h:47
int tracer_type
Definition: ccl_cls.h:32
double prefac_lensing
Definition: ccl_cls.h:33
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)
Definition: ccl_cls.c:633
double chi_source
Definition: ccl_cls.h:38
CCL_ClWorkspace * ccl_cl_workspace_new(int lmax, int l_limber, double l_logstep, int l_linstep, int *status)
Definition: ccl_cls.c:65
ccl_tracer_func_t
Definition: ccl_cls.h:12
double l_logstep
Definition: ccl_cls.h:216
SplPar * spl_ba
Definition: ccl_cls.h:46
ccl_tracer_t
Definition: ccl_cls.h:5
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)
Definition: ccl_cls.c:622
double zmax
Definition: ccl_cls.h:37
void ccl_cl_workspace_free(CCL_ClWorkspace *w)
Definition: ccl_cls.c:59
CCL_ClTracer * ccl_cl_tracer_cmblens(ccl_cosmology *cosmo, double z_source, int *status)
Definition: ccl_cls.c:614
SplPar * spl_wM
Definition: ccl_cls.h:48
double chimax
Definition: ccl_cls.h:34
double chimin
Definition: ccl_cls.h:35
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)
Definition: ccl_cls.c:575
static double w[2][28][111]
Definition: ccl_emu17.c:33
#define CCL_END_DECLS
Definition: ccl_defs.h:18
CCL_ClTracer * ccl_cl_tracer_lensing_simple(ccl_cosmology *cosmo, int nz_n, double *z_n, double *n, int *status)
Definition: ccl_cls.c:653