Metadata-Version: 2.2
Name: 21cmSense
Version: 2.1.0
Summary: Compute sensitivies of radio interferometers to the cosmic 21cm signal.
Author-email: Jonathan Pober <jonathon_pober@brown.edu>, Steven Murray <murray.steveng@gmail.com>, Matt Kolopanis <matthew.kolopanis@gmail.com>
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: LICENSE.rst
Requires-Dist: numpy<2.0
Requires-Dist: scipy
Requires-Dist: future
Requires-Dist: click
Requires-Dist: tqdm
Requires-Dist: pyyaml
Requires-Dist: astropy>=5
Requires-Dist: methodtools
Requires-Dist: pyuvdata>=3.0.0
Requires-Dist: cached_property
Requires-Dist: rich
Requires-Dist: attrs
Requires-Dist: hickleable>=0.1.1
Provides-Extra: docs
Requires-Dist: sphinx>=1.3; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Requires-Dist: numpydoc; extra == "docs"
Requires-Dist: nbsphinx; extra == "docs"
Requires-Dist: ipython; extra == "docs"
Provides-Extra: test
Requires-Dist: pre-commit; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: matplotlib; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-xdist; extra == "test"
Provides-Extra: dev
Requires-Dist: 21cmSense[docs,test]; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: commitizen; extra == "dev"
Requires-Dist: ruff; extra == "dev"

=========
21cmSense
=========

.. image:: https://img.shields.io/pypi/v/21cmSense
   :alt: PyPI - Version
   :target: https://pypi.org/project/21cmSense
.. image:: https://codecov.io/gh/rasg-affiliates/21cmSense/branch/main/graph/badge.svg
  :target: https://codecov.io/gh/rasg-affiliates/21cmSense
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
  :target: https://github.com/psf/black
.. image:: https://readthedocs.org/projects/21cmsense/badge/?version=latest
  :target: https://21cmsense.readthedocs.io/en/latest/?badge=latest
  :alt: Documentation Status
.. image:: https://img.shields.io/github/license/Ileriayo/markdown-badges?style=flat
  :target: ./LICENSE.rst
.. image:: https://joss.theoj.org/papers/10.21105/joss.06501/status.svg
   :target: https://doi.org/10.21105/joss.06501

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 <https://21cmsense.readthedocs.io/en/latest/contributing.html>`_
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 <https://21cmSense.readthedocs.org>`_, especially in the
`getting started tutorial <https://21cmsense.readthedocs.io/en/latest/tutorials/getting_started.html>`_
A more involved introduction to the CLI can be found in the
`CLI tutorial <https://21cmsense.readthedocs.io/en/latest/tutorials/cli_tutorial.html>`_.

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.
