def measureDipole(self, s, exp): msConfig = ipDiffim.DipoleMeasurementConfig() schema = afwTable.SourceTable.makeMinimalSchema() schema.addField("centroid_x", type=float) schema.addField("centroid_y", type=float) schema.addField("centroid_flag", type='Flag') task = ipDiffim.DipoleMeasurementTask(schema, config=msConfig) measCat = afwTable.SourceCatalog(schema) measCat.defineCentroid("centroid") source = measCat.addNew() source.set("centroid_x", self.xc) source.set("centroid_y", self.yc) source.setFootprint(s.getFootprint()) # Then run the default SFM task. Results not checked task.run(measCat, exp) return measCat[0]
def setUp(self): np.random.seed(666) self.config = ipDiffim.DipoleMeasurementConfig()
def setUp(self): self.config = ipDiffim.DipoleMeasurementConfig()