Details
-
Type:
Story
-
Status: Invalid
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Team:Alert Production
Description
Historically, afwMath.BackgroundControl's constructor accepted the parameter style, to set the the interpolation style, and undersampleStyle, to set the behaviour when there are two few grid points for interpolation.
This, to interpolate with an Akima spline, and to reduce the interpolation order when there aren't enough grid points, you'd do something like:
bctrl = BackgroundControl("AKIMA_SPLINE", ..., undersampleStyle="REDUCE_INTERP_ORDER")
|
background = makeBackground(image, bctrl)
|
background.getImageF()
|
On DM-17566, the style argument (but not the undersampleStyle argument) was deprecated, and, instead, the user is encouraged to instead call:
background.getImageF(style, undersampleStyle="THROW_EXCEPTION")
|
The confusion arises when the user does something like this:
bctrl = BackgroundControl(undersampleStyle="REDUCE_INTERP_ORDER", ...)
|
background = makeBackground(image, bctrl)
|
background.getImageF("AKIMA_SPLINE")
|
I contend that the reasonable user would be expecting this to use a REDUCE_INTERP_ORDER undersample style, as set in the BackgroundControl, but instead the getImageF default of THROW_EXCEPTION is used.
This seems wrong to me.
Krzysztof Findeisen — I'm curious for your take on this. I think what you did on
DM-17566accurately captured what the earlier deprecation notices in the code said to do, so I'm definitely not complaining about that... but this seems like a nasty side effect. Did you run across it?