Metadata-Version: 2.4
Name: pspipe
Version: 0.10
Summary: Power spectra pipeline for Cosmic Dawn, Epoch of Reionization radio interferometric experiments
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Author: Florent Mertens
Author-email: florent.mertens@gmail.com
Requires-Python: >=3.10,<4.0
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: Programming Language :: Python :: 3.14
Provides-Extra: dev
Provides-Extra: docs
Provides-Extra: ml-gpr
Requires-Dist: astropy (>6.0)
Requires-Dist: click (>=8.0)
Requires-Dist: libpipe (>=0.6)
Requires-Dist: myst-parser (>=2) ; extra == "docs"
Requires-Dist: ps-eor (>=0.8)
Requires-Dist: ps-eor[ml-gpr] (>=0.8) ; extra == "ml-gpr"
Requires-Dist: pydata-sphinx-theme (>=0.15) ; extra == "docs"
Requires-Dist: pytest (>=8.0) ; extra == "dev"
Requires-Dist: pytest-cov (>=5.0) ; extra == "dev"
Requires-Dist: python-casacore (>=3.0)
Requires-Dist: ruff (==0.16.1) ; extra == "dev"
Requires-Dist: sphinx (>=7) ; extra == "docs"
Requires-Dist: sphinx-click (>=6) ; extra == "docs"
Requires-Dist: tables (>=3.2)
Requires-Dist: tabulate (>=0.8)
Requires-Dist: toml (>=0.10)
Project-URL: Documentation, https://pspipe.readthedocs.io
Project-URL: Homepage, https://gitlab.com/flomertens/pspipe
Project-URL: Issues, https://gitlab.com/flomertens/pspipe/-/issues
Project-URL: Repository, https://gitlab.com/flomertens/pspipe
Description-Content-Type: text/markdown

# pspipe

`pspipe` is the data-analysis pipeline used by the LOFAR Epoch of Reionization
and NenuFAR Cosmic Dawn projects. It turns calibrated low-frequency radio
MeasurementSets into images, weighted Kelvin visibility cubes, power spectra,
and foreground-separated products. It tracks observations and processing
revisions so that large, multi-night analyses remain reproducible.

It provides two commands:

- `psdb` creates configurations and manages observations and processing
  revisions;
- `pspipe` runs processing tasks on observations registered in that database.

The pipeline uses [WSClean](https://wsclean.readthedocs.io) for imaging and
[`ps_eor`](https://ps-eor.readthedocs.io) for cubes, flagging, power spectra,
and ML-GPR. Optional MeasurementSet-processing tasks also call
[DP3](https://dp3.readthedocs.io) and
[NenuCal](https://nenucal-cd.readthedocs.io).

## Documentation

The [pspipe documentation](https://pspipe.readthedocs.io/en/latest/) follows
the complete workflow from installation and calibrated MeasurementSets to
images, visibility cubes, power spectra, multi-night combinations, and
foreground removal. New users should begin with the
[getting-started page](https://pspipe.readthedocs.io/en/latest/getting_started.html)
and then follow the
[user guide](https://pspipe.readthedocs.io/en/latest/user_guide/index.html).

The documentation also includes the full configuration, command-line, and
Python API references.

## Installation

`pspipe` requires Python 3.10 or newer:

```bash
pip install pspipe
```

For ML-GPR:

```bash
pip install "pspipe[ml-gpr]"
```

## Minimal workflow

After installation, create a workspace, register an observation, make its
images, and convert them to visibility cubes:

```bash
mkdir pspipe-analysis && cd pspipe-analysis
psdb init nenufar /path/to/analysis-data first_run
psdb add_obs first_run.toml NIGHT_001 -m /path/to/ms_lists/NIGHT_001
psdb list_all_obs first_run.toml
pspipe image first_run.toml NIGHT_001
psdb list_rev_img first_run.toml -o NIGHT_001
pspipe gen_vis_cube first_run.toml NIGHT_001
```

Review the generated configuration before running: in particular the
MeasurementSet data column, image and cube UV ranges, field of view, frequency
bins, window, and primary beam. Inspect the FITS images and visibility cubes
between stages; the separate commands above make those validation gates
explicit. Once a setup is established, tasks can be chained with commas.
The user guide continues from this point by loading the visibility data and
producing power spectra from Python.

