Add PixelResponseNonUniformity effect for fixed per-pixel gain variation (PRNU)#886
Draft
ShannonS00 wants to merge 4 commits intoAstarVienna:mainfrom
Draft
Add PixelResponseNonUniformity effect for fixed per-pixel gain variation (PRNU)#886ShannonS00 wants to merge 4 commits intoAstarVienna:mainfrom
PixelResponseNonUniformity effect for fixed per-pixel gain variation (PRNU)#886ShannonS00 wants to merge 4 commits intoAstarVienna:mainfrom
Conversation
…tronics/noise.py that models PRNU by multiplying each detector pixel by a per pixel gain factor drawn from N(1, prnu_std). The gain map is generated once per detector (keyed by detector ID) and reused across exposures for consistency. `prnu_std` can be a scalar float or a dict keyed by detector ID, allowing different RMS values per detector type (e.g. H2RG vs GeoSnap).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #886 +/- ##
==========================================
+ Coverage 74.82% 74.94% +0.11%
==========================================
Files 69 69
Lines 8869 8903 +34
==========================================
+ Hits 6636 6672 +36
+ Misses 2233 2231 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Please add:
I'm drafting this in the meantime... |
Contributor
|
Would this fully close your #885? |
oczoske
reviewed
Mar 11, 2026
oczoske
reviewed
Mar 11, 2026
Simplify PixelResponseNonUniformity based on PR review - Replace SeedSequence-based per-detector seeding with direct random_seed - Rename seed parameter from random_seed to prnu_seed - Remove default prnu_std (now must be defined in instrument package) - Add 5 unit tests covering multiplicative behaviour, fixed pattern, dict mode - Update all METIS detector YAMLs to use prnu_seed (in IRDB)
PixelResponseNonUniformity effect for fixed per-pixel gain variation (PRNU)
Collaborator
|
Ideas for further tests (to improve patch coverage):
|
oczoske
reviewed
Mar 12, 2026
scopesim/effects/electronic/noise.py
Outdated
| elif isinstance(prnu_std_meta, (int, float)): | ||
| prnu_std = float(prnu_std_meta) | ||
| else: | ||
| raise ValueError( |
…ut and enhance test coverage for error handling and plotting
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.
Summary
PixelResponseNonUniformityeffect in effects/electronics/noise.py that models per-pixel gainvariation (PRNU) by multiplying each pixel by a (per pixel) gain factor drawn from N(1, prnu_std)
is a fixed physical property of the detector chip
prnu_stdaccepts a scalar float or a dict keyed by detector ID, for later implementation of different values per detector type (e.g. H2RG & GeoSnap) in the instrument packagesprnu_std=0.01(1%)