Metadata-Version: 2.4
Name: somapy
Version: 0.0.3
Summary: A support library for pixell
Author-email: Mathew Madhavacheril <mathewsyriac@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/simonsobs/soma
Project-URL: Documentation, https://somapy.readthedocs.io
Project-URL: Issues, https://github.com/simonsobs/soma/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Requires-Dist: astropy>=5.0
Requires-Dist: scipy>=1.10
Requires-Dist: pyyaml>=6.0
Requires-Dist: pixell>=0.31
Requires-Dist: matplotlib>=3.6
Requires-Dist: pillow>=9.0
Requires-Dist: healpy>=1.16
Requires-Dist: pandas>=2.0
Requires-Dist: ducc0>=0.34
Requires-Dist: pywiggle>=0.1.26
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx>=7; extra == "docs"
Requires-Dist: furo; extra == "docs"
Requires-Dist: myst-nb>=1.0; extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"
Requires-Dist: sphinx-autobuild; extra == "docs"
Provides-Extra: dev
Requires-Dist: somapy[docs,test]; extra == "dev"
Requires-Dist: ruff==0.16.7; extra == "dev"
Requires-Dist: build; extra == "dev"
Dynamic: license-file

soma
====

[![CI](https://github.com/simonsobs/soma/actions/workflows/ci.yml/badge.svg)](https://github.com/simonsobs/soma/actions/workflows/ci.yml)
[![Documentation Status](https://readthedocs.org/projects/somapy/badge/?version=latest)](https://somapy.readthedocs.io/en/latest/)
[![PyPI](https://img.shields.io/pypi/v/somapy.svg)](https://pypi.org/project/somapy/)

[`soma`](https://en.wikipedia.org/wiki/Soma_(Brave_New_World)) (Simons Observatory Map-based Analysis) is a set of companion tools for use with the [`pixell`](https://github.com/simonsobs/pixell) library.

_This library is in active early development and its API will likely change significantly. It is meant to replace `msyriac/orphics` and integrate in modules from other libraries that supplement `pixell`._

Installation
------------

To install from a local checkout, including the development dependencies:

```bash
git clone https://github.com/simonsobs/soma.git
cd soma
[uv] pip install -e ".[dev]"
```

A PyPI instance will be deployed once development is mature.

Usage
-----

```python
import somapy

print(somapy.__version__)
```

Runnable, pre-executed notebooks live in [`examples/`](examples/README.md); each is
generated from a plain-Python builder script beside it.


Development
-----------

```bash
pytest              # run the test suite
ruff check .        # lint
ruff format .       # format
```

Documentation is built with Sphinx and hosted on
[Read the Docs](https://somapy.readthedocs.io):

```bash
[uv] pip install -e ".[docs]"
make -C docs html        # open docs/_build/html/index.html
make -C docs livehtml    # live preview with automatic rebuilds
```


Attribution
-----------

`soma` bundles one external data product: `src/somapy/planck_dust_equ.fits`, the
sky backdrop that `somapy.io.plot_footprints` paints its globes with. It is a
*derived* version of the Planck Commander thermal-dust map, rotated from
Galactic to equatorial coordinates, band-limited and resampled onto a 0.5° CAR
grid (see [the footprints docs](docs/footprints.md)).

If you publish a figure made with it, please cite the source map:

> Planck Collaboration X, 2016, *Planck 2015 results. X. Diffuse component
> separation: Foreground maps*, A&A **594**, A10 (arXiv:1502.01588)

and include the Planck acknowledgement:

> Based on observations obtained with Planck (http://www.esa.int/Planck), an ESA
> science mission with instruments and contributions directly funded by ESA
> Member States, NASA, and Canada.

The exact product is `COM_CompMap_dust-commander_0256_R2.00.fits`, column 0
(`I_ML` — dust intensity at 545 GHz in µK_RJ, HEALPix Nside 256, 60′ FWHM,
`PROCVER = DX11D`), from the [Planck Legacy Archive](http://pla.esac.esa.int),
also mirrored [at IRSA](https://irsa.ipac.caltech.edu/data/Planck/release_2/all-sky-maps/maps/component-maps/foregrounds/).
