11 #define CLS_PRECISION 3E-3 59 ccl_parameters ccl_params =
ccl_parameters_create(data->
Omega_c, data->
Omega_b, data->
Omega_k, data->
Neff, data->
mnu, data->
mnu_type,data->
w_0, data->
w_a, data->
h, data->
A_s, data->
n_s,-1,-1,-1,-1,NULL,NULL, &status);
67 double z_arr_gc[
NZ],nz_arr_gc[
NZ],bz_arr[
NZ];
77 bool has_magnification =
false;
78 CCL_ClTracer *ct_gc_A=
ccl_cl_tracer_number_counts(ccl_cosmo,has_rsd,has_magnification,NZ,z_arr_gc,nz_arr_gc,NZ,z_arr_gc,bz_arr,-1,NULL,NULL, &status);
79 CCL_ClTracer *ct_gc_B=
ccl_cl_tracer_number_counts(ccl_cosmo,has_rsd,has_magnification,NZ,z_arr_gc,nz_arr_gc,NZ,z_arr_gc,bz_arr,-1,NULL,NULL, &status);
81 int *ells=malloc(
NL*
sizeof(
int));
82 double *cells_gg_angpow=malloc(
NL*
sizeof(
double));
83 for(
int ii=0;ii<
NL;ii++)
89 double logstep = 1.15;
94 ccl_angular_cls(ccl_cosmo,wap,ct_gc_A,ct_gc_A,NL,ells,cells_gg_angpow,&status);
95 double rel_precision = 0.;
96 FILE *f=fopen(
"./tests/benchmark/angpow_gg.txt",
"r");
97 for(
int ii=2;ii<
NL;ii++) {
99 double ratio,cl_gg_nl,cl_gg_ap=cells_gg_angpow[ii];
100 int stat=fscanf(f,
"%d %lE",&l,&cl_gg_nl);
103 ratio = fabs(cl_gg_nl-cl_gg_ap)/cl_gg_nl;
104 rel_precision += ratio;
115 free(cells_gg_angpow);
ccl_mnu_convention mnu_type
matter_power_spectrum_t matter_power_spectrum_method
#define ASSERT_TRUE(real)
#define CTEST_SETUP(sname)
#define CTEST_DATA(sname)
void ccl_cl_tracer_free(CCL_ClTracer *clt)
transfer_function_t transfer_function_method
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)
ccl_cosmology * ccl_cosmology_create(ccl_parameters params, ccl_configuration config)
void ccl_cosmology_free(ccl_cosmology *cosmo)
CCL_ClWorkspace * ccl_cl_workspace_new(int lmax, int l_limber, double l_logstep, int l_linstep, int *status)
static void test_angpow_precision(struct angpow_data *data)
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)
const ccl_configuration default_config
float pow(float base, unsigned long int exp)
void ccl_cl_workspace_free(CCL_ClWorkspace *w)
ccl_parameters ccl_parameters_create(double Omega_c, double Omega_b, double Omega_k, double Neff, double *mnu, ccl_mnu_convention mnu_type, double w0, double wa, double h, double norm_pk, double n_s, double bcm_log10Mc, double bcm_etab, double bcm_ks, int nz_mgrowth, double *zarr_mgrowth, double *dfarr_mgrowth, int *status)
#define CTEST2(sname, tname)