-
Notifications
You must be signed in to change notification settings - Fork 29
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
Implement new (via image) and maintain old (scalar) saturation image flagging #585
Conversation
be backwards compatible when the SATFILE FITS keyword is missing or contains a bad value in the PHDU of the RAW file.
full-well saturated data is done if the SATFILE keyword is missing or has a bad value.
pkg/wfc3/calwf3/lib/dodqi.c
Outdated
@@ -182,7 +190,16 @@ SingleGroup *x io: image to be calibrated; DQ array written to in-place | |||
if (wf3->dqicorr != PERFORM && wf3->dqicorr != DUMMY) | |||
return (status); | |||
|
|||
/* Issue a message so it is clear that saturation flagging is |
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.
Indent lines 193-199
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.
Argh - spaces vs tabs. Changed to tabs as the remainder of the file is set. Commit dbc7370.
@@ -194,6 +211,14 @@ SingleGroup *x io: image to be calibrated; DQ array written to in-place | |||
sum_dq = DQPix (x->dq.data, i, j) | ATODSAT; | |||
DQSetPix (x->dq.data, i, j, sum_dq); /* atod sat */ | |||
} | |||
|
|||
if (wf3->scalar_satflag == True) { |
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.
Are lines 215-221 to be executed after lines 210-213, or instead of?
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.
Lines 215-221 are executed after Lines 210-213.
Completed implementation to use an image to detect and flag full-well saturation versus a simple scalar. The new routine, dofwsat.c, is similar to what has been done for calacs. The WFC3 implementation is more complicated in that there are serial virtual overscan columns, as well as binned images, to accommodate. The detection/flagging occurs after blev and bias corrections while the output is still in counts. If the SATUFILE keyword is missing from the FITS header, or the keyword does not have a valid filename as a value, the code will revert to using the original method of flagging full-well saturation. The flagging will be done in doDQI and use a single value as the saturation threshold.