Add beam-footprint utilities and PSF metrics for the wavefield path#174
Open
jacobdparker wants to merge 1 commit into
Open
Add beam-footprint utilities and PSF metrics for the wavefield path#174jacobdparker wants to merge 1 commit into
jacobdparker wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/wavefields #174 +/- ##
======================================================
- Coverage 98.64% 98.62% -0.02%
======================================================
Files 127 129 +2
Lines 6849 7046 +197
======================================================
+ Hits 6756 6949 +193
- Misses 93 97 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- SequentialSystem.footprint(): the positions where a dense grid of rays traced through the entire system intersects a given surface, in local surface coordinates, with a mask selecting rays that reach the sensor. - optika.apertures.footprint_aperture(): a PolygonalAperture from the convex hull of a footprint, for building the effective pupil of one channel of a multi-channel instrument. - SequentialSystem.wavefield(bound="footprint"): automatic per-surface sampling regions from the beam footprint, padded by a relative fraction and an absolute minimum (which handles intermediate-focus surfaces). - optika.wavefields.encircled_energy_radius / ensquared_energy / fwhm: image-quality metrics of sampled point-spread functions, validated against an analytic Gaussian. - jupyter-execute example on SequentialSystem.psf demonstrating the footprint-bounded Huygens PSF of a parabolic telescope. Validated end-to-end on the ESIS flight-1 design: the channel pupil built from footprint() + footprint_aperture() with bound="footprint" matches the geometric image centroid to ~0.1 um and reproduces the expected diffraction-limited EE50. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
5e98d24 to
60267ad
Compare
79bcb98 to
3010b30
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #173. Promotes the patterns proven while modeling ESIS into general utilities, so a physical-optics model of a real (multi-channel, obscured) instrument is a few lines instead of a page:
SequentialSystem.footprint(surface, ...): positions where a dense pupil grid of rays traced through the entire system (all masks active) intersects a given surface, in local surface coordinates, plus the mask of rays that reach the sensor - i.e. the used portion of each optic. Useful for geometric work independently of wavefields.optika.apertures.footprint_aperture(position, where): aPolygonalAperturefrom the convex hull of a footprint - the constructor for an effective channel pupil (e.g. the sector of the ESIS primary delimited by the obscuration hub, the octagon edge, and the projected grating trapezoid).wavefield(bound="footprint", padding_relative=..., padding_absolute=...): automatic per-surface sampling regions from the beam footprint. The absolute padding floor handles intermediate-focus surfaces, where the geometric footprint collapses to a point but the diffraction pattern needs a finite window.optika.wavefields.encircled_energy_radius,ensquared_energy,fwhm): image-quality numbers that were previously recomputed by hand for every analysis;ensquared_energyis the natural pixel-limited criterion. Validated against an analytic Gaussian, including broadcasting over extra axes.jupyter-executeexample onSequentialSystem.psf(footprint-bounded Huygens PSF of a parabolic telescope).scipypromoted from transitive to explicit dependency (scipy.spatial.ConvexHull).Validation
Reproducing the hand-built ESIS f1 channel model through this API (
footprint+footprint_aperture+bound="footprint"withpadding_absolute=50 um) matches the reference results: image centroid within 0.13 um of the geometric raytrace and EE50 = 3.97 um vs the 3.98 um reference.🤖 Generated with Claude Code