classy-szfast 0.0.25.post17__tar.gz → 0.0.25.post18__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.post17 → classy_szfast-0.0.25.post18}/PKG-INFO +1 -1
  2. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/classy_sz.py +51 -1
  3. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast.egg-info/PKG-INFO +1 -1
  4. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/pyproject.toml +1 -1
  5. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/README.md +0 -0
  6. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/__init__.py +0 -0
  7. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/classy_szfast.py +0 -0
  8. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/config.py +0 -0
  9. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/cosmopower.py +0 -0
  10. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/cosmopower_jax.py +0 -0
  11. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/cosmosis_classy_szfast_interface.py +0 -0
  12. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/custom_bias/__init__.py +0 -0
  13. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/custom_bias/custom_bias.py +0 -0
  14. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/custom_profiles/__init__.py +0 -0
  15. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/custom_profiles/custom_profiles.py +0 -0
  16. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/emulators_meta_data.py +0 -0
  17. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/pks_and_sigmas.py +0 -0
  18. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/restore_nn.py +0 -0
  19. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/suppress_warnings.py +0 -0
  20. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast/utils.py +0 -0
  21. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast.egg-info/SOURCES.txt +0 -0
  22. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast.egg-info/dependency_links.txt +0 -0
  23. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast.egg-info/requires.txt +0 -0
  24. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/classy_szfast.egg-info/top_level.txt +0 -0
  25. {classy_szfast-0.0.25.post17 → classy_szfast-0.0.25.post18}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: classy_szfast
3
- Version: 0.0.25.post17
3
+ Version: 0.0.25.post18
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
@@ -24,6 +24,19 @@ class classy_sz(classy):
24
24
  self.log, "Could not find CLASS_SZ. Check error message above.")
25
25
 
26
26
  from classy_sz import Class, CosmoSevereError, CosmoComputationError
27
+
28
+ # import classy_sz
29
+ # import os
30
+ # path_to_data = os.getenv("PATH_TO_CLASS_SZ_DATA")
31
+ # print(path_to_data)
32
+
33
+ # print(classy_sz.__file__)
34
+
35
+ # import classy_szfast
36
+ # print(classy_szfast.__file__)
37
+ # import sys; sys.exit()
38
+ # print(sys.path)
39
+
27
40
 
28
41
  global CosmoComputationError, CosmoSevereError
29
42
 
@@ -447,10 +460,32 @@ class classy_sz(classy):
447
460
  else:
448
461
 
449
462
  start_time = time.time()
463
+ # self.classy = Class()
464
+ # print('pars in classy',self.classy.pars)
450
465
  self.classy.compute_class_szfast(likelihood_mode=True)
451
466
  end_time = time.time()
452
467
  # self.log.info("Execution time of class_szfast: {:.5f} seconds".format(end_time - start_time))
453
- # print('pars in classy',self.classy.pars)
468
+
469
+ # some debug printouts
470
+ # cl_kk_hm = self.classy.cl_kk
471
+ # ell = np.asarray(cl_kk_hm()['ell'])
472
+ # fac = ell*(ell+1.)/2./np.pi
473
+ # cl_kk_hf = np.asarray(cl_kk_hm()['hf'])/fac
474
+ # print('cl_kk_hf',cl_kk_hf[0])
475
+ # print('ell',ell[0])
476
+ # print('pp',self.classy.lensed_cl()['pp'][2])
477
+ # print('angular_distance',self.classy.angular_distance(0.1))
478
+ # print('Omega_Lambda',self.classy.Omega_Lambda())
479
+ # print('Hubble',self.classy.Hubble(0))
480
+ # print('Omega_m',self.classy.Omega_m())
481
+ # print('Neff',self.classy.Neff())
482
+ # print('m_ncdm_tot',self.classy.get_current_derived_parameters(['m_ncdm_tot']))
483
+ # print('Neff',self.classy.get_current_derived_parameters(['Neff']))
484
+ # print('Omega_m',self.classy.get_current_derived_parameters(['Omega_m']))
485
+ # print('h',self.classy.get_current_derived_parameters(['h']))
486
+ # print('m_ncdm_in_eV',self.classy.get_current_derived_parameters(['m_ncdm_in_eV']))
487
+ # print("\n\n-----------------------------------\n\n")
488
+ # import sys; sys.exit()
454
489
  else:
455
490
 
456
491
  self.classy.compute()
@@ -547,6 +582,21 @@ class classy_sz(classy):
547
582
  state["derived_extra"] = deepcopy(d_extra)
548
583
 
549
584
 
585
+ def set(self, params_values_dict):
586
+ # If no output requested, remove arguments that produce an error
587
+ # (e.g. complaints if halofit requested but no Cl's computed.) ?????
588
+ # Needed for facilitating post-processing
589
+ if not self.extra_args["output"]:
590
+ for k in ["non_linear"]:
591
+ self.extra_args.pop(k, None)
592
+ # Prepare parameters to be passed: this-iteration + extra
593
+ args = {self.translate_param(p): v for p, v in params_values_dict.items()}
594
+ args.update(self.extra_args)
595
+ # Generate and save
596
+ # print("Setting parameters: %r", args)
597
+ self.classy.set(**args)
598
+
599
+
550
600
 
551
601
  @classmethod
552
602
  def is_installed(cls, **kwargs):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: classy_szfast
3
- Version: 0.0.25.post17
3
+ Version: 0.0.25.post18
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.post17"
6
+ version = "0.0.25.post18"
7
7
  license = { text = "MIT" }
8
8
  name = "classy_szfast"
9
9
  maintainers = [{name = "Boris Bolliet",email="bb667@cam.ac.uk"}]