Skip to content

Commit

Permalink
Merge branch 'tickets/DM-42157'
Browse files Browse the repository at this point in the history
  • Loading branch information
taranu committed Mar 13, 2024
2 parents 0a519c7 + 92c1e99 commit 0406cd6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions python/lsst/pipe/tasks/fit_coadd_multiband.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import lsst.pipe.base as pipeBase
import lsst.pipe.base.connectionTypes as cT

import astropy
import astropy.table
from abc import ABC, abstractmethod
from pydantic import Field
from pydantic.dataclasses import dataclass
Expand Down Expand Up @@ -276,8 +276,7 @@ def __init__(self, initInputs, **kwargs):
super().__init__(initInputs=initInputs, **kwargs)
self.makeSubtask("fit_coadd_multiband")

def runQuantum(self, butlerQC, inputRefs, outputRefs):
inputs = butlerQC.get(inputRefs)
def build_catexps(self, butlerQC, inputRefs, inputs) -> list[CatalogExposureInputs]:
id_tp = self.config.idGenerator.apply(butlerQC.quantum.dataId).catalog_id
# This is a roundabout way of ensuring all inputs get sorted and matched
input_refs_objs = [(getattr(inputRefs, key), inputs[key])
Expand Down Expand Up @@ -305,6 +304,11 @@ def runQuantum(self, butlerQC, inputRefs, outputRefs):
dataId=dataId, id_tract_patch=id_tp,
)
catexps = [catexps[band] for band in self.config.get_band_sets()[0]]
return catexps

def runQuantum(self, butlerQC, inputRefs, outputRefs):
inputs = butlerQC.get(inputRefs)
catexps = self.build_catexps(butlerQC, inputRefs, inputs)
outputs = self.run(catexps=catexps, cat_ref=inputs['cat_ref'])
butlerQC.put(outputs, outputRefs)

Expand Down

0 comments on commit 0406cd6

Please sign in to comment.