Skip to content

Conversation

@singer-yang
Copy link
Owner

No description provided.

Copy link
Contributor

Copilot AI left a comment

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 refactors sensor resolution and size handling across all lens classes to read these values from lens files by default instead of requiring them as constructor parameters. The change makes the API cleaner and more consistent.

  • Removed sensor_res and sensor_size parameters from lens class constructors (GeoLens, DiffractiveLens, HybridLens, PSFNetLens)
  • Made ParaxialLens sensor parameters optional with defaults
  • Updated all documentation and examples to reflect the new API
  • Fixed test assertion to use <= instead of < for more inclusive bounds checking

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/test_monte_carlo.py Changed assertions from < to <= for peak position tolerance
docs/user_guide/lens_systems.rst Removed sensor_res/sensor_size from code examples, added explanatory comments
docs/quickstart.rst Removed sensor_res parameter from PSFNetLens example
docs/api/lens.rst Updated API documentation to remove sensor parameters and add notes about defaults
docs/api/hybridlens.rst Updated HybridLens documentation to remove sensor parameters
docs/api/geolens.rst Updated GeoLens documentation to remove sensor parameters
deeplens/psfnetlens.py Removed sensor_res parameter, added set_sensor_res method, improved load_net messages
deeplens/paraxiallens.py Made sensor parameters optional with defaults and print messages
deeplens/lens.py Fixed grammar in docstring, removed commented-out code, fixed whitespace
deeplens/hybridlens.py Removed sensor parameters from constructor, added defaults when no file provided
deeplens/geolens.py Removed sensor parameters from constructor, added defaults with helpful print messages
deeplens/diffraclens.py Removed sensor parameters from constructor, added defaults with helpful print messages
datasets/lenses/hybridlens/a489_doe.json Changed DOE type from "DOE" to "Binary2" and removed redundant param_model field
5_pupil_field.py Renamed output files and labels from "pupil" to "ray-wave" for clarity
3_psf_net.py Removed sensor_res from constructor, added set_sensor_res call

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@singer-yang singer-yang merged commit a08cbc7 into main Jan 8, 2026
1 check passed
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