-
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-513 Update uneven ramp fitting documentation #944
RCAL-513 Update uneven ramp fitting documentation #944
Conversation
@schlafly Still work-in-progress. However, I wanted to get a review of the description section. I have added the information that is in the paper and should correspond to the However, there is a bit more math, going from the segments to the resultants, that occurs in There are still technical issues, such as filling out the parameters for the step, etc. that need to be completed, but wanted you to get an early look at this. |
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know!. |
This looks good to me. Re combining segment ramps into a single ramp for each pixel, the goal was to do an inverse-variance weighted average using the read noise variances for each segment. That's not part of the Casertano+22 paper, as you say, and isn't documented anywhere. Generically the right thing to do when combining a bunch of measurements to get a mean is to do an inverse variance weighted average with the total variances. However, the Poisson variance is proportional to the derived slope, so if you use that to do the weighting you systematically downweight ramps where the flux is high, leading to a negative bias. It would likely be better to do something like derive an initial flux from a straight average or median of the segments, use it to compute new total variances for each segment, and then use those total variances to do the inverse variance weighted mean. But that could be future work; I just did the inverse variance weighted mean using the read noise variances. |
f8bd879
to
50eddf1
Compare
Rest of the formulae have been documented. This will definitely need re-review. Also updated the parameter documentation. |
Regression test though it appears something is up with them, and this is documentation only anyways. |
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 looks good. I left a few minor comments. The most important one is to check the denominator of the variances; I think some parentheses are misplaced. Thanks!
3bb0a07
to
8634fcc
Compare
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.
Sorry, a few more minor nits, but looks good!
----------------------------- | ||
|
||
The segment fitting implementation is based on Section 5 of Casertano et. | ||
al. 2022. If there is only one segment, no fitting is performed. |
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 think of a 'segment' as a block of consecutive resultants with no jumps in between. One segment is fine; e.g., this is the case for a ramp with no cosmic rays. A segment with one resultant isn't fine and gets skipped.
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.
Nope, I got the terminology wrong. Trying again...
terminated where saturation flags are found. Pixels are processed simultaneously | ||
in blocks. The size of the block depends on the image size and the number of | ||
resultants. |
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.
terminated where saturation flags are found. Pixels are processed simultaneously | |
in blocks. The size of the block depends on the image size and the number of | |
resultants. | |
terminated where saturation flags are found. |
We just process pixels one by one.
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, thanks!
Changes - update index to include ramp fitting - reorder index to be alphabetical
Changes: - move OLS to its own file - update links - prepare main description for ols_cas22
Changes: - Remove content particular to the OLS algorithm - Update weighting for ols_cass22
18af07e
to
3a99737
Compare
Resolves RCAL-513
Closes #
This PR addresses ...
Checklist
CHANGES.rst
under the corresponding subsectionupdated relevant tests