Skip to content

Conversation

@teutoburg
Copy link
Contributor

@teutoburg teutoburg commented May 8, 2025

This mostly adds a DetectorList3D class, which acts as a "virtual 3D detector" as outlined in #550, allowing simplified simulations of (METIS) IFU observations. The output is similar to a rectified and drizzled IFU cube (square pixels), without the computational overhead of those operations. This obviously come at the cost of simulation accuracy, but is considered an acceptable tradeoff for a science team target audience.

More effects (like LSF) are needed to simulate those outputs with adequate realism, but this now adds the geometric basis to run those simulations at all. I recommend merging this, and dealing with the rest separately, since it's now at least at a stable working state. "To be added" is also a notebook showcasing this mode, but that should be in the IRDB.

AstarVienna/irdb#233 adds the corresponding mode definitions in the IRDB.

teutoburg added 3 commits May 8, 2025 18:52
This cost me almost an hour to figure out why nothing was coming through -.-

I thought we already had a warning like this somewhere?
@teutoburg teutoburg moved this from 🆕 New to 🏗 In progress in ScopeSim-development May 8, 2025
@teutoburg teutoburg linked an issue May 8, 2025 that may be closed by this pull request
@teutoburg teutoburg added the enhancement PR adding or improving a feature (use "Feature" type for issues (requests), not this label) label May 8, 2025
@teutoburg teutoburg self-assigned this May 8, 2025
teutoburg added 2 commits May 14, 2025 20:18
This was never used anywhere except in testing and is likely a leftover
from pre-ScopeSim days.
teutoburg added 7 commits May 15, 2025 14:09
Now that `add_imagehdu_to_imagehdu()` can handle the 3D case, it needs a full
WCS in such a case. I don't think there's a reason to not add the spectral
part at this point already.
This eliminated the need to have a spectral trace list effect in the
simple IFU mode.
@teutoburg
Copy link
Contributor Author

Includes commits from #655 and #656 (both cherry-picked), ideally those PRs would be merged first.

@codecov
Copy link

codecov bot commented May 15, 2025

Codecov Report

❌ Patch coverage is 93.52941% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.82%. Comparing base (934f2ac) to head (6635d92).
⚠️ Report is 241 commits behind head on main.

Files with missing lines Patch % Lines
scopesim/effects/binning_3d.py 83.87% 5 Missing ⚠️
scopesim/optics/image_plane_utils.py 92.59% 2 Missing ⚠️
scopesim/optics/optical_train.py 71.42% 2 Missing ⚠️
scopesim/effects/detector_list.py 98.71% 1 Missing ⚠️
scopesim/effects/psfs/discrete.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #654      +/-   ##
==========================================
+ Coverage   76.67%   76.82%   +0.15%     
==========================================
  Files          70       71       +1     
  Lines        8612     8717     +105     
==========================================
+ Hits         6603     6697      +94     
- Misses       2009     2020      +11     

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

@teutoburg teutoburg changed the title Fh/simple ifu Implement simplified IFU mode with cube readout May 15, 2025
@teutoburg teutoburg added the effects Related to a ScopeSim effect label May 16, 2025
@teutoburg teutoburg added the API How users interact with the software label May 16, 2025
@teutoburg teutoburg added Science Team Scientific target audience spectroscopy Related to spectroscopic modes labels May 16, 2025
@teutoburg teutoburg marked this pull request as ready for review May 20, 2025 09:58
@teutoburg teutoburg moved this from 🏗 In progress to 👀 Awaiting Review in ScopeSim-development May 20, 2025
Copy link
Collaborator

@hugobuddel hugobuddel left a comment

Choose a reason for hiding this comment

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

Looks pretty clean!

I can't see that I fully comprehend everything, but I'm confident that I could if you would win the lottery. In fact, quite some 'bad' code is removed or annotated, so that's nice.

I've added some minor comments; I'll let you decide how to handle those.

Copy link
Collaborator

@oczoske oczoske left a comment

Choose a reason for hiding this comment

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

As discussed.

@teutoburg teutoburg merged commit 8f7590f into main May 22, 2025
38 of 40 checks passed
@teutoburg teutoburg deleted the fh/simple-ifu branch May 22, 2025 11:26
@github-project-automation github-project-automation bot moved this from 👀 Awaiting Review to ✅ Done in ScopeSim-development May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API How users interact with the software effects Related to a ScopeSim effect 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

Archived in project

Development

Successfully merging this pull request may close these issues.

Add Detector3D class

4 participants