Add a read_noise parameter to the imaging sensor#193
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
read_noiseparameter to the imaging sensor — the standard deviation of the Gaussian read noise added to each pixel during readout.AbstractImagingSensor.read_noiseis a property defaulting to0 electron(so existing/external sensors are unaffected), with a corresponding field onImagingSensor.exposeadds zero-mean Gaussian read noise to the measured electrons whennoise=True(verified by Monte Carlo: √(shot² + read²)).uncertaintyadds the read noise in quadrature with the material's shot/Fano/partial-charge-collection noise.New
test_read_noiseplus read-noise coverage in theexpose/uncertaintytests. It flows automatically intoLinearSystem.image(uncertainty=True)and its consumers, since those delegate to the sensor.🤖 Generated with Claude Code