Skip to content

Commit

Permalink
flake8 compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeyers314 committed Feb 9, 2024
1 parent 7a9244f commit 9bc73c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions python/lsst/summit/utils/assessPeekExposure.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
SIGMA_TO_FWHM = 2.0 * np.sqrt(2.0 * np.log(2.0))
AUXTEL_PIXEL_SCALE = 0.1 # arcsec/pixel


# get one BestEffortIsr,afwDisplay per subprocess
def initializePoolProcess():
"""Initialize the multiprocessing pool process.
Expand Down
22 changes: 11 additions & 11 deletions python/lsst/summit/utils/peekExposure.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _estimateMode(data, frac=0.5):
interval = int(np.ceil(frac * len(data)))
spans = data[interval:] - data[:-interval]
start = np.argmin(spans)
return np.median(data[start : start + interval])
return np.median(data[start:start + interval])


def _bearingToUnitVector(wcs, bearing, imagePoint, skyPoint=None):
Expand Down Expand Up @@ -198,7 +198,7 @@ def resized(self, width, height):
def _doComputeKernelImage(self, position=None, color=None):
bbox = self.computeBBox(self.getAveragePosition())
img = ImageD(bbox, 0.0)
x, y = np.ogrid[bbox.minY : bbox.maxY + 1, bbox.minX : bbox.maxX + 1]
x, y = np.ogrid[bbox.minY:bbox.maxY + 1, bbox.minX:bbox.maxX + 1]
rsqr = x**2 + y**2
w = (rsqr < self.outerRad**2) & (rsqr > self.innerRad**2)
img.array[w] = 1.0
Expand All @@ -219,9 +219,9 @@ def _doComputeApertureFlux(self, radius, position=None, color=None):
def __eq__(self, rhs):
if isinstance(rhs, DonutPsf):
return (
self.size == rhs.size
and self.outerRad == rhs.outerRad
and self.innerRad == rhs.innerRad
self.size == rhs.size and
self.outerRad == rhs.outerRad and
self.innerRad == rhs.innerRad
)
return False

Expand Down Expand Up @@ -290,8 +290,8 @@ class PeekTask(pipeBase.Task):
- detects sources
- measures sources
Designed to be quick at the expense of primarily completeness, but also to a
lesser extent accuracy.
Designed to be quick at the expense of primarily completeness, but also to
a lesser extent accuracy.
"""

ConfigClass = PeekTaskConfig
Expand Down Expand Up @@ -598,7 +598,7 @@ def setDefaults(self):
self.peek.measurement.slots.apFlux = "base_CircularApertureFlux_70_0"
# Also allow a larger distance to peak for centroiding in case there's
# a relatively large saturated region.
self.peek.measurement.plugins['base_SdssCentroid'].maxDistToPeak=15.0
self.peek.measurement.plugins['base_SdssCentroid'].maxDistToPeak = 15.0


class PeekSpecTask(pipeBase.Task):
Expand Down Expand Up @@ -707,9 +707,9 @@ class PeekExposureTaskConfig(pexConfig.Config):


class PeekExposureTask(pipeBase.Task):
""" Peek at exposure to quickly detect and measure both the brightest source
in the image, and a set of sources representative of the exposure's overall
image quality.
""" Peek at exposure to quickly detect and measure both the brightest
source in the image, and a set of sources representative of the
exposure's overall image quality.
Parameters
----------
Expand Down

0 comments on commit 9bc73c8

Please sign in to comment.