Skip to content

Add offset to spectral transformations to enable shifted slits#875

Merged
oczoske merged 4 commits intomainfrom
oc/mcd_spec
Apr 9, 2026
Merged

Add offset to spectral transformations to enable shifted slits#875
oczoske merged 4 commits intomainfrom
oc/mcd_spec

Conversation

@oczoske
Copy link
Copy Markdown
Collaborator

@oczoske oczoske commented Feb 3, 2026

This is a bit of a hack to enable simulations of offset slits in MICADO. The offset is in the dispersion direction and observations in the nominal and offset slits are meant to fill in missing data due to the gaps in the detector array. A proper implementation would use separate trace files computed for both slit positions. Here, offsets are determined from the CRVALiD in the FOV header and added to the x and y arrays from which the transformations are computed. The CRVALiD values are zero for nominal slits and non-zero for shifted slits. This works for MICADO, but it needs to be tested that it doesn't break METIS and other spectrographs.

Related to AstarVienna/irdb#308

@oczoske oczoske self-assigned this Feb 3, 2026
@oczoske oczoske added enhancement PR adding or improving a feature (use "Feature" type for issues (requests), not this label) effects Related to a ScopeSim effect spectroscopy Related to spectroscopic modes labels Feb 3, 2026
@oczoske oczoske moved this to 🏗 In progress in ScopeSim-development Feb 3, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 77.77778% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.79%. Comparing base (9a4120b) to head (19904ed).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
scopesim/effects/spectral_trace_list_utils.py 40.00% 3 Missing ⚠️
scopesim/effects/spectral_trace_list.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #875      +/-   ##
==========================================
+ Coverage   74.76%   74.79%   +0.03%     
==========================================
  Files          69       69              
  Lines        8936     8944       +8     
==========================================
+ Hits         6681     6690       +9     
+ Misses       2255     2254       -1     

☔ 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.

@oczoske oczoske marked this pull request as ready for review February 16, 2026 09:27
@oczoske oczoske requested a review from teutoburg April 8, 2026 17:14
@teutoburg teutoburg moved this from 🏗 In progress to 👀 Awaiting Review in ScopeSim-development Apr 8, 2026
Copy link
Copy Markdown
Contributor

@teutoburg teutoburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems useful 👍

@oczoske oczoske merged commit bf507db into main Apr 9, 2026
26 checks passed
@oczoske oczoske deleted the oc/mcd_spec branch April 9, 2026 08:20
@github-project-automation github-project-automation bot moved this from 👀 Awaiting Review to ✅ Done in ScopeSim-development Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effects Related to a ScopeSim effect enhancement PR adding or improving a feature (use "Feature" type for issues (requests), not this label) spectroscopy Related to spectroscopic modes

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants