@@ -106,12 +106,20 @@ def testComputeExposureSummary(self):
106106
107107 # Compute the background image
108108 bgGridSize = 10
109- bctrl = afwMath .BackgroundControl (afwMath .Interpolate .NATURAL_SPLINE )
110- bctrl .setNxSample (int (exposure .getMaskedImage ().getWidth ()/ bgGridSize ) + 1 )
111- bctrl .setNySample (int (exposure .getMaskedImage ().getHeight ()/ bgGridSize ) + 1 )
109+ nx = int (exposure .getMaskedImage ().getWidth ()/ bgGridSize ) + 1
110+ ny = int (exposure .getMaskedImage ().getHeight ()/ bgGridSize ) + 1
111+ bctrl = afwMath .BackgroundControl (nx , ny )
112+ interpStyle = afwMath .Interpolate .AKIMA_SPLINE
113+ undersampleStyle = afwMath .REDUCE_INTERP_ORDER
114+ approxStyle = afwMath .ApproximateControl .UNKNOWN
115+ approxOrderX = 0
116+ approxOrderY = 0
117+ approxWeighting = False
112118 backobj = afwMath .makeBackground (exposure .getMaskedImage ().getImage (), bctrl )
113119 background = afwMath .BackgroundList ()
114- background .append (backobj )
120+ background .append (
121+ (backobj , interpStyle , undersampleStyle , approxStyle , approxOrderX , approxOrderY , approxWeighting )
122+ )
115123
116124 # Configure and run the task
117125 expSummaryTask = ComputeExposureSummaryStatsTask ()
@@ -156,6 +164,7 @@ def testComputeExposureSummary(self):
156164 self .assertFloatsAlmostEqual (summary .skyBg , skyMean , rtol = 1e-3 )
157165 self .assertFloatsAlmostEqual (summary .meanVar , skySigma ** 2. )
158166
167+ self .assertFloatsAlmostEqual (summary .skyLumpiness , 0.47303 , atol = 1e-5 )
159168 self .assertFloatsAlmostEqual (summary .zenithDistance , 30.57112 , atol = 1e-5 )
160169
161170 # Effective exposure time and depth
0 commit comments