-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RCAL-776: Change image units. #1128
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1128 +/- ##
==========================================
- Coverage 76.72% 75.74% -0.99%
==========================================
Files 105 105
Lines 7054 7045 -9
==========================================
- Hits 5412 5336 -76
- Misses 1642 1709 +67
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should wait until the rad and roman_datamodels changes are in. We don't really want the pyproject to point to your local branches.
The code changes look fine.
Yeah, they are temporary just for tests to pass. I have updated the Changelog. |
out_model.err /= gain_model.data[4:-4, 4:-4].value | ||
out_model.var_poisson /= gain_model.data[4:-4, 4:-4].value ** 2 | ||
out_model.var_rnoise /= gain_model.data[4:-4, 4:-4].value ** 2 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case isn't the important one since we don't use this mode, but instead of adding this code, I think it would be better to delete lines 118-122 and 128-140.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was afraid to remove those in case it affected calculations being made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the earlier lines do the exact opposite of what you're doing here? We plan to get rid of the support for the old ramp fitting mode eventually anyway, but I don't see why we should multiply in the gain and then divide it back out without doing any work in the meantime? Do you see something I'm missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
image_model.err /= gain[4:-4, 4:-4] | ||
image_model.var_poisson /= gain[4:-4, 4:-4] ** 2 | ||
image_model.var_rnoise /= gain[4:-4, 4:-4] ** 2 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Staring at the schema, there is also var_flat, which we don't actually populate or do anything with. I guess that's a separate ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually fine and I was somehow missing the flat field uncertainty step computation later on. Disregard this, sorry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolves RCAL-776
Closes #1114 #1123
This PR changed image units in code and tests. Added gain reduction.
NOTE: no regression test link, because these changes require update to regression test files.
Checklist
CHANGES.rst
under the corresponding subsection