pyccl 0.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. pyccl-0.0.0/CMakeLists.txt +146 -0
  2. pyccl-0.0.0/LICENSE +27 -0
  3. pyccl-0.0.0/LICENSE_COSMICEMU +10 -0
  4. pyccl-0.0.0/MANIFEST.in +16 -0
  5. pyccl-0.0.0/PKG-INFO +156 -0
  6. pyccl-0.0.0/README.md +128 -0
  7. pyccl-0.0.0/benchmarks/ccl_test.c +16 -0
  8. pyccl-0.0.0/benchmarks/ccl_test_f2d.c +334 -0
  9. pyccl-0.0.0/benchmarks/ccl_test_f3d.c +223 -0
  10. pyccl-0.0.0/benchmarks/ccl_test_utils.c +65 -0
  11. pyccl-0.0.0/benchmarks/ctest.h +532 -0
  12. pyccl-0.0.0/benchmarks/data/codes/CosmicEmuMTII/P_cb/emu.c +388 -0
  13. pyccl-0.0.0/benchmarks/data/codes/CosmicEmuMTII/P_cb/params.h +104512 -0
  14. pyccl-0.0.0/benchmarks/data/codes/CosmicEmuMTII/P_tot/emu.c +388 -0
  15. pyccl-0.0.0/benchmarks/data/codes/CosmicEmuMTII/P_tot/params.h +104512 -0
  16. pyccl-0.0.0/benchmarks/data/codes/CosmicEmuMTIV/P_cb/emu.c +288 -0
  17. pyccl-0.0.0/benchmarks/data/codes/CosmicEmuMTIV/P_cb/params.h +135906 -0
  18. pyccl-0.0.0/benchmarks/data/codes/CosmicEmuMTIV/P_tot/emu.c +289 -0
  19. pyccl-0.0.0/benchmarks/data/codes/CosmicEmuMTIV/P_tot/params.h +135906 -0
  20. pyccl-0.0.0/benchmarks/data/codes/angpow_benchmarks.c +87 -0
  21. pyccl-0.0.0/benchmarks/data/codes/bcm_bm.c +55 -0
  22. pyccl-0.0.0/benchmarks/data/codes/cl_corr_bm/src/common.c +240 -0
  23. pyccl-0.0.0/benchmarks/data/codes/cl_corr_bm/src/common.h +113 -0
  24. pyccl-0.0.0/benchmarks/data/codes/cl_corr_bm/src/cosmo.c +445 -0
  25. pyccl-0.0.0/benchmarks/data/codes/cl_corr_bm/src/io.c +198 -0
  26. pyccl-0.0.0/benchmarks/data/codes/cl_corr_bm/src/limberjack.c +18 -0
  27. pyccl-0.0.0/benchmarks/data/codes/cl_corr_bm/src/params.h +10 -0
  28. pyccl-0.0.0/benchmarks/data/codes/cl_corr_bm/src/spectra.c +192 -0
  29. pyccl-0.0.0/benchmarks/data/codes/cl_corr_bm/src/transfers.c +148 -0
  30. pyccl-0.0.0/cmake/Modules/BuildFFTW.cmake +24 -0
  31. pyccl-0.0.0/cmake/Modules/BuildGSL.cmake +26 -0
  32. pyccl-0.0.0/cmake/Modules/BuildSWIG.cmake +22 -0
  33. pyccl-0.0.0/cmake/Modules/FindFFTW.cmake +129 -0
  34. pyccl-0.0.0/cmake/Modules/FindNumPy.cmake +89 -0
  35. pyccl-0.0.0/cmake/Modules/FindPythonLibsNew.cmake +195 -0
  36. pyccl-0.0.0/cmake/cmake_uninstall.cmake.in +22 -0
  37. pyccl-0.0.0/cmake/pkg-config.cmakein +10 -0
  38. pyccl-0.0.0/include/ccl.h +49 -0
  39. pyccl-0.0.0/include/ccl_background.h +350 -0
  40. pyccl-0.0.0/include/ccl_bbks.h +17 -0
  41. pyccl-0.0.0/include/ccl_cls.h +80 -0
  42. pyccl-0.0.0/include/ccl_config.h +68 -0
  43. pyccl-0.0.0/include/ccl_core.h +358 -0
  44. pyccl-0.0.0/include/ccl_correlation.h +84 -0
  45. pyccl-0.0.0/include/ccl_defs.h +27 -0
  46. pyccl-0.0.0/include/ccl_eh.h +40 -0
  47. pyccl-0.0.0/include/ccl_error.h +75 -0
  48. pyccl-0.0.0/include/ccl_f1d.h +47 -0
  49. pyccl-0.0.0/include/ccl_f2d.h +118 -0
  50. pyccl-0.0.0/include/ccl_f3d.h +134 -0
  51. pyccl-0.0.0/include/ccl_fftlog.h +64 -0
  52. pyccl-0.0.0/include/ccl_halofit.h +48 -0
  53. pyccl-0.0.0/include/ccl_mass_conversion.h +23 -0
  54. pyccl-0.0.0/include/ccl_massfunc.h +43 -0
  55. pyccl-0.0.0/include/ccl_musigma.h +40 -0
  56. pyccl-0.0.0/include/ccl_neutrinos.h +49 -0
  57. pyccl-0.0.0/include/ccl_power.h +101 -0
  58. pyccl-0.0.0/include/ccl_tracers.h +196 -0
  59. pyccl-0.0.0/include/ccl_utils.h +72 -0
  60. pyccl-0.0.0/pyccl/CMakeLists.txt +38 -0
  61. pyccl-0.0.0/pyccl/__init__.py +47 -0
  62. pyccl-0.0.0/pyccl/_core/__init__.py +4 -0
  63. pyccl-0.0.0/pyccl/_core/caching.py +303 -0
  64. pyccl-0.0.0/pyccl/_core/deprecations.py +73 -0
  65. pyccl-0.0.0/pyccl/_core/parameters/__init__.py +3 -0
  66. pyccl-0.0.0/pyccl/_core/parameters/cosmology_params.py +21 -0
  67. pyccl-0.0.0/pyccl/_core/parameters/fftlog_params.py +100 -0
  68. pyccl-0.0.0/pyccl/_core/parameters/parameters_base.py +141 -0
  69. pyccl-0.0.0/pyccl/_core/repr_.py +385 -0
  70. pyccl-0.0.0/pyccl/_core/schema.py +376 -0
  71. pyccl-0.0.0/pyccl/_nonlimber_FKEM.py +270 -0
  72. pyccl-0.0.0/pyccl/background.py +516 -0
  73. pyccl-0.0.0/pyccl/baryons/__init__.py +4 -0
  74. pyccl-0.0.0/pyccl/baryons/baccoemu_baryons.py +223 -0
  75. pyccl-0.0.0/pyccl/baryons/baryons_base.py +41 -0
  76. pyccl-0.0.0/pyccl/baryons/schneider15.py +96 -0
  77. pyccl-0.0.0/pyccl/baryons/vandaalen19.py +111 -0
  78. pyccl-0.0.0/pyccl/boltzmann.py +499 -0
  79. pyccl-0.0.0/pyccl/ccl.i +61 -0
  80. pyccl-0.0.0/pyccl/ccl_background.i +131 -0
  81. pyccl-0.0.0/pyccl/ccl_cls.i +114 -0
  82. pyccl-0.0.0/pyccl/ccl_core.i +48 -0
  83. pyccl-0.0.0/pyccl/ccl_correlation.i +100 -0
  84. pyccl-0.0.0/pyccl/ccl_covs.i +96 -0
  85. pyccl-0.0.0/pyccl/ccl_f1d.i +54 -0
  86. pyccl-0.0.0/pyccl/ccl_fftlog.i +109 -0
  87. pyccl-0.0.0/pyccl/ccl_mass_conversion.i +32 -0
  88. pyccl-0.0.0/pyccl/ccl_musigma.i +55 -0
  89. pyccl-0.0.0/pyccl/ccl_neutrinos.i +30 -0
  90. pyccl-0.0.0/pyccl/ccl_pk2d.i +65 -0
  91. pyccl-0.0.0/pyccl/ccl_power.i +64 -0
  92. pyccl-0.0.0/pyccl/ccl_sigM.i +41 -0
  93. pyccl-0.0.0/pyccl/ccl_tk3d.i +58 -0
  94. pyccl-0.0.0/pyccl/ccl_tracers.i +244 -0
  95. pyccl-0.0.0/pyccl/ccl_utils.i +183 -0
  96. pyccl-0.0.0/pyccl/cells.py +157 -0
  97. pyccl-0.0.0/pyccl/correlations.py +363 -0
  98. pyccl-0.0.0/pyccl/cosmology.py +987 -0
  99. pyccl-0.0.0/pyccl/covariances.py +378 -0
  100. pyccl-0.0.0/pyccl/emulators/__init__.py +4 -0
  101. pyccl-0.0.0/pyccl/emulators/baccoemu_linear_pk.py +119 -0
  102. pyccl-0.0.0/pyccl/emulators/baccoemu_nonlinear_pk.py +121 -0
  103. pyccl-0.0.0/pyccl/emulators/cosmicemu_pk.py +243 -0
  104. pyccl-0.0.0/pyccl/emulators/data/CosmicEmu_MTII_2017_Pcb.npz +0 -0
  105. pyccl-0.0.0/pyccl/emulators/data/CosmicEmu_MTII_2017_Ptot.npz +0 -0
  106. pyccl-0.0.0/pyccl/emulators/data/CosmicEmu_MTIV_2022_Pcb.npz +0 -0
  107. pyccl-0.0.0/pyccl/emulators/data/CosmicEmu_MTIV_2022_Ptot.npz +0 -0
  108. pyccl-0.0.0/pyccl/emulators/emu_base.py +58 -0
  109. pyccl-0.0.0/pyccl/errors.py +47 -0
  110. pyccl-0.0.0/pyccl/halos/__init__.py +11 -0
  111. pyccl-0.0.0/pyccl/halos/concentration/__init__.py +8 -0
  112. pyccl-0.0.0/pyccl/halos/concentration/bhattacharya13.py +37 -0
  113. pyccl-0.0.0/pyccl/halos/concentration/constant.py +27 -0
  114. pyccl-0.0.0/pyccl/halos/concentration/diemer15.py +52 -0
  115. pyccl-0.0.0/pyccl/halos/concentration/duffy08.py +34 -0
  116. pyccl-0.0.0/pyccl/halos/concentration/ishiyama21.py +97 -0
  117. pyccl-0.0.0/pyccl/halos/concentration/klypin11.py +25 -0
  118. pyccl-0.0.0/pyccl/halos/concentration/prada12.py +54 -0
  119. pyccl-0.0.0/pyccl/halos/halo_model.py +444 -0
  120. pyccl-0.0.0/pyccl/halos/halo_model_base.py +291 -0
  121. pyccl-0.0.0/pyccl/halos/hbias/__init__.py +5 -0
  122. pyccl-0.0.0/pyccl/halos/hbias/bhattacharya11.py +38 -0
  123. pyccl-0.0.0/pyccl/halos/hbias/sheth01.py +40 -0
  124. pyccl-0.0.0/pyccl/halos/hbias/sheth99.py +48 -0
  125. pyccl-0.0.0/pyccl/halos/hbias/tinker10.py +47 -0
  126. pyccl-0.0.0/pyccl/halos/hmfunc/__init__.py +12 -0
  127. pyccl-0.0.0/pyccl/halos/hmfunc/angulo12.py +37 -0
  128. pyccl-0.0.0/pyccl/halos/hmfunc/bocquet16.py +100 -0
  129. pyccl-0.0.0/pyccl/halos/hmfunc/bocquet20.py +79 -0
  130. pyccl-0.0.0/pyccl/halos/hmfunc/despali16.py +57 -0
  131. pyccl-0.0.0/pyccl/halos/hmfunc/jenkins01.py +35 -0
  132. pyccl-0.0.0/pyccl/halos/hmfunc/nishimichi19.py +96 -0
  133. pyccl-0.0.0/pyccl/halos/hmfunc/press74.py +33 -0
  134. pyccl-0.0.0/pyccl/halos/hmfunc/sheth99.py +51 -0
  135. pyccl-0.0.0/pyccl/halos/hmfunc/tinker08.py +55 -0
  136. pyccl-0.0.0/pyccl/halos/hmfunc/tinker10.py +86 -0
  137. pyccl-0.0.0/pyccl/halos/hmfunc/watson13.py +66 -0
  138. pyccl-0.0.0/pyccl/halos/massdef.py +368 -0
  139. pyccl-0.0.0/pyccl/halos/pk_1pt.py +75 -0
  140. pyccl-0.0.0/pyccl/halos/pk_2pt.py +232 -0
  141. pyccl-0.0.0/pyccl/halos/pk_4pt.py +1610 -0
  142. pyccl-0.0.0/pyccl/halos/profiles/__init__.py +8 -0
  143. pyccl-0.0.0/pyccl/halos/profiles/cib_shang12.py +276 -0
  144. pyccl-0.0.0/pyccl/halos/profiles/einasto.py +153 -0
  145. pyccl-0.0.0/pyccl/halos/profiles/hernquist.py +215 -0
  146. pyccl-0.0.0/pyccl/halos/profiles/hod.py +403 -0
  147. pyccl-0.0.0/pyccl/halos/profiles/ia.py +439 -0
  148. pyccl-0.0.0/pyccl/halos/profiles/nfw.py +206 -0
  149. pyccl-0.0.0/pyccl/halos/profiles/pressure_gnfw.py +245 -0
  150. pyccl-0.0.0/pyccl/halos/profiles/profile_base.py +521 -0
  151. pyccl-0.0.0/pyccl/halos/profiles_2pt.py +226 -0
  152. pyccl-0.0.0/pyccl/modified_gravity/__init__.py +2 -0
  153. pyccl-0.0.0/pyccl/modified_gravity/modified_gravity_base.py +8 -0
  154. pyccl-0.0.0/pyccl/modified_gravity/mu_Sigma.py +47 -0
  155. pyccl-0.0.0/pyccl/neutrinos.py +91 -0
  156. pyccl-0.0.0/pyccl/nl_pt/__init__.py +4 -0
  157. pyccl-0.0.0/pyccl/nl_pt/bacco_lbias.py +456 -0
  158. pyccl-0.0.0/pyccl/nl_pt/ept.py +698 -0
  159. pyccl-0.0.0/pyccl/nl_pt/lpt.py +485 -0
  160. pyccl-0.0.0/pyccl/nl_pt/tracers.py +242 -0
  161. pyccl-0.0.0/pyccl/numpy.i +3166 -0
  162. pyccl-0.0.0/pyccl/pk2d.py +568 -0
  163. pyccl-0.0.0/pyccl/power.py +208 -0
  164. pyccl-0.0.0/pyccl/pyutils.py +760 -0
  165. pyccl-0.0.0/pyccl/tests/__init__.py +0 -0
  166. pyccl-0.0.0/pyccl/tests/conftest.py +23 -0
  167. pyccl-0.0.0/pyccl/tests/test__caching.py +168 -0
  168. pyccl-0.0.0/pyccl/tests/test_bacco_lbias_power.py +245 -0
  169. pyccl-0.0.0/pyccl/tests/test_baccoemu.py +162 -0
  170. pyccl-0.0.0/pyccl/tests/test_background.py +255 -0
  171. pyccl-0.0.0/pyccl/tests/test_baryons.py +67 -0
  172. pyccl-0.0.0/pyccl/tests/test_baryons_vd19.py +66 -0
  173. pyccl-0.0.0/pyccl/tests/test_cclerror.py +64 -0
  174. pyccl-0.0.0/pyccl/tests/test_cclobject.py +168 -0
  175. pyccl-0.0.0/pyccl/tests/test_cells.py +160 -0
  176. pyccl-0.0.0/pyccl/tests/test_concentration.py +85 -0
  177. pyccl-0.0.0/pyccl/tests/test_correlations.py +136 -0
  178. pyccl-0.0.0/pyccl/tests/test_cosmicemu.py +36 -0
  179. pyccl-0.0.0/pyccl/tests/test_cosmology.py +313 -0
  180. pyccl-0.0.0/pyccl/tests/test_cosmology_parameters.py +344 -0
  181. pyccl-0.0.0/pyccl/tests/test_covariances.py +173 -0
  182. pyccl-0.0.0/pyccl/tests/test_ept_power.py +283 -0
  183. pyccl-0.0.0/pyccl/tests/test_fftlog.py +96 -0
  184. pyccl-0.0.0/pyccl/tests/test_gsl_splines.py +34 -0
  185. pyccl-0.0.0/pyccl/tests/test_halofit_highz.py +54 -0
  186. pyccl-0.0.0/pyccl/tests/test_halomodel.py +52 -0
  187. pyccl-0.0.0/pyccl/tests/test_hashing.py +34 -0
  188. pyccl-0.0.0/pyccl/tests/test_hbias.py +55 -0
  189. pyccl-0.0.0/pyccl/tests/test_hmcalculator_integrals.py +99 -0
  190. pyccl-0.0.0/pyccl/tests/test_hmcalculator_number_counts.py +165 -0
  191. pyccl-0.0.0/pyccl/tests/test_hmfunc.py +244 -0
  192. pyccl-0.0.0/pyccl/tests/test_lpt_power.py +171 -0
  193. pyccl-0.0.0/pyccl/tests/test_m2r_sM.py +31 -0
  194. pyccl-0.0.0/pyccl/tests/test_massdef.py +122 -0
  195. pyccl-0.0.0/pyccl/tests/test_massfunction.py +47 -0
  196. pyccl-0.0.0/pyccl/tests/test_mg.py +50 -0
  197. pyccl-0.0.0/pyccl/tests/test_neutrinos.py +20 -0
  198. pyccl-0.0.0/pyccl/tests/test_nonlin_camb_power.py +60 -0
  199. pyccl-0.0.0/pyccl/tests/test_pk2d.py +477 -0
  200. pyccl-0.0.0/pyccl/tests/test_pkhm.py +298 -0
  201. pyccl-0.0.0/pyccl/tests/test_power.py +512 -0
  202. pyccl-0.0.0/pyccl/tests/test_power_mu_sigma_sigma8norm.py +96 -0
  203. pyccl-0.0.0/pyccl/tests/test_profiles.py +721 -0
  204. pyccl-0.0.0/pyccl/tests/test_pt_tracers.py +58 -0
  205. pyccl-0.0.0/pyccl/tests/test_pyutils.py +6 -0
  206. pyccl-0.0.0/pyccl/tests/test_resampling.py +65 -0
  207. pyccl-0.0.0/pyccl/tests/test_spline_integ.py +67 -0
  208. pyccl-0.0.0/pyccl/tests/test_swig_interface.py +138 -0
  209. pyccl-0.0.0/pyccl/tests/test_tk3d.py +233 -0
  210. pyccl-0.0.0/pyccl/tests/test_tkk1h.py +112 -0
  211. pyccl-0.0.0/pyccl/tests/test_tkk2h.py +326 -0
  212. pyccl-0.0.0/pyccl/tests/test_tkk3h.py +211 -0
  213. pyccl-0.0.0/pyccl/tests/test_tkk4h.py +155 -0
  214. pyccl-0.0.0/pyccl/tests/test_tkkcNG.py +108 -0
  215. pyccl-0.0.0/pyccl/tests/test_tkkssc.py +236 -0
  216. pyccl-0.0.0/pyccl/tests/test_tracers.py +500 -0
  217. pyccl-0.0.0/pyccl/tests/test_yaml.py +79 -0
  218. pyccl-0.0.0/pyccl/tk3d.py +257 -0
  219. pyccl-0.0.0/pyccl/tracers.py +1069 -0
  220. pyccl-0.0.0/pyccl.egg-info/PKG-INFO +156 -0
  221. pyccl-0.0.0/pyccl.egg-info/SOURCES.txt +244 -0
  222. pyccl-0.0.0/pyccl.egg-info/dependency_links.txt +1 -0
  223. pyccl-0.0.0/pyccl.egg-info/requires.txt +5 -0
  224. pyccl-0.0.0/pyccl.egg-info/top_level.txt +1 -0
  225. pyccl-0.0.0/pyproject.toml +47 -0
  226. pyccl-0.0.0/setup.cfg +4 -0
  227. pyccl-0.0.0/setup.py +67 -0
  228. pyccl-0.0.0/src/ccl_background.c +1404 -0
  229. pyccl-0.0.0/src/ccl_bbks.c +26 -0
  230. pyccl-0.0.0/src/ccl_cls.c +612 -0
  231. pyccl-0.0.0/src/ccl_core.c +627 -0
  232. pyccl-0.0.0/src/ccl_correlation.c +974 -0
  233. pyccl-0.0.0/src/ccl_eh.c +178 -0
  234. pyccl-0.0.0/src/ccl_error.c +47 -0
  235. pyccl-0.0.0/src/ccl_f1d.c +200 -0
  236. pyccl-0.0.0/src/ccl_f2d.c +545 -0
  237. pyccl-0.0.0/src/ccl_f3d.c +422 -0
  238. pyccl-0.0.0/src/ccl_fftlog.c +535 -0
  239. pyccl-0.0.0/src/ccl_halofit.c +930 -0
  240. pyccl-0.0.0/src/ccl_mass_conversion.c +130 -0
  241. pyccl-0.0.0/src/ccl_massfunc.c +185 -0
  242. pyccl-0.0.0/src/ccl_musigma.c +292 -0
  243. pyccl-0.0.0/src/ccl_neutrinos.c +207 -0
  244. pyccl-0.0.0/src/ccl_power.c +560 -0
  245. pyccl-0.0.0/src/ccl_tracers.c +746 -0
  246. pyccl-0.0.0/src/ccl_utils.c +363 -0
@@ -0,0 +1,146 @@
1
+ cmake_minimum_required(VERSION 3.2)
2
+ if (NOT CMAKE_BUILD_TYPE)
3
+ message(STATUS "No build type selected, default to Release")
4
+ set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
5
+ endif()
6
+ MESSAGE( STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE} )
7
+
8
+ # Adding customized cmake module
9
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/")
10
+
11
+ project(ccl VERSION 3.1)
12
+
13
+ # Uncomment to get detailed build outputs
14
+ # set( CMAKE_VERBOSE_MAKEFILE on )
15
+
16
+ option(FORCE_OPENMP "Forcibly use OpenMP " NO)
17
+
18
+ # Defines list of CCL src files
19
+ set(CCL_SRC
20
+ src/ccl_background.c src/ccl_core.c src/ccl_error.c
21
+ src/ccl_bbks.c src/ccl_f1d.c src/ccl_f2d.c src/ccl_f3d.c
22
+ src/ccl_power.c
23
+ src/ccl_eh.c src/ccl_musigma.c
24
+ src/ccl_utils.c src/ccl_cls.c src/ccl_massfunc.c
25
+ src/ccl_neutrinos.c
26
+ src/ccl_correlation.c
27
+ src/ccl_halofit.c
28
+ src/ccl_tracers.c
29
+ src/ccl_mass_conversion.c
30
+ src/ccl_fftlog.c)
31
+
32
+ # Defines list of CCL C test src files
33
+ # ! Add new tests of the C code to this list
34
+ set(TEST_SRC
35
+ # test core code first
36
+ benchmarks/ccl_test.c
37
+ benchmarks/ccl_test_utils.c
38
+ benchmarks/ccl_test_f2d.c
39
+ benchmarks/ccl_test_f3d.c
40
+ )
41
+
42
+
43
+ # Defines list of extra distribution files and directories to be installed on the system
44
+ set(EXTRA_DIST README.md LICENSE LICENSE_COSMICEMU)
45
+ set(EXTRA_DIST_DIRS)
46
+
47
+ # Uses system libraries or downloads and build if necessary
48
+ include(BuildFFTW)
49
+ include(BuildGSL)
50
+
51
+ if(("${CMAKE_C_COMPILER_ID}" MATCHES "^(Apple)+Clang$") AND (CMAKE_C_COMPILER_VERSION LESS 13) AND NOT FORCE_OPENMP)
52
+ # Apple Clang 12 (and maybe below) have issues with OpenMP and cmake, so we don't try to find it
53
+ # Anything else supports OpenMP
54
+ # This can be overwritten by setting FORCE_OPENMP=TRUE and adding "-L/usr/local/lib -lomp" to LDFLAGS
55
+ # by issuing 'export LDFLAGS="$LDFLAGS -L/usr/local/lib -lomp"' in the command line
56
+ else()
57
+ find_package(OpenMP)
58
+ endif()
59
+
60
+ # Compilation flags
61
+ set(CMAKE_C_FLAGS_RELEASE "-O3 -fomit-frame-pointer -fno-common -fPIC -std=gnu99")
62
+ set(CMAKE_C_FLAGS_DEBUG "-O0 -g -fomit-frame-pointer -fno-common -fPIC -std=gnu99")
63
+
64
+ if(OpenMP_C_FOUND)
65
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${OpenMP_C_FLAGS}")
66
+ include_directories(${OpenMP_C_INCLUDE_DIR})
67
+ if(FORCE_OPENMP)
68
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${OpenMP_C_FLAGS}")
69
+ endif()
70
+ endif()
71
+
72
+ if(DEFINED ENV{CONDA_PREFIX})
73
+ include_directories("$ENV{CONDA_PREFIX}/include")
74
+ add_link_options("LINKER:-rpath,$ENV{CONDA_PREFIX}/lib")
75
+ # Use conda libraries if available
76
+ add_link_options("-L$ENV{CONDA_PREFIX}/lib")
77
+ endif()
78
+
79
+ # Define include and library directories for external dependencies
80
+ include_directories(${GSL_INCLUDE_DIRS} ${FFTW_INCLUDES})
81
+ link_directories(${GSL_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS})
82
+ # Adds path to CCL include folder
83
+ include_directories(include)
84
+
85
+ #
86
+ # Builds the main CCL library
87
+ #
88
+
89
+ # Compiles all the source files
90
+ add_library(objlib OBJECT ${CCL_SRC})
91
+ # Make sure the external projects are correclty built
92
+ if(NOT GSL_FOUND)
93
+ add_dependencies(objlib GSL)
94
+ endif()
95
+ if(NOT FFTW_FOUND)
96
+ add_dependencies(objlib FFTW)
97
+ endif()
98
+
99
+ # The reason for building ccl as a shared library is that we can link it to
100
+ # class directly, and it's not a dependency anymore
101
+ add_library(ccl SHARED $<TARGET_OBJECTS:objlib>)
102
+ # The generator expression $<$<BOOL:${OpenMP_C_FOUND}>:OpenMP::OpenMP_C> adds the OpenMP library if OpenMP is available
103
+ target_link_libraries(ccl ${GSL_LIBRARIES} ${FFTW_LIBRARIES} ${CLASS_LIBRARIES} m $<$<BOOL:${OpenMP_C_FOUND}>:OpenMP::OpenMP_C>)
104
+
105
+ # Builds the test suite
106
+ add_executable(check_ccl ${TEST_SRC})
107
+ target_link_libraries(check_ccl ccl)
108
+
109
+ # Builds pkgconfig file for CCL
110
+ SET(PROJECT_DESCRIPTION "DESC Core Cosmology Library: cosmology routines with validated numerical accuracy")
111
+ SET(PKG_CONFIG_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
112
+ SET(PKG_CONFIG_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include/")
113
+ SET(PKG_CONFIG_REQUIRES "gsl >= 2.1")
114
+ SET(PKG_CONFIG_REQUIRES_PRIVATE "fftw3")
115
+ SET(PKG_CONFIG_LIBS "-L${PKG_CONFIG_LIBDIR} -lccl -lm")
116
+ SET(PKG_CONFIG_CFLAGS "-I${PKG_CONFIG_INCLUDEDIR}")
117
+ CONFIGURE_FILE(
118
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/pkg-config.cmakein"
119
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc" )
120
+
121
+ # Installs the CCL library
122
+ install(
123
+ TARGETS ccl check_ccl
124
+ RUNTIME DESTINATION bin
125
+ LIBRARY DESTINATION lib
126
+ ARCHIVE DESTINATION lib)
127
+ install(
128
+ DIRECTORY include/
129
+ DESTINATION include
130
+ FILES_MATCHING PATTERN "*.h")
131
+ install(FILES ${EXTRA_DIST} DESTINATION share/ccl)
132
+ install(DIRECTORY ${EXTRA_DIST_DIRS} DESTINATION share/ccl)
133
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ccl.pc DESTINATION lib/pkgconfig)
134
+
135
+ # Adds uninstall target
136
+ if(NOT TARGET uninstall)
137
+ configure_file(
138
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
139
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
140
+ IMMEDIATE @ONLY)
141
+ add_custom_target(uninstall
142
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
143
+ endif()
144
+
145
+ # Optionally builds the python wrapper
146
+ add_subdirectory(pyccl EXCLUDE_FROM_ALL)
pyccl-0.0.0/LICENSE ADDED
@@ -0,0 +1,27 @@
1
+ Copyright (c) 2016-2018, the LSSTDESC CCL contributors (https://github.com/LSSTDESC/CCL/graphs/contributors).
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+
14
+ * Neither the name of CCL nor the names of its
15
+ contributors may be used to endorse or promote products derived from
16
+ this software without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,10 @@
1
+ Copyright (c) 2017, Los Alamos National Security, LLC
2
+ All rights reserved.
3
+ Copyright 2017. Los Alamos National Security, LLC. This software was produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National Laboratory (LANL), which is operated by Los Alamos National Security, LLC for the U.S. Department of Energy. The U.S. Government has rights to use, reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to produce derivative works, such modified software should be clearly marked, so as not to confuse it with the version available from LANL.
4
+
5
+ Additionally, redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
+ 3. Neither the name of Los Alamos National Security, LLC, Los Alamos National Laboratory, LANL, the U.S. Government, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9
+
10
+ THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,16 @@
1
+ recursive-include cmake *
2
+ recursive-include include *
3
+ recursive-include src *
4
+ recursive-include pyccl *.i CMakeLists.txt
5
+ recursive-exclude examples *.ipynb
6
+ recursive-include benchmarks *.c
7
+ recursive-include benchmarks *.h
8
+ include CMakeLists.txt
9
+ include pyccl/CMakeLists.txt
10
+ include LICENSE
11
+ include LICENSE_COSMICEMU
12
+ include README.md
13
+ prune doc
14
+ prune readthedocs
15
+ prune .travis
16
+ exclude .*
pyccl-0.0.0/PKG-INFO ADDED
@@ -0,0 +1,156 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyccl
3
+ Version: 0.0.0
4
+ Summary: Library of validated cosmological functions.
5
+ Author: LSST DESC
6
+ License: BSD
7
+ Project-URL: homepage, https://lsstdesc.org/
8
+ Project-URL: documentation, https://ccl.readthedocs.io/en/latest/
9
+ Project-URL: repository, https://github.com/LSSTDESC/CCL
10
+ Keywords: cosmology,astrophysics,physics,science,LSST
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: BSD License
14
+ Classifier: Operating System :: MacOS :: MacOS X
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: C
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
19
+ Classifier: Topic :: Scientific/Engineering :: Physics
20
+ Requires-Python: >=3.8
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ License-File: LICENSE_COSMICEMU
24
+ Requires-Dist: numpy
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest; extra == "dev"
27
+ Requires-Dist: pytest-cov; extra == "dev"
28
+
29
+ <!---
30
+ STYLE CONVENTION USED
31
+ bolt italic:
32
+ ***file***"
33
+ code:
34
+ `program` or `library``
35
+ `commands` or `paths`
36
+ `variable`
37
+ bold code:
38
+ **`function`**
39
+ **`type`** or **`structure`**
40
+ -->
41
+ # CCL
42
+ ![Build](https://github.com/LSSTDESC/CCL/workflows/continuous-integration/badge.svg?branch=master)&nbsp;
43
+ [![Coverage](https://coveralls.io/repos/github/LSSTDESC/CCL/badge.svg?branch=master)](https://coveralls.io/github/LSSTDESC/CCL?branch=master)&nbsp;
44
+ [![Documentation](https://readthedocs.org/projects/ccl/badge/?version=latest)](https://ccl.readthedocs.io/en/latest/)&nbsp;
45
+ [![DOI](https://img.shields.io/badge/DOI-10.3847%2F1538--4365%2Fab1658-B31B1B.svg)](https://iopscience.iop.org/article/10.3847/1538-4365/ab1658)
46
+
47
+ The Core Cosmology Library (CCL) is a public standardized library of routines to calculate
48
+ basic observables used in cosmology. It will be the standard theoretical prediction package
49
+ used by the LSST Dark Energy Science Collaboration (DESC), although we hope it will have
50
+ broader applicability.
51
+
52
+ The core functions of this package include:
53
+
54
+ - Background quantities (Hubble parameter $H(z)$, distances etc.).
55
+ - Linear growth factor $D(z)$ and growth rate $f(z)$.
56
+ - Linear matter power spectra $P(k)$ from Boltzmann codes (CLASS, CAMB), emulators, and approximate fitting functions.
57
+ - Non-linear matter power power spectra using a variety of prescriptions, including emulators, and including the impact of baryonic effects.
58
+ - Angular power spectra $C_\ell$ and correlation functions $\xi(\theta)$ for arbitrary combinations of tracers including number counts, shear, CMB lensing, ISW, thermal SZ, CIB, as well as custom-made tracers.
59
+ - A comprehensive halo model framework able to combine different prescriptions for the halo mass function $dn/dM$, halo bias $b(M)$, concentration-mass relation $c(M)$, mass definitions, and halo profiles, as well as to provide predictions for summary statistics (power spectra, non-Gaussian covariances) of arbitrary quantities.
60
+ - Support for $\Lambda$ CDM, and $w_0-w_a$CDM cosmologies with curvature and massive neutrinos, as well as simple modified gravity extensions (e.g. $\mu-\Sigma$ ).
61
+
62
+ This software is a publicly released LSST DESC product which was developed within the LSST
63
+ DESC using LSST DESC resources. DESC users should use it in accordance with the
64
+ [LSST DESC publication policy](http://lsstdesc.org/Collaborators). External users are
65
+ welcome to use the code outside DESC in accordance with the licensing information below.
66
+
67
+ The list of publicly released versions of this package can be found
68
+ [here](https://github.com/LSSTDESC/CCL/releases). The master branch is the most
69
+ recent (non-released) stable branch, but under development. We recommend using one
70
+ of the public releases unless working on the development on the library.
71
+
72
+ See the [documentation](https://ccl.readthedocs.io/en/latest/) for more details
73
+ and installation instructions.
74
+
75
+ ## TLDR
76
+
77
+ `CCL` is available as a Python package through PyPi or conda. To install, simply run:
78
+
79
+ ```
80
+ $ conda install -c conda-forge pyccl
81
+ ```
82
+
83
+ or
84
+
85
+ ```
86
+ $ pip install pyccl
87
+ ```
88
+
89
+ For the PyPi installation, you will need ``CMake`` and ``SWIG`` installed locally.
90
+ See [Getting CMake](https://ccl.readthedocs.io/en/latest/source/installation.html#getting-cmake)
91
+ and [Installing SWIG](https://pypi.org/project/swig/) for instructions.
92
+ Note that the code only supports Linux or Mac OS, but no Windows.
93
+
94
+ Once you have the code installed, you can take it for a spin!
95
+
96
+ ```python
97
+ import pyccl as ccl
98
+ import numpy as np
99
+
100
+ # Create new Cosmology object with a given set of parameters. This keeps track
101
+ # of previously-computed cosmological functions
102
+ cosmo = ccl.Cosmology(
103
+ Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0.8, n_s=0.96,
104
+ transfer_function='bbks')
105
+
106
+ # Define a simple binned galaxy number density curve as a function of redshift
107
+ z_n = np.linspace(0., 1., 500)
108
+ n = np.ones(z_n.shape)
109
+
110
+ # Create objects to represent tracers of the weak lensing signal with this
111
+ # number density (with has_intrinsic_alignment=False)
112
+ lens1 = ccl.WeakLensingTracer(cosmo, dndz=(z_n, n))
113
+ lens2 = ccl.WeakLensingTracer(cosmo, dndz=(z_n, n))
114
+
115
+ # Calculate the angular cross-spectrum of the two tracers as a function of ell
116
+ ell = np.arange(2, 10)
117
+ cls = cosmo.angular_cl(lens1, lens2, ell)
118
+ print(cls)
119
+ ```
120
+
121
+ # License, Credits, Feedback etc
122
+
123
+ This code has been released by DESC, although it is still under active development.
124
+ It is accompanied by a journal paper that describes the development and validation of
125
+ `CCL`, which you can find on the arxiv:[1812.05995](https://arxiv.org/abs/1812.05995).
126
+ If you make use of the ideas or software here, please cite that paper and provide a
127
+ link to this repository: https://github.com/LSSTDESC/CCL. You are welcome to re-use
128
+ the code, which is open source and available under terms consistent with our
129
+ [LICENSE](https://github.com/LSSTDESC/CCL/blob/master/LICENSE)
130
+ ([BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)).
131
+
132
+ External contributors and DESC members wishing to use CCL for non-DESC projects
133
+ should consult with the TJP working group conveners, ideally before the work has
134
+ started, but definitely before any publication or posting of the work to the arXiv.
135
+
136
+ For free use of the `CLASS` library, the `CLASS` developers require that the `CLASS`
137
+ paper be cited: CLASS II: Approximation schemes, D. Blas, J. Lesgourgues, T. Tram, arXiv:1104.2933, JCAP 1107 (2011) 034.
138
+ The `CLASS` repository can be found in http://class-code.net.
139
+
140
+ The `CAMB` developers have released `CAMB` under the LGPL license with a few
141
+ additional restrictions. Please read their [LICENSE](https://github.com/cmbant/CAMB/blob/master/LICENCE.txt)
142
+ for more information.
143
+
144
+ # Contact
145
+
146
+ If you have comments, questions, or feedback, please
147
+ [write us an issue](https://github.com/LSSTDESC/CCL/issues).
148
+
149
+ The current lead of the LSST DESC CCL Topical Team is David Alonso (damonge, david.alonso at physics.ox.ac.uk).
150
+
151
+
152
+ # Acknowledgements
153
+
154
+ The DESC acknowledges ongoing support from the Institut National de Physique Nucleaire et de Physique des Particules in France; the Science \& Technology Facilities Council in the United Kingdom; and the Department of Energy, the National Science Foundation, and the LSST Corporation in the United States. DESC uses resources of the IN2P3 Computing Center (CC-IN2P3--Lyon/Villeurbanne - France) funded by the Centre National de la Recherche Scientifique; the National Energy Research Scientific Computing Center, a DOE Office of Science User Facility supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231; STFC DiRAC HPC Facilities, funded by UK BIS National E-infrastructure capital grants; and the UK particle physics grid, supported by the GridPP Collaboration. This work was performed in part under DOE Contract DE-AC02-76SF00515.
155
+
156
+ NEC acknowledges support from a Royal Astronomical Society research fellowship and the Delta ITP consortium, a program of the Netherlands Organisation for Scientific Research (NWO) that is funded by the Dutch Ministry of Education, Culture and Science (OCW). DA acknowledges support from the Science and Technology Facilities Council through an Ernest Rutherford Fellowship, grant reference ST/P004474. AL and CG acknowledge support from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement No. [616170] for work on the generic interface for theory inputs.
pyccl-0.0.0/README.md ADDED
@@ -0,0 +1,128 @@
1
+ <!---
2
+ STYLE CONVENTION USED
3
+ bolt italic:
4
+ ***file***"
5
+ code:
6
+ `program` or `library``
7
+ `commands` or `paths`
8
+ `variable`
9
+ bold code:
10
+ **`function`**
11
+ **`type`** or **`structure`**
12
+ -->
13
+ # CCL
14
+ ![Build](https://github.com/LSSTDESC/CCL/workflows/continuous-integration/badge.svg?branch=master)&nbsp;
15
+ [![Coverage](https://coveralls.io/repos/github/LSSTDESC/CCL/badge.svg?branch=master)](https://coveralls.io/github/LSSTDESC/CCL?branch=master)&nbsp;
16
+ [![Documentation](https://readthedocs.org/projects/ccl/badge/?version=latest)](https://ccl.readthedocs.io/en/latest/)&nbsp;
17
+ [![DOI](https://img.shields.io/badge/DOI-10.3847%2F1538--4365%2Fab1658-B31B1B.svg)](https://iopscience.iop.org/article/10.3847/1538-4365/ab1658)
18
+
19
+ The Core Cosmology Library (CCL) is a public standardized library of routines to calculate
20
+ basic observables used in cosmology. It will be the standard theoretical prediction package
21
+ used by the LSST Dark Energy Science Collaboration (DESC), although we hope it will have
22
+ broader applicability.
23
+
24
+ The core functions of this package include:
25
+
26
+ - Background quantities (Hubble parameter $H(z)$, distances etc.).
27
+ - Linear growth factor $D(z)$ and growth rate $f(z)$.
28
+ - Linear matter power spectra $P(k)$ from Boltzmann codes (CLASS, CAMB), emulators, and approximate fitting functions.
29
+ - Non-linear matter power power spectra using a variety of prescriptions, including emulators, and including the impact of baryonic effects.
30
+ - Angular power spectra $C_\ell$ and correlation functions $\xi(\theta)$ for arbitrary combinations of tracers including number counts, shear, CMB lensing, ISW, thermal SZ, CIB, as well as custom-made tracers.
31
+ - A comprehensive halo model framework able to combine different prescriptions for the halo mass function $dn/dM$, halo bias $b(M)$, concentration-mass relation $c(M)$, mass definitions, and halo profiles, as well as to provide predictions for summary statistics (power spectra, non-Gaussian covariances) of arbitrary quantities.
32
+ - Support for $\Lambda$ CDM, and $w_0-w_a$CDM cosmologies with curvature and massive neutrinos, as well as simple modified gravity extensions (e.g. $\mu-\Sigma$ ).
33
+
34
+ This software is a publicly released LSST DESC product which was developed within the LSST
35
+ DESC using LSST DESC resources. DESC users should use it in accordance with the
36
+ [LSST DESC publication policy](http://lsstdesc.org/Collaborators). External users are
37
+ welcome to use the code outside DESC in accordance with the licensing information below.
38
+
39
+ The list of publicly released versions of this package can be found
40
+ [here](https://github.com/LSSTDESC/CCL/releases). The master branch is the most
41
+ recent (non-released) stable branch, but under development. We recommend using one
42
+ of the public releases unless working on the development on the library.
43
+
44
+ See the [documentation](https://ccl.readthedocs.io/en/latest/) for more details
45
+ and installation instructions.
46
+
47
+ ## TLDR
48
+
49
+ `CCL` is available as a Python package through PyPi or conda. To install, simply run:
50
+
51
+ ```
52
+ $ conda install -c conda-forge pyccl
53
+ ```
54
+
55
+ or
56
+
57
+ ```
58
+ $ pip install pyccl
59
+ ```
60
+
61
+ For the PyPi installation, you will need ``CMake`` and ``SWIG`` installed locally.
62
+ See [Getting CMake](https://ccl.readthedocs.io/en/latest/source/installation.html#getting-cmake)
63
+ and [Installing SWIG](https://pypi.org/project/swig/) for instructions.
64
+ Note that the code only supports Linux or Mac OS, but no Windows.
65
+
66
+ Once you have the code installed, you can take it for a spin!
67
+
68
+ ```python
69
+ import pyccl as ccl
70
+ import numpy as np
71
+
72
+ # Create new Cosmology object with a given set of parameters. This keeps track
73
+ # of previously-computed cosmological functions
74
+ cosmo = ccl.Cosmology(
75
+ Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0.8, n_s=0.96,
76
+ transfer_function='bbks')
77
+
78
+ # Define a simple binned galaxy number density curve as a function of redshift
79
+ z_n = np.linspace(0., 1., 500)
80
+ n = np.ones(z_n.shape)
81
+
82
+ # Create objects to represent tracers of the weak lensing signal with this
83
+ # number density (with has_intrinsic_alignment=False)
84
+ lens1 = ccl.WeakLensingTracer(cosmo, dndz=(z_n, n))
85
+ lens2 = ccl.WeakLensingTracer(cosmo, dndz=(z_n, n))
86
+
87
+ # Calculate the angular cross-spectrum of the two tracers as a function of ell
88
+ ell = np.arange(2, 10)
89
+ cls = cosmo.angular_cl(lens1, lens2, ell)
90
+ print(cls)
91
+ ```
92
+
93
+ # License, Credits, Feedback etc
94
+
95
+ This code has been released by DESC, although it is still under active development.
96
+ It is accompanied by a journal paper that describes the development and validation of
97
+ `CCL`, which you can find on the arxiv:[1812.05995](https://arxiv.org/abs/1812.05995).
98
+ If you make use of the ideas or software here, please cite that paper and provide a
99
+ link to this repository: https://github.com/LSSTDESC/CCL. You are welcome to re-use
100
+ the code, which is open source and available under terms consistent with our
101
+ [LICENSE](https://github.com/LSSTDESC/CCL/blob/master/LICENSE)
102
+ ([BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)).
103
+
104
+ External contributors and DESC members wishing to use CCL for non-DESC projects
105
+ should consult with the TJP working group conveners, ideally before the work has
106
+ started, but definitely before any publication or posting of the work to the arXiv.
107
+
108
+ For free use of the `CLASS` library, the `CLASS` developers require that the `CLASS`
109
+ paper be cited: CLASS II: Approximation schemes, D. Blas, J. Lesgourgues, T. Tram, arXiv:1104.2933, JCAP 1107 (2011) 034.
110
+ The `CLASS` repository can be found in http://class-code.net.
111
+
112
+ The `CAMB` developers have released `CAMB` under the LGPL license with a few
113
+ additional restrictions. Please read their [LICENSE](https://github.com/cmbant/CAMB/blob/master/LICENCE.txt)
114
+ for more information.
115
+
116
+ # Contact
117
+
118
+ If you have comments, questions, or feedback, please
119
+ [write us an issue](https://github.com/LSSTDESC/CCL/issues).
120
+
121
+ The current lead of the LSST DESC CCL Topical Team is David Alonso (damonge, david.alonso at physics.ox.ac.uk).
122
+
123
+
124
+ # Acknowledgements
125
+
126
+ The DESC acknowledges ongoing support from the Institut National de Physique Nucleaire et de Physique des Particules in France; the Science \& Technology Facilities Council in the United Kingdom; and the Department of Energy, the National Science Foundation, and the LSST Corporation in the United States. DESC uses resources of the IN2P3 Computing Center (CC-IN2P3--Lyon/Villeurbanne - France) funded by the Centre National de la Recherche Scientifique; the National Energy Research Scientific Computing Center, a DOE Office of Science User Facility supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231; STFC DiRAC HPC Facilities, funded by UK BIS National E-infrastructure capital grants; and the UK particle physics grid, supported by the GridPP Collaboration. This work was performed in part under DOE Contract DE-AC02-76SF00515.
127
+
128
+ NEC acknowledges support from a Royal Astronomical Society research fellowship and the Delta ITP consortium, a program of the Netherlands Organisation for Scientific Research (NWO) that is funded by the Dutch Ministry of Education, Culture and Science (OCW). DA acknowledges support from the Science and Technology Facilities Council through an Ernest Rutherford Fellowship, grant reference ST/P004474. AL and CG acknowledge support from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement No. [616170] for work on the generic interface for theory inputs.
@@ -0,0 +1,16 @@
1
+ #include <stdio.h>
2
+
3
+ #define CTEST_MAIN
4
+
5
+ // uncomment lines below to enable/disable features. See README.md for details
6
+ //#define CTEST_SEGFAULT
7
+ //#define CTEST_NO_COLORS
8
+ //#define CTEST_COLOR_OK
9
+
10
+ #include "ctest.h"
11
+
12
+ int main(int argc, const char *argv[])
13
+ {
14
+ int result = ctest_main(argc, argv);
15
+ return result;
16
+ }