Skip to content

Shs/prnu ( #885) #886

Draft
ShannonS00 wants to merge 2 commits intoAstarVienna:mainfrom
ShannonS00:shs/prnu
Draft

Shs/prnu ( #885) #886
ShannonS00 wants to merge 2 commits intoAstarVienna:mainfrom
ShannonS00:shs/prnu

Conversation

@ShannonS00
Copy link

Summary

  • Adds a new PixelResponseNonUniformity effect in effects/electronics/noise.py that models per-pixel gain
    variation (PRNU) by multiplying each pixel by a (per pixel) gain factor drawn from N(1, prnu_std)
  • The gain map is generated once per detector and cached, reflecting that PRNU
    is a fixed physical property of the detector chip
  • prnu_std accepts 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 packages
  • Defaults set to prnu_std=0.01 (1%)

…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).
@ShannonS00 ShannonS00 requested a review from oczoske March 10, 2026 17:02
@ShannonS00 ShannonS00 self-assigned this Mar 10, 2026
@ShannonS00 ShannonS00 added the effects Related to a ScopeSim effect label Mar 10, 2026
@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 17.64706% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.60%. Comparing base (02976b3) to head (acf6dae).

Files with missing lines Patch % Lines
scopesim/effects/electronic/noise.py 17.64% 28 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #886      +/-   ##
==========================================
- Coverage   74.82%   74.60%   -0.22%     
==========================================
  Files          69       69              
  Lines        8869     8903      +34     
==========================================
+ Hits         6636     6642       +6     
- Misses       2233     2261      +28     

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

@teutoburg teutoburg moved this to 🏗 In progress in ScopeSim-development Mar 10, 2026
@teutoburg
Copy link
Contributor

Please add:

  • A more meaningful title (PR titles are part of the documentation as they become changelog entries)
  • Some unit tests to to verify that this is doing what it should (or indeed runs at all)

I'm drafting this in the meantime...

@teutoburg teutoburg marked this pull request as draft March 10, 2026 18:13
@teutoburg teutoburg added the enhancement PR adding or improving a feature (use "Feature" type for issues (requests), not this label) label Mar 10, 2026
@teutoburg
Copy link
Contributor

Would this fully close your #885?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effects Related to a ScopeSim effect enhancement PR adding or improving a feature (use "Feature" type for issues (requests), not this label)

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

2 participants