cmbstack 0.1.0__tar.gz → 0.1.1__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.
- {cmbstack-0.1.0 → cmbstack-0.1.1}/PKG-INFO +2 -1
- cmbstack-0.1.1/cmbstack/__init__.py +5 -0
- {cmbstack-0.1.0 → cmbstack-0.1.1}/cmbstack/maps.py +20 -10
- {cmbstack-0.1.0 → cmbstack-0.1.1}/cmbstack.egg-info/PKG-INFO +2 -1
- {cmbstack-0.1.0 → cmbstack-0.1.1}/cmbstack.egg-info/SOURCES.txt +2 -1
- {cmbstack-0.1.0 → cmbstack-0.1.1}/cmbstack.egg-info/requires.txt +1 -0
- {cmbstack-0.1.0 → cmbstack-0.1.1}/pyproject.toml +1 -0
- cmbstack-0.1.1/tests/test_runtime.py +3 -0
- cmbstack-0.1.0/cmbstack/__init__.py +0 -5
- {cmbstack-0.1.0 → cmbstack-0.1.1}/README.md +0 -0
- {cmbstack-0.1.0 → cmbstack-0.1.1}/cmbstack/pipeline.py +0 -0
- {cmbstack-0.1.0 → cmbstack-0.1.1}/cmbstack/stacking.py +0 -0
- {cmbstack-0.1.0 → cmbstack-0.1.1}/cmbstack.egg-info/dependency_links.txt +0 -0
- {cmbstack-0.1.0 → cmbstack-0.1.1}/cmbstack.egg-info/top_level.txt +0 -0
- {cmbstack-0.1.0 → cmbstack-0.1.1}/setup.cfg +0 -0
- {cmbstack-0.1.0 → cmbstack-0.1.1}/tests/test_find_peaks.py +0 -0
- {cmbstack-0.1.0 → cmbstack-0.1.1}/tests/test_round.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cmbstack
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Stack patches of the CMB temperature sky around local maxima
|
|
5
5
|
Author-email: Isaac Alexis López Paredes <isaacalexis.lopezparedes@students.uniroma2.eu>, Anushka Sanjay Tilekar <anushka.tilekar.23@alumni.ucl.ac.uk>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -11,6 +11,7 @@ Classifier: Operating System :: OS Independent
|
|
|
11
11
|
Requires-Python: >=3.8
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
Requires-Dist: numpy
|
|
14
|
+
Requires-Dist: pandas
|
|
14
15
|
Requires-Dist: healpy
|
|
15
16
|
Requires-Dist: matplotlib
|
|
16
17
|
|
|
@@ -13,6 +13,7 @@ power spectrum (temperature TT, lensing convergence, y-map, ...).
|
|
|
13
13
|
|
|
14
14
|
import numpy as np
|
|
15
15
|
import healpy as hp
|
|
16
|
+
import pandas as pd
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
def dl_to_cl(ell, dl,lmax):
|
|
@@ -46,12 +47,13 @@ def dl_to_cl(ell, dl,lmax):
|
|
|
46
47
|
|
|
47
48
|
return cl
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
def load_cl(path):
|
|
50
|
+
|
|
51
|
+
def load_cl(path, column="TT"):
|
|
51
52
|
"""Load a power-spectrum file and return C_ell for the requested spectrum.
|
|
52
53
|
|
|
53
|
-
The expected file columns are ell, Dl_TT, Dl_TE, Dl_EE, Dl_BB,
|
|
54
|
-
D_ell in uK^2
|
|
54
|
+
The expected file columns are ell, Dl_TT, Dl_TE, Dl_EE, Dl_BB, Dl_pp, with
|
|
55
|
+
D_ell in uK^2 (with names L, TT, TE, EE, BB, PP).
|
|
56
|
+
The chosen column is converted from D_ell to C_ell via
|
|
55
57
|
:func:`dl_to_cl` before being returned.
|
|
56
58
|
|
|
57
59
|
Parameters
|
|
@@ -59,7 +61,7 @@ def load_cl(path):
|
|
|
59
61
|
path : str
|
|
60
62
|
Path to the whitespace-delimited spectrum file.
|
|
61
63
|
column : str, optional
|
|
62
|
-
Which spectrum to return: one of "TT", "TE", "EE", "BB", "
|
|
64
|
+
Which spectrum to return: one of "TT", "TE", "EE", "BB", "PP".
|
|
63
65
|
Default "TT".
|
|
64
66
|
|
|
65
67
|
Returns
|
|
@@ -68,14 +70,22 @@ def load_cl(path):
|
|
|
68
70
|
C_ell array indexed from ell=0, suitable for passing to
|
|
69
71
|
:func:`simulate_map`.
|
|
70
72
|
"""
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
|
|
74
|
+
df = pd.read_csv(
|
|
75
|
+
path,
|
|
76
|
+
sep=r"\s+",
|
|
77
|
+
comment="#",
|
|
78
|
+
header=None,
|
|
79
|
+
names=["L", "TT", "TE", "EE", "BB", "PP"],
|
|
80
|
+
)
|
|
81
|
+
ell = df['L'].values.astype(int)
|
|
82
|
+
dl = df[column].values
|
|
83
|
+
lmax = ell.max()
|
|
84
|
+
cl = dl_to_cl(ell, dl, lmax)
|
|
75
85
|
|
|
76
86
|
return cl
|
|
77
87
|
|
|
78
|
-
|
|
88
|
+
|
|
79
89
|
def simulate_map(cl, nside=128, seed=None):
|
|
80
90
|
"""Simulate a Gaussian random HEALPix map from a power spectrum.
|
|
81
91
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cmbstack
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Stack patches of the CMB temperature sky around local maxima
|
|
5
5
|
Author-email: Isaac Alexis López Paredes <isaacalexis.lopezparedes@students.uniroma2.eu>, Anushka Sanjay Tilekar <anushka.tilekar.23@alumni.ucl.ac.uk>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -11,6 +11,7 @@ Classifier: Operating System :: OS Independent
|
|
|
11
11
|
Requires-Python: >=3.8
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
Requires-Dist: numpy
|
|
14
|
+
Requires-Dist: pandas
|
|
14
15
|
Requires-Dist: healpy
|
|
15
16
|
Requires-Dist: matplotlib
|
|
16
17
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|