@@ -101,12 +101,51 @@ def testComputeExposureSummary(self):
101101 background .append (backobj )
102102
103103 # Configure and run the task
104+ expSummaryTaskNoUpdates = ComputeExposureSummaryStatsTask ()
104105 expSummaryTask = ComputeExposureSummaryStatsTask ()
105106 # Configure nominal values for effective time calculation
106107 expSummaryTask .config .fiducialZeroPoint = {band : float (zp )}
107108 expSummaryTask .config .fiducialPsfSigma = {band : float (psfSize )}
108109 expSummaryTask .config .fiducialSkyBackground = {band : float (skyMean )}
109- # Run the task
110+
111+ # Run the task with optianal updates turned off
112+ expSummaryTaskNoUpdates .config .doUpdatePsfModelStats = False
113+ expSummaryTaskNoUpdates .config .doUpdateApCorrModelStats = False
114+ expSummaryTaskNoUpdates .config .doUpdateMaxDistToNearestPsfStats = False
115+ expSummaryTaskNoUpdates .config .doUpdateWcsStats = False
116+ expSummaryTaskNoUpdates .config .doUpdatePhotoCalibStats = False
117+ expSummaryTaskNoUpdates .config .doUpdateBackgroundStats = False
118+ expSummaryTaskNoUpdates .config .doUpdateMaskedImageStats = False
119+ expSummaryTaskNoUpdates .config .doUpdateEffectiveTimeStats = False
120+
121+ summary = expSummaryTaskNoUpdates .run (exposure , None , background )
122+ # Test the outputs
123+ nan = float ("nan" )
124+ self .assertTrue (summary .ra , nan )
125+ self .assertTrue (summary .dec , nan )
126+
127+ # The following PSF metrics are always updated
128+ self .assertFloatsAlmostEqual (summary .psfSigma , psfSize )
129+ self .assertFloatsAlmostEqual (summary .psfIxx , psfSize ** 2. )
130+ self .assertFloatsAlmostEqual (summary .psfIyy , psfSize ** 2. )
131+ self .assertFloatsAlmostEqual (summary .psfIxy , 0.0 )
132+ self .assertFloatsAlmostEqual (summary .psfArea , 23.088975164455444 )
133+
134+ # The following should not have been updated (i.e. set to nan)
135+ self .assertTrue (summary .psfTraceRadiusDelta , nan )
136+ self .assertTrue (summary .psfApFluxDelta , nan )
137+ self .assertTrue (summary .psfApCorrSigmaScaledDelta , nan )
138+ self .assertTrue (summary .maxDistToNearestPsf , nan )
139+ self .assertTrue (summary .pixelScale , nan )
140+
141+ self .assertTrue (summary .zenithDistance , nan )
142+ self .assertTrue (summary .skyBg , nan )
143+ self .assertTrue (summary .skyNoise , nan )
144+ self .assertTrue (summary .meanVar , nan )
145+ self .assertTrue (summary .zeroPoint , nan )
146+ self .assertTrue (summary .expTime , nan )
147+
148+ # Run the task with updates
110149 summary = expSummaryTask .run (exposure , None , background )
111150
112151 # Test the outputs
0 commit comments