cmbstack 0.0.4__tar.gz → 0.1.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.
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cmbstack
3
- Version: 0.0.4
3
+ Version: 0.1.0
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
7
- Project-URL: Homepage, https://github.com/IsaacLP/cmbstack
7
+ Project-URL: Homepage, https://cmbstack-docs.readthedocs.io/en/latest/index.html
8
8
  Project-URL: Repository, https://github.com/IsaacLP/cmbstack.git
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Operating System :: OS Independent
@@ -14,11 +14,11 @@ Requires-Dist: numpy
14
14
  Requires-Dist: healpy
15
15
  Requires-Dist: matplotlib
16
16
 
17
- [![Made at Code/Astro](https://img.shields.io/badge/Made%20at-Code/Astro-blueviolet.svg)](https://semaphorep.github.io/codeastro/)
18
- [![PyPI version](https://img.shields.io/pypi/v/cmbstack.svg)](https://pypi.org/project/cmbstack/)
19
- [![Python version](https://img.shields.io/pypi/pyversions/cmbstack.svg)](https://pypi.org/project/cmbstack/)
20
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
21
- ![Development Status](https://img.shields.io/badge/Status-In_Development-brightgreen.svg)
17
+ [![Made at Code/Astro](https://img.shields.io/badge/Made%20at-Code/Astro-blueviolet)](https://semaphorep.github.io/codeastro/)
18
+ [![PyPI version](https://img.shields.io/pypi/v/cmbstack)](https://pypi.org/project/cmbstack/)
19
+ [![Python version](https://img.shields.io/pypi/pyversions/cmbstack)](https://pypi.org/project/cmbstack/)
20
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow)](https://opensource.org/licenses/MIT)
21
+ ![Development Status](https://img.shields.io/badge/Status-In_Development-brightgreen)
22
22
 
23
23
  # cmbstack
24
24
 
@@ -44,20 +44,20 @@ pip install -e .
44
44
 
45
45
  **From a power spectrum file:**
46
46
  ```python
47
- from cmbstack.main import StackingPipeline
47
+ from cmbstack import StackingPipeline
48
48
 
49
49
  pipeline = StackingPipeline.from_cl("path/to/spectrum.cl", nside=1024, seed=42)
50
- StackedResult = pipeline.run()
50
+ stacked_result = pipeline.run()
51
51
  ```
52
52
 
53
53
  **From an existing FITS map:**
54
54
  ```python
55
55
  pipeline = StackingPipeline.from_fits("path/to/map.fits", field=0)
56
- StackedResult = pipeline.run()
56
+ stacked_result = pipeline.run()
57
57
  ```
58
58
 
59
59
  **From a map array already in memory:**
60
60
  ```python
61
61
  pipeline = StackingPipeline.from_map(sky_map)
62
- StackedResult = pipeline.run()
62
+ stacked_result = pipeline.run()
63
63
  ```
@@ -1,8 +1,8 @@
1
- [![Made at Code/Astro](https://img.shields.io/badge/Made%20at-Code/Astro-blueviolet.svg)](https://semaphorep.github.io/codeastro/)
2
- [![PyPI version](https://img.shields.io/pypi/v/cmbstack.svg)](https://pypi.org/project/cmbstack/)
3
- [![Python version](https://img.shields.io/pypi/pyversions/cmbstack.svg)](https://pypi.org/project/cmbstack/)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
- ![Development Status](https://img.shields.io/badge/Status-In_Development-brightgreen.svg)
1
+ [![Made at Code/Astro](https://img.shields.io/badge/Made%20at-Code/Astro-blueviolet)](https://semaphorep.github.io/codeastro/)
2
+ [![PyPI version](https://img.shields.io/pypi/v/cmbstack)](https://pypi.org/project/cmbstack/)
3
+ [![Python version](https://img.shields.io/pypi/pyversions/cmbstack)](https://pypi.org/project/cmbstack/)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow)](https://opensource.org/licenses/MIT)
5
+ ![Development Status](https://img.shields.io/badge/Status-In_Development-brightgreen)
6
6
 
7
7
  # cmbstack
8
8
 
@@ -28,20 +28,20 @@ pip install -e .
28
28
 
29
29
  **From a power spectrum file:**
30
30
  ```python
31
- from cmbstack.main import StackingPipeline
31
+ from cmbstack import StackingPipeline
32
32
 
33
33
  pipeline = StackingPipeline.from_cl("path/to/spectrum.cl", nside=1024, seed=42)
34
- StackedResult = pipeline.run()
34
+ stacked_result = pipeline.run()
35
35
  ```
36
36
 
37
37
  **From an existing FITS map:**
38
38
  ```python
39
39
  pipeline = StackingPipeline.from_fits("path/to/map.fits", field=0)
40
- StackedResult = pipeline.run()
40
+ stacked_result = pipeline.run()
41
41
  ```
42
42
 
43
43
  **From a map array already in memory:**
44
44
  ```python
45
45
  pipeline = StackingPipeline.from_map(sky_map)
46
- StackedResult = pipeline.run()
46
+ stacked_result = pipeline.run()
47
47
  ```
@@ -0,0 +1,5 @@
1
+ __version__ = "0.1.0"
2
+
3
+ from cmbstack.pipeline import StackingPipeline
4
+
5
+ __all__ = ["StackingPipeline", "maps", "stacking"]
@@ -34,6 +34,16 @@ class StackingPipeline:
34
34
  ----------
35
35
  normalized : numpy.ndarray or None
36
36
  Set after run(); the normalized map.
37
+ positions : numpy.ndarray or None
38
+ Set after run(); the peak positions in (theta, phi) radians.
39
+ patches : numpy.ndarray or None
40
+ Set after run(); the extracted patches.
41
+ stacked : numpy.ndarray or None
42
+ Set after run(); the stacked image.
43
+ radius : numpy.ndarray or None
44
+ Set after run(); the radial distances of the profile in arcmin.
45
+ profile : numpy.ndarray or None
46
+ Set after run(); the radial profile of the stacked image.
37
47
  """
38
48
 
39
49
  def __init__(self, sky_map, nside):
@@ -86,7 +96,9 @@ class StackingPipeline:
86
96
 
87
97
  Returns
88
98
  -------
89
- result : cmbstack.stack.StackResult
99
+ self : StackingPipeline
100
+ The pipeline object itself, with all intermediate products stored as
101
+ attributes.
90
102
  """
91
103
 
92
104
  self.normalized = maps.normalize_map(self.map)
@@ -100,4 +112,6 @@ class StackingPipeline:
100
112
  if profile:
101
113
  self.radius, self.profile = stacking.radial_profile(self.stacked,reso_arcmin=reso_arcmin)
102
114
 
103
- return self
115
+ return self
116
+
117
+ StackingPipeline.__module__ = "cmbstack"
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cmbstack
3
- Version: 0.0.4
3
+ Version: 0.1.0
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
7
- Project-URL: Homepage, https://github.com/IsaacLP/cmbstack
7
+ Project-URL: Homepage, https://cmbstack-docs.readthedocs.io/en/latest/index.html
8
8
  Project-URL: Repository, https://github.com/IsaacLP/cmbstack.git
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Operating System :: OS Independent
@@ -14,11 +14,11 @@ Requires-Dist: numpy
14
14
  Requires-Dist: healpy
15
15
  Requires-Dist: matplotlib
16
16
 
17
- [![Made at Code/Astro](https://img.shields.io/badge/Made%20at-Code/Astro-blueviolet.svg)](https://semaphorep.github.io/codeastro/)
18
- [![PyPI version](https://img.shields.io/pypi/v/cmbstack.svg)](https://pypi.org/project/cmbstack/)
19
- [![Python version](https://img.shields.io/pypi/pyversions/cmbstack.svg)](https://pypi.org/project/cmbstack/)
20
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
21
- ![Development Status](https://img.shields.io/badge/Status-In_Development-brightgreen.svg)
17
+ [![Made at Code/Astro](https://img.shields.io/badge/Made%20at-Code/Astro-blueviolet)](https://semaphorep.github.io/codeastro/)
18
+ [![PyPI version](https://img.shields.io/pypi/v/cmbstack)](https://pypi.org/project/cmbstack/)
19
+ [![Python version](https://img.shields.io/pypi/pyversions/cmbstack)](https://pypi.org/project/cmbstack/)
20
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow)](https://opensource.org/licenses/MIT)
21
+ ![Development Status](https://img.shields.io/badge/Status-In_Development-brightgreen)
22
22
 
23
23
  # cmbstack
24
24
 
@@ -44,20 +44,20 @@ pip install -e .
44
44
 
45
45
  **From a power spectrum file:**
46
46
  ```python
47
- from cmbstack.main import StackingPipeline
47
+ from cmbstack import StackingPipeline
48
48
 
49
49
  pipeline = StackingPipeline.from_cl("path/to/spectrum.cl", nside=1024, seed=42)
50
- StackedResult = pipeline.run()
50
+ stacked_result = pipeline.run()
51
51
  ```
52
52
 
53
53
  **From an existing FITS map:**
54
54
  ```python
55
55
  pipeline = StackingPipeline.from_fits("path/to/map.fits", field=0)
56
- StackedResult = pipeline.run()
56
+ stacked_result = pipeline.run()
57
57
  ```
58
58
 
59
59
  **From a map array already in memory:**
60
60
  ```python
61
61
  pipeline = StackingPipeline.from_map(sky_map)
62
- StackedResult = pipeline.run()
62
+ stacked_result = pipeline.run()
63
63
  ```
@@ -1,8 +1,8 @@
1
1
  README.md
2
2
  pyproject.toml
3
3
  cmbstack/__init__.py
4
- cmbstack/main.py
5
4
  cmbstack/maps.py
5
+ cmbstack/pipeline.py
6
6
  cmbstack/stacking.py
7
7
  cmbstack.egg-info/PKG-INFO
8
8
  cmbstack.egg-info/SOURCES.txt
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cmbstack"
7
- version = "0.0.4"
7
+ dynamic = ["version"]
8
8
  description = "Stack patches of the CMB temperature sky around local maxima"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -24,9 +24,12 @@ dependencies = [
24
24
  ]
25
25
 
26
26
  [project.urls]
27
- Homepage = "https://github.com/IsaacLP/cmbstack"
27
+ Homepage = "https://cmbstack-docs.readthedocs.io/en/latest/index.html"
28
28
  Repository = "https://github.com/IsaacLP/cmbstack.git"
29
29
 
30
+ [tool.setuptools.dynamic]
31
+ version = {attr = "cmbstack.__version__"}
32
+
30
33
  [tool.setuptools.packages.find]
31
34
  include = ["cmbstack*"]
32
35
  exclude = ["data*", "tests*", "docs*", "examples*", "_*", "_build", "_static", "_templates"]
@@ -1,9 +1,6 @@
1
- import sys
2
1
  import numpy as np
3
2
  import healpy as hp
4
3
 
5
- sys.path.append("..")
6
-
7
4
  from cmbstack.stacking import find_peaks
8
5
  from cmbstack.maps import normalize_map
9
6
 
@@ -1,13 +1,9 @@
1
- import sys
2
1
  import healpy as hp
3
2
  import numpy as np
4
3
  from pathlib import Path
5
4
  import tempfile
6
5
 
7
- sys.path.append("..")
8
-
9
- from cmbstack.main import StackingPipeline
10
- from cmbstack import maps
6
+ from cmbstack import StackingPipeline, maps
11
7
 
12
8
  def test_fits_roundtrip(tmp_path):
13
9
  '''Test that the Stacking Pipeline gives the same result from a map saved in memory and loading a .fits file'''
@@ -1 +0,0 @@
1
-
File without changes
File without changes
File without changes