Skip to content

Add optika.radiometry with an effective-area model#158

Merged
roytsmart merged 1 commit into
mainfrom
feature/radiometry
Jun 1, 2026
Merged

Add optika.radiometry with an effective-area model#158
roytsmart merged 1 commit into
mainfrom
feature/radiometry

Conversation

@roytsmart
Copy link
Copy Markdown
Collaborator

Summary

Introduces optika.radiometry, a subpackage for radiometric models of an optical system, starting with effective area.

  • AbstractEffectiveAreaModel — interface mapping wavelength → effective area (__call__(wavelength) -> area).
  • InterpolatedEffectiveAreaModel — holds calibration wavelength/area arrays and linearly interpolates between them via na.interp.

Linear interpolation (rather than a polynomial fit, as used by optika.distortion/optika.vignetting) is deliberate: a real effective-area curve has sharp features — absorption edges, filter cutoffs, multilayer reflectivity peaks — that a polynomial fits poorly.

optika.radiometry is intended as the home for the other radiometric factors of the linear forward model (energy-per-photon, voxel solid-angle/volume, etc.) as they're migrated in.

Testing

  • pytest optika/radiometry/_effective_area_test.py — 7 passed; 100% coverage.
  • The docstring example renders headless; black --check and ruff check clean.

🤖 Generated with Claude Code

Introduce the `optika.radiometry` subpackage, a home for radiometric models
of an optical system. It starts with `AbstractEffectiveAreaModel` (maps
wavelength -> effective area) and `InterpolatedEffectiveAreaModel`, which
linearly interpolates between measured calibration points (`wavelength`,
`area`). Linear interpolation is used rather than a polynomial fit because the
effective area has sharp features (absorption edges, filter cutoffs, multilayer
peaks) that a polynomial fits poorly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.32%. Comparing base (c3d1e62) to head (a15bfbc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #158   +/-   ##
=======================================
  Coverage   99.31%   99.32%           
=======================================
  Files         114      117    +3     
  Lines        5722     5771   +49     
=======================================
+ Hits         5683     5732   +49     
  Misses         39       39           
Flag Coverage Δ
unittests 99.32% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@roytsmart roytsmart merged commit 00357c5 into main Jun 1, 2026
12 checks passed
@roytsmart roytsmart deleted the feature/radiometry branch June 1, 2026 03:56
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.

1 participant