Skip to content

Update docs and examples - #91

Merged
MatthewFilipovich merged 2 commits into
mainfrom
docs/improve
Apr 1, 2026
Merged

Update docs and examples#91
MatthewFilipovich merged 2 commits into
mainfrom
docs/improve

Conversation

@MatthewFilipovich

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 31, 2026 23:52
@codecov

codecov Bot commented Mar 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.92%. Comparing base (a3062a6) to head (306b8a2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #91   +/-   ##
=======================================
  Coverage   99.92%   99.92%           
=======================================
  Files          38       38           
  Lines        1304     1304           
=======================================
  Hits         1303     1303           
  Misses          1        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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR refreshes TorchOptics documentation and expands the Sphinx-gallery example set, aiming to provide clearer user guides and richer end-to-end demonstrations (propagation, systems, coherence/polarization, optimization, and quantum).

Changes:

  • Reworked multiple user-guide pages and quickstart content for clearer explanations and more complete runnable snippets.
  • Added/organized many new Sphinx-gallery examples across optical phenomena, optical systems, aberrations, coherence/polarization, optimization, and quantum.
  • Updated lint configuration and minor code/test cleanups around Laguerre–Gaussian notation.

Reviewed changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/profiles/test_laguerre_gaussian_profile.py Removes inline Ruff suppression tied to ambiguous l variable.
src/torchoptics/profiles/laguerre_gaussian.py Removes inline Ruff suppression for Laguerre–Gaussian l parameter and helper.
README.md Updates feature bullets and links README snippets to full docs examples.
pyproject.toml Updates Ruff ignore list (adds E741).
examples/README.rst Rewords examples landing page text.
examples/quantum/README.rst Adds a quantum examples subsection landing page.
examples/quantum/quantum_state_discrimination.py Adds a quantum state discrimination example using HG modes and Helstrom bound.
examples/optimization/training_petal_beam.py Adds an optimization/inverse-design example (petal beam training + animation).
examples/optimization/training_multi_plane_focusing.py Adds an optimization example for multi-plane focusing.
examples/optimization/README.rst Adds optimization subsection landing page.
examples/optical_systems/README.rst Adds optical systems subsection landing page.
examples/optical_systems/phase_only_modulators.py Adds a phase-only hologram example for beam shaping.
examples/optical_systems/mach_zehnder_interferometer.py Adds a Mach–Zehnder interferometer example using beam splitters.
examples/optical_systems/lens_focusing.py Adds a lens focusing and beam waist evolution example.
examples/optical_systems/4f_system.py Adds a 4f system example demonstrating spatial filtering.
examples/optical_phenomena/youngs_double_slit.py Adds a Young’s double slit interference example.
examples/optical_phenomena/talbot_effect.py Adds a Talbot effect (self-imaging) example and carpet visualization.
examples/optical_phenomena/README.rst Adds optical phenomena subsection landing page.
examples/optical_phenomena/polychromatic_light_with_grating.py Adds a polychromatic dispersion example with RGB visualization.
examples/optical_phenomena/gaussian_beam_propagation.py Adds a Gaussian beam propagation + theory comparison example.
examples/optical_phenomena/fresnel_zone_plate.py Adds a Fresnel zone plate construction and focusing example.
examples/optical_phenomena/aperture_limited_psf.py Adds an aperture-limited PSF gallery example.
examples/optical_phenomena/animate_propagation.py Adds a propagation animation example using animate_tensor.
examples/coherence_and_polarization/spatial_coherence.py Adds a spatial coherence propagation comparison example.
examples/coherence_and_polarization/README.rst Adds coherence/polarization subsection landing page.
examples/coherence_and_polarization/polarized_field.py Adds a polarized field walkthrough (polarizers/waveplates, Stokes parameters).
examples/coherence_and_polarization/laser_speckle_patterns.py Adds laser speckle simulation + statistics example.
examples/aberrations/zernike_aberrations.py Adds Zernike aberration gallery + PSF degradation example.
examples/aberrations/README.rst Adds aberrations subsection landing page.
examples/aberrations/chromatic_aberration.py Adds chromatic aberration example using polychromatic phase modulation.
docs/source/user-guide/systems.rst Clarifies System.forward element skipping behavior at field z.
docs/source/user-guide/spatial_coherence.rst Expands mutual coherence explanation, memory note, and plotting examples.
docs/source/user-guide/propagation.rst Adds guidance on Fresnel-variant propagation methods.
docs/source/user-guide/profiles.rst Reorganizes and expands profile documentation; adds mode galleries and Zernike section.
docs/source/user-guide/polarization.rst Rewrites polarized-field intro and points to elements guide for details.
docs/source/user-guide/inverse_design.rst Refines inverse-design narrative and updates training loop example to use overlap loss.
docs/source/user-guide/fields.rst Adds sample Field.__repr__ output and clarifies geometry requirements for overlap.
docs/source/user-guide/elements.rst Major expansion: modulators, polychromatic modulators, lenses, detectors, beam splitters, polarization elements, visualization.
docs/source/user-guide/configuration.rst Clarifies defaults usage and adds explicit torch import in dtype example.
docs/source/quickstart/index.rst Updates quickstart narrative and parameters; points to new optimization examples.
docs/source/conf.py Reorders Sphinx-gallery sections to match new examples directory layout.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment thread examples/optical_phenomena/animate_propagation.py
Comment thread examples/optimization/training_petal_beam.py
Comment thread examples/optical_systems/phase_only_modulators.py
@MatthewFilipovich
MatthewFilipovich merged commit 52d9eef into main Apr 1, 2026
4 checks passed
@MatthewFilipovich
MatthewFilipovich deleted the docs/improve branch April 1, 2026 08:57
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