Skip to content

Commit

Permalink
Merge pull request #75 from lsst-ts/rerun_black_on_ts_wep
Browse files Browse the repository at this point in the history
Rerun black on ts wep
  • Loading branch information
jbkalmbach authored Mar 12, 2021
2 parents b95a7d2 + a3cf327 commit 437cacb
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 22 deletions.
8 changes: 8 additions & 0 deletions doc/versionHistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

-------------
Expand Down
7 changes: 1 addition & 6 deletions python/lsst/ts/wep/CreatePhosimDonutTemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:]
Expand Down
1 change: 0 additions & 1 deletion python/lsst/ts/wep/DonutDetector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/cwfs/test_donutTemplatePhosim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions tests/cwfs/test_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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):

Expand Down
12 changes: 2 additions & 10 deletions tests/test_createPhosimDonutTemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_wepControllerMonolithicEimg.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
FilterType,
CamType,
BscDbType,
getConfigDir
getConfigDir,
)


Expand Down

0 comments on commit 437cacb

Please sign in to comment.