|
33 | 33 | import lsst.pipe.base as pipeBase
|
34 | 34 | import lsst.pipe.base.connectionTypes as cT
|
35 | 35 |
|
36 |
| -import astropy |
| 36 | +import astropy.table |
37 | 37 | from abc import ABC, abstractmethod
|
38 | 38 | from pydantic import Field
|
39 | 39 | from pydantic.dataclasses import dataclass
|
@@ -276,8 +276,7 @@ def __init__(self, initInputs, **kwargs):
|
276 | 276 | super().__init__(initInputs=initInputs, **kwargs)
|
277 | 277 | self.makeSubtask("fit_coadd_multiband")
|
278 | 278 |
|
279 |
| - def runQuantum(self, butlerQC, inputRefs, outputRefs): |
280 |
| - inputs = butlerQC.get(inputRefs) |
| 279 | + def build_catexps(self, butlerQC, inputRefs, inputs) -> list[CatalogExposureInputs]: |
281 | 280 | id_tp = self.config.idGenerator.apply(butlerQC.quantum.dataId).catalog_id
|
282 | 281 | # This is a roundabout way of ensuring all inputs get sorted and matched
|
283 | 282 | input_refs_objs = [(getattr(inputRefs, key), inputs[key])
|
@@ -305,6 +304,11 @@ def runQuantum(self, butlerQC, inputRefs, outputRefs):
|
305 | 304 | dataId=dataId, id_tract_patch=id_tp,
|
306 | 305 | )
|
307 | 306 | catexps = [catexps[band] for band in self.config.get_band_sets()[0]]
|
| 307 | + return catexps |
| 308 | + |
| 309 | + def runQuantum(self, butlerQC, inputRefs, outputRefs): |
| 310 | + inputs = butlerQC.get(inputRefs) |
| 311 | + catexps = self.build_catexps(butlerQC, inputRefs, inputs) |
308 | 312 | outputs = self.run(catexps=catexps, cat_ref=inputs['cat_ref'])
|
309 | 313 | butlerQC.put(outputs, outputRefs)
|
310 | 314 |
|
|
0 commit comments