Skip to content

Commit

Permalink
Black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
abudlong committed Jan 25, 2025
1 parent a5c6602 commit 8bcca93
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions python/lsst/drp/tasks/dcr_assemble_coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ class DcrAssembleCoaddTask(CompareWarpAssembleCoaddTask):
For full details of the mathematics and algorithm, please see
DMTN-037: DCR-matched template generation (https://dmtn-037.lsst.io).
This Task produces a DCR-corrected goodSeeingCoadd, as well as a dcrCoadd for
each subfilter used in the iterative calculation.
This Task produces a DCR-corrected goodSeeingCoadd, as well as a dcrCoadd
for each subfilter used in the iterative calculation.
It begins by dividing the bandpass-defining filter into N equal bandwidth
"subfilters", and divides the flux in each pixel from an initial coadd
equally into each as a "dcrModel". Because the airmass and parallactic
Expand Down Expand Up @@ -499,16 +499,7 @@ def prepareDcrInputs(self, templateCoadd, warpRefList, weightList):
return dcrModels

@timeMethod
def run(
self,
skyInfo,
*,
warpRefList,
imageScalerList,
weightList,
supplementaryData=None,
**kwargs
):
def run(self, skyInfo, *, warpRefList, imageScalerList, weightList, supplementaryData=None, **kwargs):
r"""Assemble the coadd.
Requires additional inputs Struct ``supplementaryData`` to contain a
Expand Down Expand Up @@ -611,7 +602,7 @@ def run(
convergenceMetricInitial = self.calculateConvergence(
dcrModels, self.exposure, skyInfo.bbox, warpRefList, weightList, stats.ctrl
)
self.metadata['initialConvergence'] = convergenceMetricInitial
self.metadata["initialConvergence"] = convergenceMetricInitial

for subBBox in subBBoxIter(skyInfo.bbox, subregionSize):
modelIter = 0
Expand Down Expand Up @@ -728,12 +719,14 @@ def run(
convergenceMetricFinal = self.calculateConvergence(
dcrModels, subExposures, skyInfo.bbox, warpRefList, weightList, stats.ctrl
)
self.metadata['finalConvergence'] = convergenceMetricFinal
self.metadata["finalConvergence"] = convergenceMetricFinal

# Improvement between inital and final convergence metric for the
# whole patch and add to the metadata.
convergenceMetricImprovement = 100 * (convergenceMetricInitial - convergenceMetricFinal) / convergenceMetricInitial
self.metadata['improvedConvergence'] = convergenceMetricImprovement
convergenceMetricImprovement = (
100 * (convergenceMetricInitial - convergenceMetricFinal) / convergenceMetricInitial
)
self.metadata["improvedConvergence"] = convergenceMetricImprovement

dcrCoadds = self.fillCoadd(
dcrModels,
Expand Down

0 comments on commit 8bcca93

Please sign in to comment.