You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a potential issue with using the 'saturation' flag to mark pixels with just one good group to suppress ramp fitting.
If you have a pixel that has DQ flags:
[0 4 4 4 4 4 4 2 2 2]
these will become
[2 4 4 4 4 4 4 2 2 2]
since there is only one usable group left. This triggers the do_all_sat function to be called since the 0th group is saturated,
(see line 835 of `ols_fit.py').
Assuming that the 0th group means that all subsequent groups are saturated is only true when the flag is applied for actual saturation (since that is what the saturation routine does). This isn't true when the flag is being used as a placeholder to suppress ramp fitting. If, for example, your DQ flags were:
[4 0 4 4 4 4 4 2 2 2]
Then the function to flag solitary good groups would set it to:
[4 2 4 4 4 4 4 2 2 2]
The do_all_sat function wouldn't be triggered since the 0th group isn't saturated, even though it's the same scenario as above. Additionally, the logging message 'all groups are saturated' here isn't exactly true.
This is only a single pixel example - in reality, it will be checking if every dq flag in the 0th group is saturated, which will typically mean they're truly all saturated, but the example I've isolated here made me wonder if this was really what should be happening here. The fit ramps returned in both cases are 0.0 as expected, but the other return values of ramp_fitting differ.
The text was updated successfully, but these errors were encountered:
I found a potential issue with using the 'saturation' flag to mark pixels with just one good group to suppress ramp fitting.
If you have a pixel that has DQ flags:
[0 4 4 4 4 4 4 2 2 2]
these will become
[2 4 4 4 4 4 4 2 2 2]
since there is only one usable group left. This triggers the
do_all_sat
function to be called since the 0th group is saturated,(see line 835 of `ols_fit.py').
Assuming that the 0th group means that all subsequent groups are saturated is only true when the flag is applied for actual saturation (since that is what the saturation routine does). This isn't true when the flag is being used as a placeholder to suppress ramp fitting. If, for example, your DQ flags were:
[4 0 4 4 4 4 4 2 2 2]
Then the function to flag solitary good groups would set it to:
[4 2 4 4 4 4 4 2 2 2]
The
do_all_sat
function wouldn't be triggered since the 0th group isn't saturated, even though it's the same scenario as above. Additionally, the logging message 'all groups are saturated' here isn't exactly true.This is only a single pixel example - in reality, it will be checking if every dq flag in the 0th group is saturated, which will typically mean they're truly all saturated, but the example I've isolated here made me wonder if this was really what should be happening here. The fit ramps returned in both cases are 0.0 as expected, but the other return values of
ramp_fitting
differ.The text was updated successfully, but these errors were encountered: