Skip to content

Commit 8ea43df

Browse files
ivhclaude
andcommitted
Release v0.8.2
- Curvature: fall back to per-trace height when extraction_height is None - Lower minimum Python to 3.12, test matrix on 3.12/3.13/3.14 - Ruff target-version aligned with supported minimum Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 41a1b67 commit 8ea43df

5 files changed

Lines changed: 666 additions & 428 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: ['3.13']
20+
python-version: ['3.12', '3.13', '3.14']
2121

2222
steps:
2323
- uses: actions/checkout@v4

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Changelog
22

33

4+
## [0.8.2] - 2026-04-08
5+
6+
### Fixed
7+
- Curvature step: fall back to per-trace height when `extraction_height` is `None` (matches `extract.py` behavior)
8+
9+
### Changed
10+
- Lower minimum Python version to 3.12
11+
- CI test matrix now covers Python 3.12, 3.13, and 3.14
12+
413
## [0.8.1] - 2026-03-05
514

615
### Added

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "pyreduce-astro"
3-
version = "0.8.1"
4-
requires-python = ">=3.13"
3+
version = "0.8.2"
4+
requires-python = ">=3.12"
55
description = "A data reduction package for echelle spectrographs"
66
readme = "README.md"
77
authors = [
@@ -19,6 +19,7 @@ classifiers = [
1919
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
2020
"Programming Language :: C",
2121
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3.12",
2223
"Programming Language :: Python :: 3.13",
2324
"Programming Language :: Python :: 3.14",
2425
"Topic :: Scientific/Engineering :: Astronomy",
@@ -117,7 +118,7 @@ path = "hatch_build.py"
117118
# Ruff - Modern Python linter and formatter
118119
[tool.ruff]
119120
line-length = 88
120-
target-version = "py313"
121+
target-version = "py312"
121122
extend-exclude = [
122123
".git",
123124
".hg",
@@ -204,7 +205,7 @@ exclude_lines = [
204205

205206
# cibuildwheel configuration for building platform-specific wheels
206207
[tool.cibuildwheel]
207-
build = "cp313-* cp314-*"
208+
build = "cp312-* cp313-* cp314-*"
208209
skip = "*-musllinux_* *-win32 *-manylinux_i686"
209210
test-command = "pytest {project}/test -m unit"
210211
test-requires = ["pytest"]

pyreduce/slit_curve.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,13 @@ def _fix_inputs(self, original):
125125
else:
126126
curve_height = np.asarray(curve_height, dtype=int)
127127

128-
# For curvature, extraction_height is always literal pixels
128+
# For curvature, extraction_height is always literal pixels.
129+
# When None, fall back to per-trace height (matches extract.py behavior).
129130
extraction_height = self.extraction_height
131+
if extraction_height is None:
132+
extraction_height = np.array(
133+
[t.height if t.height is not None else 0.5 for t in traces]
134+
)
130135
if np.isscalar(extraction_height):
131136
extraction_height = np.full(ntrace, int(extraction_height))
132137
else:

0 commit comments

Comments
 (0)