What's new?
Version 0.9 adds two pure-Python extraction backends, so PyReduce can run without a compiled C extension, and replaces PYREDUCE_USE_CHARSLIT with PYREDUCE_EXTRACTION (c, charslit, numba, numpy). See CHANGELOG.md for all changes.
PyReduce
A data reduction pipeline for echelle spectrographs (HARPS, UVES, XSHOOTER, CRIRES+, JWST/NIRISS, ANDES, MOSAIC, NEID, and more).
Based on the REDUCE package. See the papers:
- Piskunov & Valenti (2001) doi:10.1051/0004-6361:20020175
- Piskunov, Wehrhahn & Marquart (2021) doi:10.1051/0004-6361/202038293
Installation
# Using uv (recommended)
uv add pyreduce-astro
# Or pip
pip install pyreduce-astro
For development:
git clone https://github.com/ivh/PyReduce
cd PyReduce
uv sync
uv run reduce-build
No wheel for your platform, or the C extension won't build?
Extraction also runs in pure Python. Set PYREDUCE_EXTRACTION=numpy (or pass
--extraction numpy) and nothing needs compiling — numpy and scipy are already
core dependencies:
PYREDUCE_EXTRACTION=numpy uv run reduce run UVES -t HD132205
It is ~2x slower than the C extension and produces bit-identical output files.
PYREDUCE_EXTRACTION=numba is ~1.5-1.8x with uv sync --extra numba installed.
See Extraction Backends.
Quick Start
# Download sample data
uv run reduce download UVES
# Run reduction
uv run reduce run UVES -t HD132205 --steps bias,flat,trace,science
# Or run individual steps
uv run reduce bias UVES -t HD132205
uv run reduce flat UVES -t HD132205
Or use the Python API:
from pyreduce.pipeline import Pipeline
Pipeline.from_instrument(
instrument="UVES",
target="HD132205",
night="2010-04-01",
channel="middle",
steps=("bias", "flat", "trace", "science"),
).run()
Plotting
Control plotting with environment variables:
# Save plots to files (headless/CI)
PYREDUCE_PLOT=1 PYREDUCE_PLOT_DIR=/tmp/plots PYREDUCE_PLOT_SHOW=off uv run reduce run ...
# Show all plots at end (browser via webagg)
MPLBACKEND=webagg PYREDUCE_PLOT=1 PYREDUCE_PLOT_SHOW=defer uv run reduce run ...
See How To for details.
Documentation
Full documentation at ReadTheDocs.
Output
PyReduce creates .fits files (standard FITS with binary table extension). Headers include original keywords plus PyReduce-specific ones prefixed with e_.
Release files for pyreduce-astro 0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyreduce_astro-0.9.tar.gz | 4.4 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pyreduce_astro-0.9-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 | Details |
| pyreduce_astro-0.9-cp314-cp314-macosx_11_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 11.0+ ARM64 | Details |
| pyreduce_astro-0.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| pyreduce_astro-0.9-cp313-cp313-macosx_11_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 11.0+ ARM64 | Details |
| pyreduce_astro-0.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| pyreduce_astro-0.9-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details |
Total release size: 30.0 MB
Release files / pyreduce_astro-0.9.tar.gz
| Download URL | pyreduce_astro-0.9.tar.gz |
|---|---|
| Size | 4.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12173697c66538882829fce320dbebec1a93995bb658fbe1a5197bcd651ab3f3
|
|
BLAKE2b-256 checksum How to use checksums |
65873ee05fa9d96f43a4f65909a66fbbef04990cb23bfa751dbf57de0bb21cca
|
| 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 Jul 31, 2026.
Transparency logRelease files / pyreduce_astro-0.9-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyreduce_astro-0.9-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f6e040972db7407a8b97758510c70c62c1ffd3a5026839e70671aa5000a8f256
|
|
BLAKE2b-256 checksum How to use checksums |
aa55f3e8e56cce7235d4eba87cff3e3dba5456d00a90912852b5ddbcbf6f009b
|
| 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 Jul 31, 2026.
Transparency logRelease files / pyreduce_astro-0.9-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | pyreduce_astro-0.9-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.3 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
04e46b833caeb1e6a74af58f70003198259c9bc9132eab381834bd2123af7195
|
|
BLAKE2b-256 checksum How to use checksums |
2bb6410fb292796f810e3df1b45b83e962fa8096791cf9bdc663cb2cc8f141d5
|
| 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 Jul 31, 2026.
Transparency logRelease files / pyreduce_astro-0.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyreduce_astro-0.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.3 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
695a67e2053b975ed548126f2be33729022a7fa82442f52540e05744f0bb378d
|
|
BLAKE2b-256 checksum How to use checksums |
63e046736d88a20313fbec8757e3cbad4165ce33573afafcdc6a66eebd4cccb6
|
| 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 Jul 31, 2026.
Transparency logRelease files / pyreduce_astro-0.9-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | pyreduce_astro-0.9-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
761c159fd86c01e4317d6673cc97e9147bf003d64cf9f47f2a9c73ea37b45eef
|
|
BLAKE2b-256 checksum How to use checksums |
a48537aa58e499fd82a0a0356e0d359ce3cbef69b145be2cbc6e2cac10bc7c59
|
| 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 Jul 31, 2026.
Transparency logRelease files / pyreduce_astro-0.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyreduce_astro-0.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
dc02f0057aa11f9d13ad7ecc8ef59fdd46a7770943cdd9ac61927933d82c55dc
|
|
BLAKE2b-256 checksum How to use checksums |
9b533b0b01e16eca2403a1d8ca820686d07f7723ceb75b62f55fb91917773c45
|
| 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 Jul 31, 2026.
Transparency logRelease files / pyreduce_astro-0.9-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | pyreduce_astro-0.9-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f3729ed5b7c35f48be5274e6d624e9dd9d5e8da80a8654d16f8034f6dd3a04d7
|
|
BLAKE2b-256 checksum How to use checksums |
1bf641181ad6243d2ab8ff58449c78dc073a8d57b3d5c50e1a17c89599545e23
|
| 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 Jul 31, 2026.
Transparency log