Add FZP telescope tutorial to docs#153
Open
jacobdparker wants to merge 1 commit into
Open
Conversation
Adds docs/tutorials/fzp_focus.ipynb, a new Jupyter tutorial demonstrating how to model a Fresnel Zone Plate (FZP) as a holographic grating using HolographicRulingSpacing. The tutorial covers: - Recording geometry: x1 at 1 AU (sun distance) and x2 at the focal point, producing an ideal on-axis FZP for 171 Å EUV light - Solar disk source (0.5° full diameter) as the object surface - Known limitation with SequentialSystem backward-trace normalization for transmissive gratings, and the workaround (override rayfunction_default with physical coordinates) - Spot diagrams across the ±0.19° field of view - Diffraction-limited performance verification: geometric RMS spot 0.33 pm vs Airy disk radius 0.149 μm (ratio ~2×10⁻⁶) - Chromatic aberration demo: defocused disks at 169 Å (r=0.82 mm) and 174 Å (r=1.23 mm) vs diffraction-limited point at 171 Å Also registers the new tutorial in docs/index.rst. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #153 +/- ##
=======================================
Coverage 99.27% 99.27%
=======================================
Files 108 108
Lines 5391 5391
=======================================
Hits 5352 5352
Misses 39 39
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
roytsmart
reviewed
May 21, 2026
| "metadata": { | ||
| "raw_mimetype": "text/restructuredtext" | ||
| }, | ||
| "source": "FZP Telescope Tutorial\n======================\n\nA `Fresnel Zone Plate (FZP) <https://en.wikipedia.org/wiki/Zone_plate>`_\nis a diffractive optical element that focuses light by encoding the\ninterference pattern of two spherical waves on a flat surface.\nIn :mod:`optika`, an FZP is modeled as a transmissive surface with\n:class:`~optika.rulings.HolographicRulingSpacing` rulings, where the\ntwo recording-beam origins define the focal geometry.\n\nThis tutorial builds a single-element FZP telescope that focuses\ncollimated 171 Å EUV light onto a detector and examines the resulting\nspot diagrams." |
| "metadata": { | ||
| "raw_mimetype": "text/restructuredtext" | ||
| }, | ||
| "source": "and the focal length" |
| "metadata": { | ||
| "raw_mimetype": "text/restructuredtext" | ||
| }, | ||
| "source": "Holographic recording geometry\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAn FZP is equivalent to a holographic grating whose rulings were\nrecorded by interfering two coherent beams.\nTo focus incoming collimated light (a plane wave from :math:`z = -\\infty`)\nonto a focal point at :math:`z = +\\text{focal\\_length}`, we choose:\n\n- **Recording beam 1** (``x1``): originates very far away on the optical\n axis, representing a plane wave. With ``is_diverging_1=True`` and\n :math:`x_1 \\to -\\infty`, the unit vectors from :math:`x_1` to every\n point on the surface become parallel, so the ruling pattern is\n identical to that produced by a true plane wave. We place ``x1`` at\n 1 AU (the Earth–Sun distance) so that the residual defocus\n :math:`\\delta f = f^2 / |x_1| \\approx 7\\ \\mathrm{pm}` is far below\n the diffraction limit.\n- **Recording beam 2** (``x2``): converges *to* the desired focal point\n at :math:`z = +\\text{focal\\_length}`. ``is_diverging_2=False`` means\n rays are directed toward :math:`x_2`, i.e. the second recording beam\n is a converging spherical wave.\n\nThe :class:`~optika.rulings.HolographicRulingSpacing` class computes\nthe spatially-varying ruling vector :math:`\\mathbf{d}(\\mathbf{r})` from\nthese two source points." |
Collaborator
There was a problem hiding this comment.
So is 7 pm really correct?
| "metadata": { | ||
| "raw_mimetype": "text/restructuredtext" | ||
| }, | ||
| "source": "Holographic recording geometry\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAn FZP is equivalent to a holographic grating whose rulings were\nrecorded by interfering two coherent beams.\nTo focus incoming collimated light (a plane wave from :math:`z = -\\infty`)\nonto a focal point at :math:`z = +\\text{focal\\_length}`, we choose:\n\n- **Recording beam 1** (``x1``): originates very far away on the optical\n axis, representing a plane wave. With ``is_diverging_1=True`` and\n :math:`x_1 \\to -\\infty`, the unit vectors from :math:`x_1` to every\n point on the surface become parallel, so the ruling pattern is\n identical to that produced by a true plane wave. We place ``x1`` at\n 1 AU (the Earth–Sun distance) so that the residual defocus\n :math:`\\delta f = f^2 / |x_1| \\approx 7\\ \\mathrm{pm}` is far below\n the diffraction limit.\n- **Recording beam 2** (``x2``): converges *to* the desired focal point\n at :math:`z = +\\text{focal\\_length}`. ``is_diverging_2=False`` means\n rays are directed toward :math:`x_2`, i.e. the second recording beam\n is a converging spherical wave.\n\nThe :class:`~optika.rulings.HolographicRulingSpacing` class computes\nthe spatially-varying ruling vector :math:`\\mathbf{d}(\\mathbf{r})` from\nthese two source points." |
Collaborator
There was a problem hiding this comment.
replace +\\text{focal\\_length} with :math:f and define
| "outputs": [], | ||
| "execution_count": 53 | ||
| }, | ||
| { |
Collaborator
There was a problem hiding this comment.
Need "Source" heading and short explanation
| "metadata": { | ||
| "raw_mimetype": "text/restructuredtext" | ||
| }, | ||
| "source": "Because the internal normalization algorithm in\n:class:`~optika.systems.SequentialSystem` traces rays *backward* through\nthe system to establish the field-of-view scale, and because this\nbackward trace re-applies the grating equation of a transmissive FZP\n(doubling the deflection angle), we must compute the default ray function\ndirectly with physical coordinates and cache the result manually.\n\n.. note::\n\n This is a known limitation when ``object_is_at_infinity=True`` with\n a transmissive grating as the pupil stop. Reflective systems (e.g.\n the prime-focus telescope) are not affected." |
Collaborator
There was a problem hiding this comment.
Is this really true? Check if the normalization algorithm works here
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
docs/tutorials/fzp_focus.ipynb: a new Jupyter tutorial modeling a Fresnel Zone Plate (FZP) as a holographic grating withHolographicRulingSpacing, designed to focus 171 Å EUV light (MUSE science wavelength)docs/index.rstTutorial contents
HolographicRulingSpacingwith recording beamx1at 1 AU so residual defocus δf = f²/|x1| ≈ 7 pm, far below the diffraction limitSequentialSystem's backward-trace normalization re-applies the grating equation for transmissive surfaces (doubling the deflection angle); fix: overriderayfunction_defaultwith physical coordinates