A data reduction package for echelle spectrographs
Project description
What's new?
Version 0.8.1 fixes create_custom_instrument and adds a student-friendly example for reducing data from unsupported spectrographs. See CHANGELOG.md for all changes since 0.8.
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
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_.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyreduce_astro-0.8.2.tar.gz.
File metadata
- Download URL: pyreduce_astro-0.8.2.tar.gz
- Upload date:
- Size: 6.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a54fcc69b15827d92ccad44f60f60d8b221ebd1756c5b633ebf0a7091c95ece9
|
|
| MD5 |
dd15c9d4e9cb8994aea0b95d1374359b
|
|
| BLAKE2b-256 |
76ea5813b06d5c4526f1e7086f198bb002d43e584cd80c654e4055c7d7b5720d
|
Provenance
The following attestation bundles were made for pyreduce_astro-0.8.2.tar.gz:
Publisher:
python-publish.yml on ivh/PyReduce
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyreduce_astro-0.8.2.tar.gz -
Subject digest:
a54fcc69b15827d92ccad44f60f60d8b221ebd1756c5b633ebf0a7091c95ece9 - Sigstore transparency entry: 1256916715
- Sigstore integration time:
-
Permalink:
ivh/PyReduce@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Branch / Tag:
refs/tags/v0.8.2 - Owner: https://github.com/ivh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyreduce_astro-0.8.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyreduce_astro-0.8.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.14, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b135e1ddeee87c2cb17f0db98393f2c9400c5b31f3f49cba78e1dcaa0fec3b45
|
|
| MD5 |
6cd3dae57aab9e906ffbdb7fdd4e8f4a
|
|
| BLAKE2b-256 |
044a7a02754322089e7830c38584b845b165c5cf0226179f8f28cf161efba4e7
|
Provenance
The following attestation bundles were made for pyreduce_astro-0.8.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on ivh/PyReduce
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyreduce_astro-0.8.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
b135e1ddeee87c2cb17f0db98393f2c9400c5b31f3f49cba78e1dcaa0fec3b45 - Sigstore transparency entry: 1256917898
- Sigstore integration time:
-
Permalink:
ivh/PyReduce@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Branch / Tag:
refs/tags/v0.8.2 - Owner: https://github.com/ivh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyreduce_astro-0.8.2-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyreduce_astro-0.8.2-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adeda8b7c76f54af810fe770349348da716e2e40ba41cc5369476b1c9998efda
|
|
| MD5 |
bf54af7041448511a81c6c82a71981a6
|
|
| BLAKE2b-256 |
62e880d70b9cc26d171f1bb330a363cf450733e09ac3c10e313d576b10f615ba
|
Provenance
The following attestation bundles were made for pyreduce_astro-0.8.2-cp314-cp314-macosx_11_0_arm64.whl:
Publisher:
python-publish.yml on ivh/PyReduce
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyreduce_astro-0.8.2-cp314-cp314-macosx_11_0_arm64.whl -
Subject digest:
adeda8b7c76f54af810fe770349348da716e2e40ba41cc5369476b1c9998efda - Sigstore transparency entry: 1256920325
- Sigstore integration time:
-
Permalink:
ivh/PyReduce@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Branch / Tag:
refs/tags/v0.8.2 - Owner: https://github.com/ivh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyreduce_astro-0.8.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyreduce_astro-0.8.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7a698b7650f29e7c65e205a6865e8d411377aebb206242d41cbab852b61942f
|
|
| MD5 |
10e53aeafbfc9ebd1b1f18cd2b8fec8c
|
|
| BLAKE2b-256 |
04c50692f4ac48b986172a7ca2ff65c1962c102a46f339a114e5e3f13d914093
|
Provenance
The following attestation bundles were made for pyreduce_astro-0.8.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on ivh/PyReduce
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyreduce_astro-0.8.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
f7a698b7650f29e7c65e205a6865e8d411377aebb206242d41cbab852b61942f - Sigstore transparency entry: 1256917393
- Sigstore integration time:
-
Permalink:
ivh/PyReduce@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Branch / Tag:
refs/tags/v0.8.2 - Owner: https://github.com/ivh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyreduce_astro-0.8.2-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyreduce_astro-0.8.2-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6cfd69f3c0d5d426fbcfff3828dfb86a3414bf48725b68b42b44aa1a42faa2b
|
|
| MD5 |
59574c52b0691b2189e6bcde937fc996
|
|
| BLAKE2b-256 |
c287d134faaf06833980fab41ac753235b766db5526c95377ddea398a8bb778b
|
Provenance
The following attestation bundles were made for pyreduce_astro-0.8.2-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
python-publish.yml on ivh/PyReduce
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyreduce_astro-0.8.2-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
d6cfd69f3c0d5d426fbcfff3828dfb86a3414bf48725b68b42b44aa1a42faa2b - Sigstore transparency entry: 1256919005
- Sigstore integration time:
-
Permalink:
ivh/PyReduce@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Branch / Tag:
refs/tags/v0.8.2 - Owner: https://github.com/ivh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyreduce_astro-0.8.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyreduce_astro-0.8.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0df6cf251ee45b01dd8397567867ddb44b3b5459757b9db592bff17c3d4d521c
|
|
| MD5 |
3da830729efa45840087e4cc4fea94fc
|
|
| BLAKE2b-256 |
6a15c140390cd6a6d7fdae8fbde3ec063c865d399ab6e1965b1900577852c403
|
Provenance
The following attestation bundles were made for pyreduce_astro-0.8.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on ivh/PyReduce
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyreduce_astro-0.8.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
0df6cf251ee45b01dd8397567867ddb44b3b5459757b9db592bff17c3d4d521c - Sigstore transparency entry: 1256918474
- Sigstore integration time:
-
Permalink:
ivh/PyReduce@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Branch / Tag:
refs/tags/v0.8.2 - Owner: https://github.com/ivh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyreduce_astro-0.8.2-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyreduce_astro-0.8.2-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
125dee93a8fddcfb7172be4e47b28e87c2cb42299d3d4be2a688234cec3571a3
|
|
| MD5 |
83c8ebd61688bac238f6c9ccd09b7ebf
|
|
| BLAKE2b-256 |
12d0115d1845eab7109d88da9d446a36bafd8cebe4877b8d40b2e2910c92bc0b
|
Provenance
The following attestation bundles were made for pyreduce_astro-0.8.2-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
python-publish.yml on ivh/PyReduce
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyreduce_astro-0.8.2-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
125dee93a8fddcfb7172be4e47b28e87c2cb42299d3d4be2a688234cec3571a3 - Sigstore transparency entry: 1256919590
- Sigstore integration time:
-
Permalink:
ivh/PyReduce@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Branch / Tag:
refs/tags/v0.8.2 - Owner: https://github.com/ivh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ea43dfb8aebfbe28f3520dcd668fa40b17419d6 -
Trigger Event:
push
-
Statement type: