Skip to content

Commit

Permalink
Rearranged the terms for comparison in testFlags
Browse files Browse the repository at this point in the history
  • Loading branch information
arunkannawadi committed Aug 23, 2023
1 parent 9d5ba46 commit 8c15dde
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_gaap.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,9 @@ def testFlags(self, sigmas=[0.4, 0.5, 0.7], scalingFactors=[1.15, 1.25, 1.4, 100
for scalingFactor, sigma in itertools.product(gaapConfig.scalingFactors, gaapConfig.sigmas):
targetSigma = scalingFactor*seeing
baseName = gaapConfig._getGaapResultName(scalingFactor, sigma, algName)
# Give some leeway for the edge case.
if targetSigma - sigma/pixelScale >= -1e-10:
# Give some leeway for the edge case and compare against a small
# negative number instead of zero.
if targetSigma*pixelScale - sigma >= -2e-7:
self.assertTrue(record[baseName+"_flag_bigPsf"],
msg=f"bigPsf flag not set for {scalingFactor=} and {sigma=}",
)
Expand Down

0 comments on commit 8c15dde

Please sign in to comment.