Skip to content

Commit

Permalink
Run black.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbkalmbach committed Jun 23, 2023
1 parent 4421acf commit f0f3637
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
26 changes: 18 additions & 8 deletions python/lsst/ts/wep/cwfs/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,9 +816,7 @@ def _singleItr(self, I1, I2, model, tol=1e-3):
for compIm in [I1, I2]:
if np.sum(np.isnan(compIm.blendOffsetX)) > 0:
continue
compIm.makeMask(
self._inst, model, boundaryT, 1
)
compIm.makeMask(self._inst, model, boundaryT, 1)
dilatedMask, numPaddingIter = compIm.autoDilateBlendMask(
compIm.mask_pupil
)
Expand All @@ -830,15 +828,27 @@ def _singleItr(self, I1, I2, model, tol=1e-3):
)
# Mask only blended areas in final stamp
compIm.updateImage(
compIm.getImg() * np.invert(
np.array(shiftedMask, dtype=bool)
)
compIm.getImg() * np.invert(np.array(shiftedMask, dtype=bool))
)

# If the compensable image has no blended centroids
# this function will just create a single masked donut
I1.makeBlendedMask(self._inst, model, boundaryT, 1, compensated=True, blendPadding=self.mask_growth_iter)
I2.makeBlendedMask(self._inst, model, boundaryT, 1, compensated=True, blendPadding=self.mask_growth_iter)
I1.makeBlendedMask(
self._inst,
model,
boundaryT,
1,
compensated=True,
blendPadding=self.mask_growth_iter,
)
I2.makeBlendedMask(
self._inst,
model,
boundaryT,
1,
compensated=True,
blendPadding=self.mask_growth_iter,
)

self._makeMasterMask(I1, I2, self.getPoissonSolverName())

Expand Down
5 changes: 3 additions & 2 deletions python/lsst/ts/wep/cwfs/compensableImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1661,11 +1661,12 @@ def calcNumPeaks(imageArray, blendMask):
medianPixel = np.median(
maskedPixelVals[np.where(maskedPixelVals > maskedPixelHist[1][1])]
)
binEdges = np.linspace(0.5 * medianPixel, 1.5*medianPixel, num=11)
binEdges = np.linspace(0.5 * medianPixel, 1.5 * medianPixel, num=11)
binEdges[-1] = 2.5 * medianPixel
binEdges = np.append(binEdges, 3.0 * medianPixel)
maskedPixelHist = np.histogram(
maskedPixelVals, bins=binEdges, # range=(0.5 * medianPixel, 2.5 * medianPixel)
maskedPixelVals,
bins=binEdges, # range=(0.5 * medianPixel, 2.5 * medianPixel)
)
print(maskedPixelHist)
# Find the highest bins
Expand Down

0 comments on commit f0f3637

Please sign in to comment.