Skip to content

Commit

Permalink
Cleanup flake8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj committed Nov 19, 2023
1 parent ee2385a commit 09e0e3f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/test_matchPessimisticB.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@
import lsst.afw.table as afwTable
import lsst.utils.tests
from lsst.meas.algorithms import convertReferenceCatalog
import lsst.meas.astrom.sip.genDistortedImage as distort
from lsst.meas.astrom.sip import genDistortedImage
import lsst.meas.astrom as measAstrom


class TestMatchPessimisticB(unittest.TestCase):

def setUp(self):

np.random.seed(12345)

self.config = measAstrom.MatchPessimisticBTask.ConfigClass()
Expand Down Expand Up @@ -69,13 +68,13 @@ def tearDown(self):
del self.distortedWcs

def testLinearXDistort(self):
self.singleTestInstance(self.filename, distort.linearXDistort)
self.singleTestInstance(self.filename, genDistortedImage.linearXDistort)

def testLinearYDistort(self):
self.singleTestInstance(self.filename, distort.linearYDistort)
self.singleTestInstance(self.filename, genDistortedImage.linearYDistort)

def testQuadraticDistort(self):
self.singleTestInstance(self.filename, distort.quadraticDistort)
self.singleTestInstance(self.filename, genDistortedImage.quadraticDistort)

def testLargeDistortion(self):
# This transform is about as extreme as I can get:
Expand Down Expand Up @@ -105,7 +104,7 @@ def singleTestInstance(self, filename, distortFunc, doPlot=False):
tempSolver = measAstrom.AstrometryTask(config=tempConfig, refObjLoader=None)
sourceSelection = tempSolver.sourceSelector.run(sourceCat)

distortedCat = distort.distortList(sourceSelection.sourceCat, distortFunc)
distortedCat = genDistortedImage.distortList(sourceSelection.sourceCat, distortFunc)

if doPlot:
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -176,7 +175,8 @@ def testPassingMatcherState(self):
tempSolver = measAstrom.AstrometryTask(config=tempConfig, refObjLoader=None)
sourceSelection = tempSolver.sourceSelector.run(sourceCat)

distortedCat = distort.distortList(sourceSelection.sourceCat, distort.linearXDistort)
distortedCat = genDistortedImage.distortList(sourceSelection.sourceCat,
genDistortedImage.linearXDistort)

sourceCat = distortedCat

Expand Down Expand Up @@ -228,7 +228,8 @@ def testReferenceFilter(self):
tempSolver = measAstrom.AstrometryTask(config=tempConfig, refObjLoader=None)
sourceSelection = tempSolver.sourceSelector.run(sourceCat)

distortedCat = distort.distortList(sourceSelection.sourceCat, distort.linearXDistort)
distortedCat = genDistortedImage.distortList(sourceSelection.sourceCat,
genDistortedImage.linearXDistort)

matchPessConfig = measAstrom.MatchPessimisticBTask.ConfigClass()
matchPessConfig.maxRefObjects = 150
Expand Down

0 comments on commit 09e0e3f

Please sign in to comment.