Skip to content

Commit

Permalink
Fix flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fred3m committed May 26, 2022
1 parent fb40a34 commit 8f7944a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions python/lsst/meas/base/forcedPhotCoadd.py
Expand Up @@ -93,10 +93,10 @@ class ForcedPhotCoaddConnections(pipeBase.PipelineTaskConnections,
dimensions=["band", "skymap", "tract", "patch"],
)

def __init__(self, *, config=None):
super().__init__(config=config)
if config.footprintDatasetName != "scarletDeblendModels":
self.inputs -= set(("scarletModels",))
def __init__(self, *, config=None):
super().__init__(config=config)
if config.footprintDatasetName != "scarletDeblendModels":
self.inputs -= set(("scarletModels",))


class ForcedPhotCoaddConfig(pipeBase.PipelineTaskConfig,
Expand Down Expand Up @@ -287,8 +287,8 @@ def generateMeasCat(self, exposureDataId, exposure, refCat, refCatInBand, refWcs
fpRecord = refCatInBand.find(srcRecord.getId())
if fpRecord is None:
raise LookupError("Cannot find Footprint for source {}; please check that {} "
"IDs are compatible with reference source IDs"
.format(srcRecord.getId(), self.config.connections.refCatInBand))
"IDs are compatible with reference source IDs"
.format(srcRecord.getId(), self.config.connections.refCatInBand))
srcRecord.setFootprint(fpRecord.getFootprint())
return measCat, exposureIdInfo.expId

Expand Down Expand Up @@ -439,18 +439,18 @@ def attachFootprints(self, sources, refCat, exposure, refWcs, dataRef):
if self.config.footprintDatasetName == "scarletDeblendModels":
# Load the scarlet models
dataModel = dataRef.get("%sCoadd_%s" % (self.config.coaddName, self.config.footprintDatasetName),
immediate=True)
self._attachScarletFootprints(catalog, dataModel, exposure, dataRef.dataId["band"])
immediate=True)
self._attachScarletFootprints(refCat, dataModel, exposure, dataRef.dataId["band"])
else:
fpCat = dataRef.get("%sCoadd_%s" % (self.config.coaddName, self.config.footprintDatasetName),
immediate=True)
for refRecord, srcRecord in zip(refCat, sources):
fpRecord = fpCat.find(refRecord.getId())
if fpRecord is None:
raise LookupError("Cannot find Footprint for source %s; please check that %sCoadd_%s "
"IDs are compatible with reference source IDs" %
(srcRecord.getId(), self.config.coaddName,
self.config.footprintDatasetName))
"IDs are compatible with reference source IDs" %
(srcRecord.getId(), self.config.coaddName,
self.config.footprintDatasetName))
srcRecord.setFootprint(fpRecord.getFootprint())

def _attachScarletFootprints(self, catalog, dataModel, exposure, band):
Expand Down

0 comments on commit 8f7944a

Please sign in to comment.