Skip to content

Add a read_noise parameter to the imaging sensor#193

Merged
roytsmart merged 3 commits into
mainfrom
feature/sensor-read-noise
Jul 24, 2026
Merged

Add a read_noise parameter to the imaging sensor#193
roytsmart merged 3 commits into
mainfrom
feature/sensor-read-noise

Conversation

@roytsmart

Copy link
Copy Markdown
Collaborator

Adds a read_noise parameter to the imaging sensor — the standard deviation of the Gaussian read noise added to each pixel during readout.

  • AbstractImagingSensor.read_noise is a property defaulting to 0 electron (so existing/external sensors are unaffected), with a corresponding field on ImagingSensor.
  • expose adds zero-mean Gaussian read noise to the measured electrons when noise=True (verified by Monte Carlo: √(shot² + read²)).
  • uncertainty adds the read noise in quadrature with the material's shot/Fano/partial-charge-collection noise.

New test_read_noise plus read-noise coverage in the expose/uncertainty tests. It flows automatically into LinearSystem.image(uncertainty=True) and its consumers, since those delegate to the sensor.

🤖 Generated with Claude Code

Add a `read_noise` property to `AbstractImagingSensor` (defaulting to zero,
so existing sensors are unaffected) and a corresponding field on
`ImagingSensor`, giving the standard deviation of the Gaussian read noise
added to each pixel during readout.

`expose` now adds zero-mean Gaussian read noise to the measured electrons
when `noise=True`, and `uncertainty` adds the read noise in quadrature with
the material's shot/Fano/partial-charge-collection noise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CtdKmedevWkDab6BWupXqQ
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.55%. Comparing base (0a4cd8d) to head (6295944).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #193   +/-   ##
=======================================
  Coverage   99.55%   99.55%           
=======================================
  Files         116      116           
  Lines        6446     6457   +11     
=======================================
+ Hits         6417     6428   +11     
  Misses         29       29           
Flag Coverage Δ
unittests 99.55% <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 Harness.
📢 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 and others added 2 commits July 23, 2026 18:30
The concrete default left the base-class return statement uncovered.
Making it abstract (with the field on `ImagingSensor` satisfying it) keeps
patch coverage clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CtdKmedevWkDab6BWupXqQ
@roytsmart
roytsmart merged commit 71e7cd6 into main Jul 24, 2026
12 checks passed
@roytsmart
roytsmart deleted the feature/sensor-read-noise branch July 24, 2026 00:49
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