Skip to content

Commit

Permalink
Remove if False block
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj committed Mar 25, 2019
1 parent 9bc030a commit 16bb985
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions python/lsst/meas/algorithms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,26 +587,18 @@ def plotPsfSpatialModel(exposure, psf, psfCellSet, showBadCandidates=True, numSa

ax = next(subplots)

if False:
ax.scatter(xGood, yGood, c=dfGood, marker='o')
ax.scatter(xBad, yBad, c=dfBad, marker='x')
ax.set_xbound(lower=0, upper=exposure.getWidth())
ax.set_ybound(lower=0, upper=exposure.getHeight())
ax.set_title('Spatial residuals')
plt.colorbar(im, orientation='horizontal')
else:
photoCalib = exposure.getPhotoCalib()
# If there is no calibration factor, use 1.0.
if photoCalib.getCalibrationMean() <= 0:
photoCalib = afwImage.PhotoCalib(1.0)

ampMag = [photoCalib.isntFluxToMagnitude(candAmp) for candAmp in candAmps]
ax.plot(ampMag, zGood[:, k], 'b+')
if numBad > 0:
badAmpMag = [photoCalib.isntFluxToMagnitude(badAmp) for badAmp in badAmps]
ax.plot(badAmpMag, zBad[:, k], 'r+')

ax.set_title('Flux variation')
photoCalib = exposure.getPhotoCalib()
# If there is no calibration factor, use 1.0.
if photoCalib.getCalibrationMean() <= 0:
photoCalib = afwImage.PhotoCalib(1.0)

ampMag = [photoCalib.isntFluxToMagnitude(candAmp) for candAmp in candAmps]
ax.plot(ampMag, zGood[:, k], 'b+')
if numBad > 0:
badAmpMag = [photoCalib.isntFluxToMagnitude(badAmp) for badAmp in badAmps]
ax.plot(badAmpMag, zBad[:, k], 'r+')

ax.set_title('Flux variation')

fig.show()

Expand Down

0 comments on commit 16bb985

Please sign in to comment.