The integral non-linearity code doesn't handle images with only a single resultant. We should try to handle that case.
The code wants to make an initial slope estimate so that it can figure out how to correct for the INL in each read of a resultant, since the INL varies quite quickly with count level. That initial slope estimate requires that more than one resultant exist. My nominal plan would be to handle that single result case by assuming zero slope around here:
https://github.com/spacetelescope/stcal/blob/main/src/stcal/linearity/linearity.py#L446-L454
Alternatively we could do something like disabling the INL correction for single resultants entirely, bailing out around
https://github.com/spacetelescope/stcal/blob/main/src/stcal/linearity/linearity.py#L564-L567
@t-brandt , do you have an opinion here?
The integral non-linearity code doesn't handle images with only a single resultant. We should try to handle that case.
The code wants to make an initial slope estimate so that it can figure out how to correct for the INL in each read of a resultant, since the INL varies quite quickly with count level. That initial slope estimate requires that more than one resultant exist. My nominal plan would be to handle that single result case by assuming zero slope around here:
https://github.com/spacetelescope/stcal/blob/main/src/stcal/linearity/linearity.py#L446-L454
Alternatively we could do something like disabling the INL correction for single resultants entirely, bailing out around
https://github.com/spacetelescope/stcal/blob/main/src/stcal/linearity/linearity.py#L564-L567
@t-brandt , do you have an opinion here?