I've been reworking the `ip_isr` package to include the functionality that existed in `obs_subaru`, with the goal of reducing duplicate code. Side benefits of this rework are that the ISR processing is clearer, more uniform across cameras, and easier to debug. There are some API changes associated with this which I wanted to make clear before the ticket for this issue is reviewed and merged, to collect comments and concerns. A quick summary of API changes:
- `obs_subaru` and `obs_decam` no longer have separate ISR tasks. The functionality has been folded into the standard `IsrTask`.
- New subtasks exist to handle straylight, vignette construction, and camera-specific masking.
- The methods `brighterFatterCorrection`, `gainContext`, `addDistortionModel` and `attachTransmissionCurve` are migrated from isrTask.py to isrFunctions.py, with the remainder of the ISR operations. Methods left in IsrTask handle configuration options and iteration instead of pixel operations.
- Many more configuration options in `IsrTaskConfig`.
I used the `obs_subaru` package to define the sequence of ISR operations, which differed slightly from that in `ip_isr`. The main changes are:
- Crosstalk correction. `ip_isr` placed this directly after overscan correction; `obs_subaru` waited until after bias subtraction and linearization.
- Linearization. `ip_isr` performed this before generating the variance map; `obs_subaru` waited until after the variance map was constructed.
The tests I've done show zero pixel difference for HSC, small deviations for `obs_lsstCam` cameras around saturated objects, and a slight variance offset for DECam due to the rearrangement of the processing order.