def setUp(self): schema = afwTable.SourceTable.makeMinimalSchema() apNameStr = "Ap" calib_flag_name = "cal_source_use" # Add fields in anti-sorted order to try to impose a need for sorting # in the addition of the apCorr fields (may happen by fluke, but this # is the best we can do to test this here. names = ["test2", "test1"] for name in names: apName = name + apNameStr addApCorrName(apName) schema.addField(name + "_instFlux", type=float) schema.addField(name + "_instFluxErr", type=float) schema.addField(name + "_flag", type="Flag") schema.addField(apName + "_instFlux", type=float) schema.addField(apName + "_instFluxErr", type=float) schema.addField(apName + "_flag", type="Flag") schema.addField(names[0] + "_Centroid_x", type=float) schema.addField(names[0] + "_Centroid_y", type=float) schema.getAliasMap().set("slot_Centroid", names[0] + "_Centroid") schema.addField(calib_flag_name, type="Flag") config = measureApCorr.MeasureApCorrTask.ConfigClass() config.refFluxName = names[0] config.sourceSelector.active.field = calib_flag_name self.meas_apCorr_task = measureApCorr.MeasureApCorrTask(schema=schema, config=config) self.names = names self.apNameStr = apNameStr self.schema = schema self.exposure = lsst.afw.image.ExposureF(10, 10)
def setUp(self): schema = afwTable.SourceTable.makeMinimalSchema() name = "test" apname = "testAp" calib_flag_name = "cal_source_use" addApCorrName(apname) schema.addField(name + "_flux", type=float) schema.addField(name + "_fluxSigma", type=float) schema.addField(name + "_flag", type="Flag") schema.addField(apname + "_flux", type=float) schema.addField(apname + "_fluxSigma", type=float) schema.addField(apname + "_flag", type="Flag") schema.addField(calib_flag_name, type="Flag") schema.addField(name + "_Centroid_x", type=float) schema.addField(name + "_Centroid_y", type=float) schema.getAliasMap().set('slot_Centroid', name + '_Centroid') config = measureApCorr.MeasureApCorrTask.ConfigClass() config.refFluxName = name config.starSelector.field = calib_flag_name self.meas_apCorr_task = measureApCorr.MeasureApCorrTask(schema=schema, config=config) self.name = name self.apname = apname self.schema = schema self.exposure = lsst.afw.image.ExposureF(10, 10)
def setUp(self): schema = afwTable.SourceTable.makeMinimalSchema() name = "test" addApCorrName(name) schema.addField(name + "_flux", type=np.float64) schema.addField(name + "_fluxSigma", type=np.float64) schema.addField(name + "_flag", type=np.float64) schema.addField(name + "_Centroid_x", type=np.float64) schema.addField(name + "_Centroid_y", type=np.float64) schema.getAliasMap().set('slot_Centroid', name + '_Centroid') self.ap_corr_task = applyApCorr.ApplyApCorrTask(schema=schema) self.name = name self.schema = schema
def setUp(self): schema = afwTable.SourceTable.makeMinimalSchema() name = "test" addApCorrName(name) schema.addField(name + "_flux", type=float) schema.addField(name + "_fluxSigma", type=float) schema.addField(name + "_flag", type=float) schema.addField(name + "_Centroid_x", type=float) schema.addField(name + "_Centroid_y", type=float) schema.getAliasMap().set('slot_Centroid', name + '_Centroid') self.ap_corr_task = applyApCorr.ApplyApCorrTask(schema=schema) self.name = name self.schema = schema
def setUp(self): schema = afwTable.SourceTable.makeMinimalSchema() names = ["test2", "test"] for name in names: addApCorrName(name) schema.addField(name + "_instFlux", type=np.float64) schema.addField(name + "_instFluxErr", type=np.float64) schema.addField(name + "_flag", type=np.float64) schema.addField(name + "_Centroid_x", type=np.float64) schema.addField(name + "_Centroid_y", type=np.float64) schema.getAliasMap().set('slot_Centroid', name + '_Centroid') self.ap_corr_task = applyApCorr.ApplyApCorrTask(schema=schema) self.name = name # just use 'test' prefix for most of the tests self.schema = schema
def setUp(self): schema = afwTable.SourceTable.makeMinimalSchema() name = "test" apname = "testAp" calib_flag_name = "cal_source_use" addApCorrName(apname) schema.addField(name + "_flux", type=float) schema.addField(name + "_fluxSigma", type=float) schema.addField(name + "_flag", type="Flag") schema.addField(apname + "_flux", type=float) schema.addField(apname + "_fluxSigma", type=float) schema.addField(apname + "_flag", type="Flag") schema.addField(calib_flag_name, type="Flag") schema.addField(name + "_Centroid_x", type=float) schema.addField(name + "_Centroid_y", type=float) schema.getAliasMap().set('slot_Centroid', name + '_Centroid') task = measureApCorr.MeasureApCorrTask config = task.ConfigClass() config.refFluxName = name config.inputFilterFlag = calib_flag_name self.meas_apCorr_task = task(schema=schema, config=config) self.name = name self.apname = apname self.schema = schema
def setUp(self): schema = afwTable.SourceTable.makeMinimalSchema() name = "test" apname = "testAp" calib_flag_name = "cal_source_use" addApCorrName(apname) schema.addField(name + "_instFlux", type=float) schema.addField(name + "_instFluxErr", type=float) schema.addField(name + "_flag", type="Flag") schema.addField(apname + "_instFlux", type=float) schema.addField(apname + "_instFluxErr", type=float) schema.addField(apname + "_flag", type="Flag") schema.addField(calib_flag_name, type="Flag") schema.addField(name + "_Centroid_x", type=float) schema.addField(name + "_Centroid_y", type=float) schema.getAliasMap().set('slot_Centroid', name + '_Centroid') config = measureApCorr.MeasureApCorrTask.ConfigClass() config.refFluxName = name config.sourceSelector.active.field = calib_flag_name self.meas_apCorr_task = measureApCorr.MeasureApCorrTask(schema=schema, config=config) self.name = name self.apname = apname self.schema = schema self.exposure = lsst.afw.image.ExposureF(10, 10)