classy-szfast 0.0.25.post19__tar.gz → 0.0.25.post21__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 (25) hide show
  1. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/PKG-INFO +1 -1
  2. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/classy_sz.py +11 -1
  3. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/classy_szfast.py +13 -2
  4. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/cosmopower_jax.py +2 -0
  5. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/utils.py +1 -0
  6. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast.egg-info/PKG-INFO +1 -1
  7. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/pyproject.toml +1 -1
  8. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/README.md +0 -0
  9. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/__init__.py +0 -0
  10. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/config.py +0 -0
  11. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/cosmopower.py +0 -0
  12. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/cosmosis_classy_szfast_interface.py +0 -0
  13. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/custom_bias/__init__.py +0 -0
  14. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/custom_bias/custom_bias.py +0 -0
  15. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/custom_profiles/__init__.py +0 -0
  16. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/custom_profiles/custom_profiles.py +0 -0
  17. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/emulators_meta_data.py +0 -0
  18. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/pks_and_sigmas.py +0 -0
  19. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/restore_nn.py +0 -0
  20. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast/suppress_warnings.py +0 -0
  21. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast.egg-info/SOURCES.txt +0 -0
  22. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast.egg-info/dependency_links.txt +0 -0
  23. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast.egg-info/requires.txt +0 -0
  24. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/classy_szfast.egg-info/top_level.txt +0 -0
  25. {classy_szfast-0.0.25.post19 → classy_szfast-0.0.25.post21}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: classy_szfast
3
- Version: 0.0.25.post19
3
+ Version: 0.0.25.post21
4
4
  Summary: The accelerator of the class_sz code from https://github.com/CLASS-SZ
5
5
  Maintainer-email: Boris Bolliet <bb667@cam.ac.uk>
6
6
  License: MIT
@@ -7,6 +7,9 @@ import os
7
7
  import numpy as np
8
8
  import time
9
9
 
10
+ import warnings
11
+
12
+
10
13
  class classy_sz(classy):
11
14
 
12
15
  use_class_sz_fast_mode = 1 # this is passed in the yaml file
@@ -22,7 +25,14 @@ class classy_sz(classy):
22
25
  if not self.classy_module:
23
26
  raise NotInstalledError(
24
27
  self.log, "Could not find CLASS_SZ. Check error message above.")
25
-
28
+
29
+ # Ignore the specific UserWarning from mcfit about using backend='jax'
30
+ warnings.filterwarnings(
31
+ "ignore",
32
+ message="use backend='jax' if desired",
33
+ category=UserWarning
34
+ )
35
+
26
36
  from classy_sz import Class, CosmoSevereError, CosmoComputationError
27
37
 
28
38
  # import classy_sz
@@ -12,6 +12,8 @@ from multiprocessing import Process
12
12
  from mcfit import TophatVar
13
13
  from scipy.interpolate import CubicSpline
14
14
  import pickle
15
+ import jax
16
+ jax.config.update("jax_enable_x64", True)
15
17
  import jax.numpy as jnp
16
18
  import jax.scipy as jscipy
17
19
 
@@ -129,7 +131,16 @@ class Class_szfast(object):
129
131
  self.pow = jnp.power
130
132
 
131
133
  self.sigma_B = 2. * self.pow(self.pi,5) * self.pow(Const._k_B_,4) / 15. / self.pow(Const._h_P_,3) / self.pow(Const._c_,2)
132
-
134
+ # print('sigma_B',self.sigma_B)
135
+ # print('pi',self.pi)
136
+ # print('k_B',Const._k_B_)
137
+ # print('h_P',Const._h_P_)
138
+ # print('c',Const._c_)
139
+ # print('pow(pi,5)',self.pow(self.pi,5))
140
+ # print('pow(k_B,4)',self.pow(Const._k_B_,4)) ## this doesnt work if float64 is disabled
141
+ # print('15.',15.)
142
+ # print('pow(h_P,3)',self.pow(Const._h_P_,3)) ## this doesnt work if float64 is disabled
143
+ # print('pow(c,2)',self.pow(Const._c_,2))
133
144
  self.linspace = jnp.linspace
134
145
  self.geomspace = jnp.geomspace
135
146
  self.arange = jnp.arange
@@ -173,7 +184,7 @@ class Class_szfast(object):
173
184
  self.cp_pkl_fftlog_alphas_real_nn = cp_pkl_fftlog_alphas_real_nn
174
185
  self.cp_pkl_fftlog_alphas_imag_nn = cp_pkl_fftlog_alphas_imag_nn
175
186
 
176
- self.cosmo_model = 'ede-v2'
187
+ self.cosmo_model = 'lcdm'
177
188
 
178
189
  self.use_Amod = 0
179
190
  self.Amod = 0
@@ -1,5 +1,7 @@
1
1
  from .config import path_to_class_sz_data
2
2
  import numpy as np
3
+ import jax
4
+ jax.config.update("jax_enable_x64", True)
3
5
  import jax.numpy as jnp
4
6
  from .restore_nn import Restore_NN
5
7
  from .restore_nn import Restore_PCAplusNN
@@ -14,6 +14,7 @@ from numpy import linalg as LA
14
14
  import mcfit
15
15
  from mcfit import P2xi
16
16
  import jax
17
+ jax.config.update("jax_enable_x64", True)
17
18
  import jax.numpy as jnp
18
19
  # import cosmopower
19
20
  # import classy_sz as csz
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: classy_szfast
3
- Version: 0.0.25.post19
3
+ Version: 0.0.25.post21
4
4
  Summary: The accelerator of the class_sz code from https://github.com/CLASS-SZ
5
5
  Maintainer-email: Boris Bolliet <bb667@cam.ac.uk>
6
6
  License: MIT
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
- version = "0.0.25.post19"
6
+ version = "0.0.25.post21"
7
7
  license = { text = "MIT" }
8
8
  name = "classy_szfast"
9
9
  maintainers = [{name = "Boris Bolliet",email="bb667@cam.ac.uk"}]