Skip to content

Commit

Permalink
Changes for new FlagHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
pgee2000 committed Mar 3, 2017
1 parent 4c348d1 commit a3d6c3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/lsst/meas/extensions/convolved/convolved.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from lsst.pex.config import Config, Field, ListField, ConfigField, makeConfigClass
from lsst.pipe.base import Struct
from lsst.meas.extensions.photometryKron import KronAperture, KronFluxPlugin
from lsst.meas.base.flagDecorator import addFlagHandler
from lsst.meas.base.wrappers import WrappedSingleFramePlugin, WrappedForcedPlugin

import lsst.meas.base
Expand Down Expand Up @@ -208,7 +207,6 @@ def getAllResultNames(self, name=PLUGIN_NAME):
return self.getAllApertureResultNames(name=name) + self.getAllKronResultNames(name=name)


@addFlagHandler(("flag", "error in running ConvolvedFluxPlugin"),)
class BaseConvolvedFluxPlugin(lsst.meas.base.BaseMeasurementPlugin):
"""Calculate aperture fluxes on images convolved to target seeing.
Expand Down Expand Up @@ -259,6 +257,9 @@ def __init__(self, config, name, schema, metadata):
self.data = [ConvolvedFluxData(self.config.getBaseNameForSeeing(seeing), schema, seeing,
self.config, metadata) for seeing in self.config.seeing]

flagDefs = lsst.meas.base.FlagDefinitionList()
flagDefs.addFailureFlag("error in running ConvolvedFluxPlugin")
self.flagHandler = lsst.meas.base.FlagHandler.addFields(schema, name, flagDefs)
# Trigger aperture corrections for all flux measurements
for apName in self.config.getAllApertureResultNames(name):
lsst.meas.base.addApCorrName(apName)
Expand Down

0 comments on commit a3d6c3f

Please sign in to comment.