Skip to main content

Made at Code/Astro PyPI version Python version License: MIT Development Status

cmbstack

Stack patches of HEALPix maps, such as the CMB temperature, CMB lensing or galaxy density, around their peaks or around the positions of a catalogue. Go here to see the full documentation, and here for worked examples.

Installation

Install the latest release from PyPI:

pip install cmbstack

Or install the development version from GitHub:

git clone https://github.com/IsaacLP/cmbstack.git
cd cmbstack
pip install -e .

Quick Start

From a power spectrum file:

from cmbstack import StackingPipeline

pipeline = StackingPipeline.from_cl("path/to/spectrum.cl", nside=1024, seed=42)
stacked_result = pipeline.run()

From an existing FITS map:

pipeline = StackingPipeline.from_fits("path/to/map.fits", field=0)
stacked_result = pipeline.run()

From a map array already in memory:

pipeline = StackingPipeline.from_map(sky_map)
stacked_result = pipeline.run()

A masked map (healpy.ma) keeps its mask: masked pixels are ignored, and pipeline.counts gives the number of patches contributing to each pixel.

On the positions of a catalogue, with a rotation for each patch:

# positions: (N, 2) array of (lon, lat) in degrees; angles: (N,) rotations in degrees
pipeline = StackingPipeline.from_map(sky_map)
stacked_result = pipeline.run(positions=positions, psi=angles, size_deg=2.4, size_deg_y=12.0,
                              profile=False, keep_patches=False)

keep_patches=False stacks the patches one at a time instead of keeping them all in memory, which is needed for large catalogues.

Metadata

Release files for cmbstack 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmbstack 0.2.0
File Size Uploaded Provenance Actions
cmbstack-0.2.0.tar.gz 13.9 kB With provenance Details for cmbstack-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cmbstack 0.2.0
File Interpreter ABI Platform Actions
cmbstack-0.2.0-py3-none-any.whl Python 3 none any Details for cmbstack-0.2.0-py3-none-any.whl

Total release size: 25.4 kB

Release files / cmbstack-0.2.0.tar.gz

Download URL cmbstack-0.2.0.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8c5934ebf7eb7d7c4b72aeb91eb6a540c2d0cdcee204c549ea4892bfaec61140
BLAKE2b-256 checksum
How to use checksums
ef544e85c73ca66ee877d020c0beedd0591bb7975c67c58246511d3c4329a265
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / cmbstack-0.2.0-py3-none-any.whl

Download URL cmbstack-0.2.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5cf0900f8c1114723a1c9dada40b81293299d2aac4037d6a13a1451f9f7a6042
BLAKE2b-256 checksum
How to use checksums
094bea0241a8cb7e2f55a01002e06e793542c22f29d70b7859f5e986f95df5f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for cmbstack 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cmbstack-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page