Project: datamanagement
Issue DM-2920: Clean up code in afw for Approximate background estimation
The intention is to eventually set {{useApprox=True}} (i.e. Chebychev Approximation) as the default for background estimation. However, in looking into the relevant code in afw/math while working on DM-2778, there is some clean-up and restructuring that needs to be done before resetting the defaults (which may also require adjusting some defaults in the calibrate stage to be more appropriate for the approximation, as opposed to inperpolation, scheme). This issue is to clean up the code and make sure it all operates coherently. A seperate ticket will be to actually reset the defaults and make any other config default changes required. In particular, the config setting of approxOrderX/binSize are not being assessed properly, nor is the behavior of the given undersampleStyle being executed. The under-sampling checks are currently only being done against the interpoation settings, which is not appropriate when useApprox=True. A temporary check was added in {{meas.algoritms.detection.getBackground()}} in DM-2778 so that it is currently "safe" to run with useApprox=True and any other user overridden config setting (binSize, approxOrder, undersampleStyle) (and there currently exists similar checks in {{pipe.tasks.matchBackground}}), but these should be removed once this issue has been implemented.
Story points: 3