Skip to content

Use optimal inverse transform for rectification#961

Draft
oczoske wants to merge 1 commit into
mainfrom
oc/lms_fit_inverse
Draft

Use optimal inverse transform for rectification#961
oczoske wants to merge 1 commit into
mainfrom
oc/lms_fit_inverse

Conversation

@oczoske

@oczoske oczoske commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

As described in #959 , this PR implements a least-squares fit for the transformation used in rectifying spectra. This avoids the systematics caused by the interpolated inverse matrix transforms for METIS LMS. The matrix transforms can be used by setting
opttrain.rectify_cube(hdul, fit_inverse=False)

It still needs to be ensured that the PR also works for rectify_traces(), used for long-slit spectroscopy in METIS and MICADO.

@oczoske oczoske self-assigned this Jul 20, 2026
@oczoske oczoske added enhancement PR adding or improving a feature (use "Feature" type for issues (requests), not this label) Science Team Scientific target audience spectroscopy Related to spectroscopic modes labels Jul 20, 2026
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 9.09091% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.45%. Comparing base (7a851ab) to head (2af1bb5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
scopesim/effects/spectral_trace_list_utils.py 9.52% 19 Missing ⚠️
scopesim/effects/metis_lms_trace_list.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #961      +/-   ##
==========================================
- Coverage   75.60%   75.45%   -0.15%     
==========================================
  Files          70       70              
  Lines        8981     9001      +20     
==========================================
+ Hits         6790     6792       +2     
- Misses       2191     2209      +18     

☔ View full report in Codecov by Harness.
📢 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.

@teutoburg teutoburg moved this to 🏗 In progress in ScopeSim-development Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement PR adding or improving a feature (use "Feature" type for issues (requests), not this label) Science Team Scientific target audience spectroscopy Related to spectroscopic modes

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

2 participants