Esempio n. 1
0
 def testSingleFrameMeasurementTransform(self):
     """Test applying a transform task to the results of single frame measurement."""
     schema = afwTable.SourceTable.makeMinimalSchema()
     sfmConfig = measBase.SingleFrameMeasurementConfig(plugins=[PLUGIN_NAME])
     # We don't use slots in this test
     for key in sfmConfig.slots:
         setattr(sfmConfig.slots, key, None)
     sfmTask = measBase.SingleFrameMeasurementTask(schema, config=sfmConfig)
     transformTask = TransformTask(measConfig=sfmConfig,
                                   inputSchema=sfmTask.schema, outputDataset="src")
     self._transformAndCheck(sfmConfig, sfmTask.schema, transformTask)
Esempio n. 2
0
 def testForcedMeasurementTransform(self):
     """Test applying a transform task to the results of forced measurement."""
     schema = afwTable.SourceTable.makeMinimalSchema()
     forcedConfig = measBase.ForcedMeasurementConfig(plugins=[PLUGIN_NAME])
     # We don't use slots in this test
     for key in forcedConfig.slots:
         setattr(forcedConfig.slots, key, None)
     forcedConfig.copyColumns = {"id": "objectId", "parent": "parentObjectId"}
     forcedTask = measBase.ForcedMeasurementTask(schema, config=forcedConfig)
     transformConfig = TransformConfig(copyFields=("objectId", "coord_ra", "coord_dec"))
     transformTask = TransformTask(measConfig=forcedConfig,
                                   inputSchema=forcedTask.schema, outputDataset="forced_src",
                                   config=transformConfig)
     self._transformAndCheck(forcedConfig, forcedTask.schema, transformTask)