Skip to content

Commit

Permalink
Merge pull request #198 from lsst/tickets/DM-32226
Browse files Browse the repository at this point in the history
DM-32226: Replace `pipe.base.timeMethod` with `utils.timer`
  • Loading branch information
andy-slac committed Oct 20, 2021
2 parents c490e7e + 68e1f3a commit ccd4582
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion python/lsst/meas/base/catalogCalculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import lsst.pipe.base
import lsst.pex.config
import lsst.daf.base
from lsst.utils.timer import timeMethod

from .pluginsBase import BasePlugin, BasePluginConfig
from .pluginRegistry import PluginRegistry, PluginMap
Expand Down Expand Up @@ -226,7 +227,7 @@ def initializePlugins(self):
raise ValueError("{} has an execution order less than the minimum for an catalogCalculation "
"plugin. Value {} : Minimum {}".format(*errorTuple))

@lsst.pipe.base.timeMethod
@timeMethod
def run(self, measCat):
"""The entry point for the catalog calculation task.
Expand Down
5 changes: 3 additions & 2 deletions python/lsst/meas/base/diaCalculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from .pluginsBase import BasePlugin
from .pluginRegistry import (PluginRegistry, PluginMap)
import lsst.pipe.base
from lsst.utils.timer import timeMethod

# Enforce an error for unsafe column/array value setting in pandas.
pd.options.mode.chained_assignment = 'raise'
Expand Down Expand Up @@ -273,7 +274,7 @@ def _validatePluginCols(self, plug):
else:
self.outputCols.append(outputName)

@lsst.pipe.base.timeMethod
@timeMethod
def run(self,
diaObjectCat,
diaSourceCat,
Expand Down Expand Up @@ -341,7 +342,7 @@ def run(self,
updatedDiaObjectIds,
filterNames)

@lsst.pipe.base.timeMethod
@timeMethod
def callCompute(self,
diaObjectCat,
diaSourceCat,
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/meas/base/sfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
indicated in the field documentation).
"""

import lsst.pipe.base as pipeBase
import lsst.pex.config
import time
from lsst.utils.timer import timeMethod

from .pluginRegistry import PluginRegistry
from .baseMeasurement import (BaseMeasurementPluginConfig, BaseMeasurementPlugin,
Expand Down Expand Up @@ -210,7 +210,7 @@ def __init__(self, schema, algMetadata=None, **kwds):
else:
self.doBlendedness = False

@pipeBase.timeMethod
@timeMethod
def run(self, measCat, exposure, noiseImage=None, exposureId=None, beginOrder=None, endOrder=None):
r"""Run single frame measurement over an exposure and source catalog.
Expand Down

0 comments on commit ccd4582

Please sign in to comment.