Skip to content

Commit

Permalink
squash me
Browse files Browse the repository at this point in the history
  • Loading branch information
fred3m committed Jul 27, 2018
1 parent f99af5d commit c2eb9a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions python/lsst/meas/deblender/baseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ def __init__(self, footprint, mMaskedImage, psfs, psffwhms, log,
else:
avgNoise = [avgNoise]
# Now check that all of the parameters have the same number of entries
if any([len(self.filters) !=len (p) for p in [psfs, psffwhms, avgNoise]]):
if any([len(self.filters) != len(p) for p in [psfs, psffwhms, avgNoise]]):
raise ValueError("To use the multi-color deblender, "
"'maskedImage', 'psf', 'psffwhm', 'avgNoise'"
"must have the same length, but instead have lengths: "
"{0}".format([len(p) for p in [maskedImages,
"{0}".format([len(p) for p in [mMaskedImage,
psfs,
psffwhms,
avgNoise]]))
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/meas/deblender/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def buildMultibandTemplates(debResult, log, useWeights=False, usePsf=False,
fpMask = ~fpMask.getArray().astype(bool)
badPixels = mMaskedImage.mask.getPlaneBitMask(badMask)
mask = (mMaskedImage.mask.array & badPixels) | fpMask[None, :]
weights[mask>0] = 0
weights[mask > 0] = 0

# Extract the PSF from each band for PSF convolution
if usePsf:
Expand Down Expand Up @@ -301,7 +301,7 @@ def buildMultibandTemplates(debResult, log, useWeights=False, usePsf=False,
model = blend.get_model(k=pk).astype(np.float32)

# The peak in each band will have the same SpanSet
mask = afwImage.Mask(np.array(np.sum(model, axis=0)>0, dtype=np.int32), xy0=xy0)
mask = afwImage.Mask(np.array(np.sum(model, axis=0) > 0, dtype=np.int32), xy0=xy0)
ss = afwGeom.SpanSet.fromMask(mask)

if len(ss) == 0:
Expand Down

0 comments on commit c2eb9a6

Please sign in to comment.