Skip to content

Fix irradiance autodiff indexing#667

Merged
manuelFragata merged 1 commit into
optiland:masterfrom
ahfoysal:fix-irradiance-autodiff-indexing
Jul 13, 2026
Merged

Fix irradiance autodiff indexing#667
manuelFragata merged 1 commit into
optiland:masterfrom
ahfoysal:fix-irradiance-autodiff-indexing

Conversation

@ahfoysal

@ahfoysal ahfoysal commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #408.

Swaps the differentiable irradiance accumulation to keep the same (x, y) map layout as the regular path, and adds a regression for a non-square detector grid.

Tests:

  • PYTHONPATH=/tmp/optiland-vtk-stub .venv/bin/python -m pytest -q tests/test_analysis.py::TestIncoherentIrradiance
  • .venv/bin/ruff check optiland/analysis/irradiance.py
  • .venv/bin/ruff format --check optiland/analysis/irradiance.py
  • uv build

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@HarrisonKramer

Copy link
Copy Markdown
Collaborator

Thanks for another solid PR, @ahfoysal.

All looks good from my end! @manuelFragata - as this is related to your irradiance analysis, can I ask you to quickly review and approve?

Thanks,
Kramer

@manuelFragata manuelFragata left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hi there @ahfoysal ,

thank you for fixing this.
makes sense and looks good. merging now.

best,
manuel

@manuelFragata
manuelFragata merged commit ca78a84 into optiland:master Jul 13, 2026
11 checks 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.

IncoherentIrradiance indexes (y,x) in differentiable path

3 participants