diff --git a/doc/versionHistory.rst b/doc/versionHistory.rst index b7c3560c..f676183d 100644 --- a/doc/versionHistory.rst +++ b/doc/versionHistory.rst @@ -6,6 +6,14 @@ Version History ################## +.. _lsst.ts.wep-1.5.6: + +------------- +1.5.6 +------------- + +* Reformat code with `black`. + .. _lsst.ts.wep-1.5.5: ------------- diff --git a/python/lsst/ts/wep/CreatePhosimDonutTemplates.py b/python/lsst/ts/wep/CreatePhosimDonutTemplates.py index 762c153f..0d06ca71 100644 --- a/python/lsst/ts/wep/CreatePhosimDonutTemplates.py +++ b/python/lsst/ts/wep/CreatePhosimDonutTemplates.py @@ -233,12 +233,7 @@ def cutOutIntraExtraTemplates(self, templateWidth, intraVisitId, extraVisitId): Visit Id of the extrafocal images from Phosim. """ - postIsrDir = os.path.join( - self.repoDir, - "rerun", - "run1", - "postISRCCD", - ) + postIsrDir = os.path.join(self.repoDir, "rerun", "run1", "postISRCCD",) expIds = os.listdir(postIsrDir) intraSuffix = str(intraVisitId)[-5:] diff --git a/python/lsst/ts/wep/DonutDetector.py b/python/lsst/ts/wep/DonutDetector.py index 4eb27424..ed562571 100644 --- a/python/lsst/ts/wep/DonutDetector.py +++ b/python/lsst/ts/wep/DonutDetector.py @@ -23,7 +23,6 @@ import pandas as pd from copy import copy - from lsst.ts.wep.Utility import CentroidFindType from lsst.ts.wep.cwfs.CentroidFindFactory import CentroidFindFactory from scipy.spatial.distance import cdist diff --git a/tests/cwfs/test_donutTemplatePhosim.py b/tests/cwfs/test_donutTemplatePhosim.py index 4eefb058..92fc45ed 100644 --- a/tests/cwfs/test_donutTemplatePhosim.py +++ b/tests/cwfs/test_donutTemplatePhosim.py @@ -57,11 +57,11 @@ def setUp(self): # raft so it will not overwrite existing templates in the folder. shutil.copyfile( os.path.join(testDataPath, extraTemplateName), - os.path.join(self.defaultTemplatePath, "extra_template-R99_S99.txt") + os.path.join(self.defaultTemplatePath, "extra_template-R99_S99.txt"), ) shutil.copyfile( os.path.join(testDataPath, intraTemplateName), - os.path.join(self.defaultTemplatePath, "intra_template-R99_S99.txt") + os.path.join(self.defaultTemplatePath, "intra_template-R99_S99.txt"), ) def tearDown(self): diff --git a/tests/cwfs/test_tool.py b/tests/cwfs/test_tool.py index 0b9577b5..eb10292c 100644 --- a/tests/cwfs/test_tool.py +++ b/tests/cwfs/test_tool.py @@ -227,7 +227,7 @@ def testZernikeMaskFit(self): # mask data cut = -0.9 - r = np.sqrt(self.xx**2 + self.yy**2) + r = np.sqrt(self.xx ** 2 + self.yy ** 2) idx = (r > 1) | (r < e) | (self.xx < cut) xx = self.xx[:].copy() @@ -238,7 +238,7 @@ def testZernikeMaskFit(self): zr = ZernikeMaskedFit(surface, xx, yy, nc, mask, e) - self.assertLess(np.sum(np.abs(zr - self.zerCoef[0:nc])**2), 1e-10) + self.assertLess(np.sum(np.abs(zr - self.zerCoef[0:nc]) ** 2), 1e-10) def testPadArray(self): diff --git a/tests/test_createPhosimDonutTemplates.py b/tests/test_createPhosimDonutTemplates.py index 757af16f..de856d12 100644 --- a/tests/test_createPhosimDonutTemplates.py +++ b/tests/test_createPhosimDonutTemplates.py @@ -156,12 +156,7 @@ def testRunISR(self): # Run the ISR self.createPhosimDonuts.runISR() isrPath = os.path.join( - "input", - "rerun", - "run1", - "postISRCCD", - "4021123106001-g", - "R22", + "input", "rerun", "run1", "postISRCCD", "4021123106001-g", "R22", ) self.assertTrue( os.path.exists( @@ -183,10 +178,7 @@ def testCutOutTemplatesAndSave(self): self._copyPhosimFiles() self.createPhosimDonuts.cutOutTemplatesAndSave( - testPhosimPath, - 240, - DefocalType.Extra, - 9006001, + testPhosimPath, 240, DefocalType.Extra, 9006001, ) newTemplate = np.genfromtxt( diff --git a/tests/test_wepControllerMonolithicEimg.py b/tests/test_wepControllerMonolithicEimg.py index 413c75be..75482377 100644 --- a/tests/test_wepControllerMonolithicEimg.py +++ b/tests/test_wepControllerMonolithicEimg.py @@ -38,7 +38,7 @@ FilterType, CamType, BscDbType, - getConfigDir + getConfigDir, )