@@ -106,12 +106,20 @@ def testComputeExposureSummary(self):
106
106
107
107
# Compute the background image
108
108
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
112
118
backobj = afwMath .makeBackground (exposure .getMaskedImage ().getImage (), bctrl )
113
119
background = afwMath .BackgroundList ()
114
- background .append (backobj )
120
+ background .append (
121
+ (backobj , interpStyle , undersampleStyle , approxStyle , approxOrderX , approxOrderY , approxWeighting )
122
+ )
115
123
116
124
# Configure and run the task
117
125
expSummaryTask = ComputeExposureSummaryStatsTask ()
@@ -156,6 +164,7 @@ def testComputeExposureSummary(self):
156
164
self .assertFloatsAlmostEqual (summary .skyBg , skyMean , rtol = 1e-3 )
157
165
self .assertFloatsAlmostEqual (summary .meanVar , skySigma ** 2. )
158
166
167
+ self .assertFloatsAlmostEqual (summary .skyLumpiness , 0.47303 , atol = 1e-5 )
159
168
self .assertFloatsAlmostEqual (summary .zenithDistance , 30.57112 , atol = 1e-5 )
160
169
161
170
# Effective exposure time and depth
0 commit comments