Skip to content

Added furst_optics.spectrographs.Spectrograph class.#25

Open
roytsmart wants to merge 1 commit into
mainfrom
feature/spectrograph
Open

Added furst_optics.spectrographs.Spectrograph class.#25
roytsmart wants to merge 1 commit into
mainfrom
feature/spectrograph

Conversation

@roytsmart

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Oct 30, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 45.65217% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.50%. Comparing base (9941165) to head (5cccbbc).

Files with missing lines Patch % Lines
furst_optics/spectrographs/_spectrographs.py 48.14% 42 Missing ⚠️
furst_optics/spectrographs/_design.py 0.00% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              main      #25       +/-   ##
============================================
- Coverage   100.00%   88.50%   -11.50%     
============================================
  Files           23       26        +3     
  Lines          343      435       +92     
============================================
+ Hits           343      385       +42     
- Misses           0       50       +50     
Flag Coverage Δ
unittests 88.50% <45.65%> (-11.50%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@jacobdparker

Copy link
Copy Markdown

While investigating why normalized coordinates fail for grating systems in optika, we reproduced this PR's raytrace failures and traced them to three bugs in optika's stop root-finding solver — not to the optical model here. Fixes are up as a stack: sun-data/optika#168 (scale-aware Jacobian perturbation + convergence tolerance — the source of the Max iterations exceeded errors), sun-data/optika#169 (object-as-field-stop support: a TypeError in zfunc, a missing broadcast, and a Newton seed that produced NaN at the off-axis feed optic), and sun-data/optika#170 (transmissive stop surfaces).

With #168 + #169 applied, design().system.rayfunction_stops converges and recovers field_max = ±0.26656° — exactly the sunpy average solar angular radius — so the SolarDisk-as-field-stop configuration used here works as intended. The cos→sin change to the source aperture already in this PR is also required (dimensionless CircularAperture radii bound the transverse direction components).

Unrelated API drift to address when rebasing this branch onto current optika:

  • optika.sensors.AbstractImagingSensorMaterialoptika.sensors.materials.AbstractSensorMaterial
  • AbstractRulingSpacing.__call__ now requires a normal argument (three call sites in _spectrographs.py)
  • spectrographs.design is not exported from furst_optics/spectrographs/__init__.py
  • the package rename furst_opticsfurst on main

🤖 Generated with Claude Code

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.

2 participants