As a result of DM-5323, which implements RFC-155, background estimation in Python is now done using different routines in meas_algorithms:
- There is a new task
SubtractBackgroundTask, with full documentation and a working example. - The existing function
getBackground(which fit a background) is replaced bySubtractBackgroundTask.fitBackground. Changes fromgetBackgroundare:-
getBackgroundcould returnNoneif the fit failed; in that situationfitBackroundwill raiseRuntimeErrorinstead of returningNone - The argument
imagewas renamed tomaskedImage, for clarity - The config is not passed as an argument
- The debug display code uses different keys and is updated to use
afw.display
-
- The existing function
estimateBackground(which subtract a background from an exposure) is replaced bySubtractBackgroundTask.run. Changes fromestimateBackgroundare:- You may pass in a background model (an lsst.afw.math.BackgroundList)
- It returns a struct containing the updated background model
- The config is not passed as an argument
- The debug display code displays the unsubtracted image and uses different keys and is updated to use
afw.display
- The task’s config
SubtractBackgroundConfigreplaces the old oldBackgroundConfig, with one small change:- The field
algorithmmay no longer beNone; you must use the string"NONE", instead
- The field