classy-szfast 0.0.25.post16__py3-none-any.whl → 0.0.25.post18__py3-none-any.whl
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.
- classy_szfast/classy_sz.py +52 -1
- {classy_szfast-0.0.25.post16.dist-info → classy_szfast-0.0.25.post18.dist-info}/METADATA +1 -1
- {classy_szfast-0.0.25.post16.dist-info → classy_szfast-0.0.25.post18.dist-info}/RECORD +5 -5
- {classy_szfast-0.0.25.post16.dist-info → classy_szfast-0.0.25.post18.dist-info}/WHEEL +0 -0
- {classy_szfast-0.0.25.post16.dist-info → classy_szfast-0.0.25.post18.dist-info}/top_level.txt +0 -0
classy_szfast/classy_sz.py
CHANGED
@@ -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
|
|
@@ -255,6 +268,7 @@ class classy_sz(classy):
|
|
255
268
|
args_names=[],
|
256
269
|
args=[])
|
257
270
|
|
271
|
+
## added lensing fwith limber integral
|
258
272
|
if "cl_lens_lens" in requirements:
|
259
273
|
# make sure cobaya still runs as it does for standard classy
|
260
274
|
requirements.pop("cl_lens_lens")
|
@@ -446,10 +460,32 @@ class classy_sz(classy):
|
|
446
460
|
else:
|
447
461
|
|
448
462
|
start_time = time.time()
|
463
|
+
# self.classy = Class()
|
464
|
+
# print('pars in classy',self.classy.pars)
|
449
465
|
self.classy.compute_class_szfast(likelihood_mode=True)
|
450
466
|
end_time = time.time()
|
451
467
|
# self.log.info("Execution time of class_szfast: {:.5f} seconds".format(end_time - start_time))
|
452
|
-
|
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()
|
453
489
|
else:
|
454
490
|
|
455
491
|
self.classy.compute()
|
@@ -546,6 +582,21 @@ class classy_sz(classy):
|
|
546
582
|
state["derived_extra"] = deepcopy(d_extra)
|
547
583
|
|
548
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
|
+
|
549
600
|
|
550
601
|
@classmethod
|
551
602
|
def is_installed(cls, **kwargs):
|
@@ -1,5 +1,5 @@
|
|
1
1
|
classy_szfast/__init__.py,sha256=E2thrL0Z9oXFfdzwcsu-xbOytudLFTlRlPqVFGlPPPg,279
|
2
|
-
classy_szfast/classy_sz.py,sha256=
|
2
|
+
classy_szfast/classy_sz.py,sha256=oy2MzoWsbgzzrr52ocn1knA4Y1u9UlOuslNfyufLSNs,25268
|
3
3
|
classy_szfast/classy_szfast.py,sha256=PFb4Mqy3ACTRwEDAgN3m_-2batQhIZ1z2prT8zSGu5U,44556
|
4
4
|
classy_szfast/config.py,sha256=v6DGcBHmfn5JtuO48dKyXCh-Dmn0uwOF_izvVOJFnqw,279
|
5
5
|
classy_szfast/cosmopower.py,sha256=ooYK2BDOZSo3XtGHfPtjXHxr5UW-yVngLPkb5gpvTx8,2351
|
@@ -14,7 +14,7 @@ classy_szfast/custom_bias/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
14
14
|
classy_szfast/custom_bias/custom_bias.py,sha256=aR2t5RTIwv7P0m2bsEU0Eq6BTkj4pG10AebH6QpG4qM,486
|
15
15
|
classy_szfast/custom_profiles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
classy_szfast/custom_profiles/custom_profiles.py,sha256=4LZwb2XoqwCyWNmW2s24Z7AJdmgVdaRG7yYaBYe-d9Q,1188
|
17
|
-
classy_szfast-0.0.25.
|
18
|
-
classy_szfast-0.0.25.
|
19
|
-
classy_szfast-0.0.25.
|
20
|
-
classy_szfast-0.0.25.
|
17
|
+
classy_szfast-0.0.25.post18.dist-info/METADATA,sha256=fZBmdgjo1wb0mZb5_3f-l2BBJYkOP2uiIvZWVSrEnBE,572
|
18
|
+
classy_szfast-0.0.25.post18.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
19
|
+
classy_szfast-0.0.25.post18.dist-info/top_level.txt,sha256=hRgqpilUck4lx2KkaWI2y9aCDKqF6pFfGHfNaoPFxv0,14
|
20
|
+
classy_szfast-0.0.25.post18.dist-info/RECORD,,
|
File without changes
|
{classy_szfast-0.0.25.post16.dist-info → classy_szfast-0.0.25.post18.dist-info}/top_level.txt
RENAMED
File without changes
|