diff --git a/python/lsst/pipe/tasks/postprocess.py b/python/lsst/pipe/tasks/postprocess.py index 299445d89..4796bb4c6 100644 --- a/python/lsst/pipe/tasks/postprocess.py +++ b/python/lsst/pipe/tasks/postprocess.py @@ -225,6 +225,7 @@ def runDataRef(self, dataRef): ccdVisitId = dataRef.get('ccdExposureId') result = self.run(src, ccdVisitId=ccdVisitId) dataRef.put(result.table, 'source') + return result def run(self, catalog, ccdVisitId=None): """Convert `src` catalog to parquet @@ -266,7 +267,6 @@ def addCalibColumns(self, catalog, dataRef): newCat: `afwTable.SourceCatalog` Source Catalog with requested local calib columns """ - mapper = afwTable.SchemaMapper(catalog.schema) measureConfig = SingleFrameMeasurementTask.ConfigClass() measureConfig.doReplaceWithNoise = False @@ -274,6 +274,7 @@ def addCalibColumns(self, catalog, dataRef): exposure = dataRef.get('calexp_sub', bbox=lsst.geom.Box2I(lsst.geom.Point2I(0, 0), lsst.geom.Point2I(0, 0))) + aliasMap = catalog.schema.getAliasMap() mapper = afwTable.SchemaMapper(catalog.schema) mapper.addMinimalSchema(catalog.schema, True) schema = mapper.getOutputSchema() @@ -295,6 +296,7 @@ def addCalibColumns(self, catalog, dataRef): measureConfig.plugins.names.add(plugin) measurement = SingleFrameMeasurementTask(config=measureConfig, schema=schema) + schema.setAliasMap(aliasMap) newCat = afwTable.SourceCatalog(schema) newCat.extend(catalog, mapper=mapper) measurement.run(measCat=newCat, exposure=exposure, exposureId=exposureIdInfo.expId)