Skip to content

2D Tilt Correction#303

Open
hpparvi wants to merge 31 commits intoastropy:mainfrom
hpparvi:tilt_correction
Open

2D Tilt Correction#303
hpparvi wants to merge 31 commits intoastropy:mainfrom
hpparvi:tilt_correction

Conversation

@hpparvi
Copy link
Contributor

@hpparvi hpparvi commented Mar 15, 2026

This PR introduces specreduce.tilt_correction.TiltCorrection and specreduce.tilt_solution.TiltSolution classes. The TiltCorrection class can be used to estimate the 2D tilt distortion as an astropy Polynomial2D model from (optionally multiple) arc frame(s), while the TiltSolution class can be used to access the tilt-corrected to detector mapping and its inverse, resample science frames, or export the tilt model as a GWCS object.

LLM usage: I've used Claude Code (Opus 4.6) to revise the language in the documentation, revise the docstrings, find and fix several bugs, improve the documentation of some parts of the code, and to implement the TiltSolution._calculate_inverse method (that I had implemented myself earlier, then removed since I considered it unnecessary, until I realized it may be quite necessary indeed in the future, but was too lazy to find the commit where I still had it). Additionally, I used Grammarly to fix the grammar in this PR description.

hpparvi and others added 24 commits March 10, 2026 15:57
- Renamed crossdisp -> cdisp.
- Revised the tilt correction tests.
… If give, the trace will be used to set the reference pixel.
…plified tilt correction tests by introducing an additional fixture.
@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

❌ Patch coverage is 94.01408% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.93%. Comparing base (dd2fbe4) to head (3dae516).

Files with missing lines Patch % Lines
specreduce/tilt_correction.py 93.71% 10 Missing ⚠️
specreduce/tilt_solution.py 94.40% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #303      +/-   ##
==========================================
+ Coverage   90.45%   90.93%   +0.47%     
==========================================
  Files          16       18       +2     
  Lines        1855     2139     +284     
==========================================
+ Hits         1678     1945     +267     
- Misses        177      194      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant