Skip to content

Commit

Permalink
Variances should be divided by gain**2, rather than gain. (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
schlafly authored Apr 24, 2024
1 parent 43b1194 commit 5d17102
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions romanisim/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def make_l2(resultants, read_pattern, read_noise=None, gain=None, flat=None,
# special handling. And we use read_time without units a lot throughout
# the code base.
slopes = ramppar[..., 1] / gain * u.DN / u.s
readvar = rampvar[..., 0, 1, 1] / gain * (u.DN / u.s)**2
poissonvar = rampvar[..., 1, 1, 1] / gain * (u.DN / u.s)**2
readvar = rampvar[..., 0, 1, 1] / gain**2 * (u.DN / u.s)**2
poissonvar = rampvar[..., 1, 1, 1] / gain**2 * (u.DN / u.s)**2

if flat is not None:
flat = np.clip(flat, 1e-9, np.inf)
Expand Down

0 comments on commit 5d17102

Please sign in to comment.