Skip to main content

21cmSense

PyPI - Version https://codecov.io/gh/rasg-affiliates/21cmSense/branch/main/graph/badge.svg https://img.shields.io/badge/code%20style-black-000000.svg Documentation Status https://img.shields.io/github/license/Ileriayo/markdown-badges?style=flat https://joss.theoj.org/papers/10.21105/joss.06501/status.svg

A python package for calculating the expected sensitivities of 21cm experiments to the Epoch of Reionization and/or Cosmic Dawn power spectrum.

Installation

For Users

Clone/download the package and run pip install [-e] . in the top-level.

If you are a conda user (which we recommend), you may want to install the following using conda rather than them being automatically installed with pip:

$ conda install numpy scipy pyyaml astropy

To test that the package has installed correctly, install with pip install -e .[test] and run pytest in the top-level directory.

For Development

Clone/download the package and run pip install [-e] .[dev] in the top-level.

Run pre-commit install; pre-commit install --hook-type=commit-msg to install the pre-commit hook checks.

We recommend using the commitizen tool to write commit messages – we use the commit messages to do our versioning!

See the contributing docs for more information about how to contribute to the project!

Usage

There are two ways to use this code: as a python library or via the CLI. More documentation on using the library can found in the docs, especially in the getting started tutorial A more involved introduction to the CLI can be found in the CLI tutorial.

As a taste, the simplest possible usage is by using the CLI as follows:

$ sense calc-sense <SENSITIVITY_CONFIG_FILE.yml>

Other options to the calc-sense program can be read by using:

$ sense calc-sense --help

An example config file is in this repository under example_configs/sensitivity_hera.yml, which details the various parameters that can be set. In all, three configuration files are required – one defining an observatory, another defining an observation, and the sensitivity one already mentioned.

The CLI can also be used in a two-step process, by running:

$ sense grid-baselines <OBSERVATION_CONFIG_FILE.yml>

and then:

$ sense calc-sense <SENSITIVITY_CONFIG_FILE.yml> --array-file=<ARRAY_FILE.pkl>

where the ARRAY_FILE is produced in the first step (and its location is printed during the execution).

Running Tests

An example of how to run tests is in the Github Workflow testsuite.yaml. In short, just run pytest in the top-level directory after installing the package.

Acknowledgment

For details of the observing strategy assumed by this code, and other relevant scientific information, please see

Pober et al. 2013AJ….145…65P

and

Pober et al. 2014ApJ…782…66P

If you use this code in any of your work, please acknowledge these papers, and provide a link to this repository.

Metadata

Release files for 21cmSense 3.0.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 21cmSense 3.0.0
File Size Uploaded
21cmsense-3.0.0.tar.gz 2.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for 21cmSense 3.0.0
File Interpreter ABI Platform
21cmsense-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.9 MB

Release files / 21cmsense-3.0.0.tar.gz

Download URL 21cmsense-3.0.0.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
2f9c49687b397c50ee776c6e77458b9a0c3d548b1f203367eabb4db32b02cefb
BLAKE2b-256 checksum
How to use checksums
344252d0b8f00613ba6e9148d3b00f9b98e1986f5c9b5e6645f316eb70d2600a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 22, 2026.

Transparency log

Release files / 21cmsense-3.0.0-py3-none-any.whl

Download URL 21cmsense-3.0.0-py3-none-any.whl
Size 266.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b65bd524209275743904efd375123f941c667bfe681783d4db97f889076f2a9a
BLAKE2b-256 checksum
How to use checksums
0af1f81fc89598ea53f053dd87dd50026c0dd9fbc0dc5fa69d9479cda8cf6f8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

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