Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-32226: Replace pipe.base.timeMethod with utils.timer #261

Merged
merged 1 commit into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions python/lsst/meas/algorithms/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import lsst.afw.table as afwTable
import lsst.pex.config as pexConfig
import lsst.pipe.base as pipeBase
from lsst.utils.timer import timeMethod
from .subtractBackground import SubtractBackgroundTask


Expand Down Expand Up @@ -200,7 +201,7 @@ def __init__(self, schema=None, **kwds):
if self.config.doTempWideBackground:
self.makeSubtask("tempWideBackground")

@pipeBase.timeMethod
@timeMethod
def run(self, table, exposure, doSmooth=True, sigma=None, clearMask=True, expId=None):
"""Run source detection and create a SourceCatalog of detections.

Expand Down Expand Up @@ -635,7 +636,7 @@ def clearUnwantedResults(self, mask, results):
mask &= ~mask.getPlaneBitMask("DETECTED")
results.positive = None

@pipeBase.timeMethod
@timeMethod
def detectFootprints(self, exposure, doSmooth=True, sigma=None, clearMask=True, expId=None):
"""Detect footprints on an exposure.

Expand Down
3 changes: 2 additions & 1 deletion python/lsst/meas/algorithms/loadIndexedReferenceObjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import lsst.afw.table as afwTable
import lsst.pex.config as pexConfig
import lsst.pipe.base as pipeBase
from lsst.utils.timer import timeMethod
from .indexerRegistry import IndexerRegistry


Expand Down Expand Up @@ -60,7 +61,7 @@ def __init__(self, butler, *args, **kwargs):
self.ref_dataset_name = self.config.ref_dataset_name
self.butler = butler

@pipeBase.timeMethod
@timeMethod
def loadSkyCircle(self, ctrCoord, radius, filterName=None, epoch=None, centroids=False):
shardIdList, isOnBoundaryList = self.indexer.getShardIds(ctrCoord, radius)
shards = self.getShards(shardIdList)
Expand Down
3 changes: 2 additions & 1 deletion python/lsst/meas/algorithms/loadReferenceObjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import lsst.log
from lsst import sphgeom
from lsst.daf.base import PropertyList
from lsst.utils.timer import timeMethod


def isOldFluxField(name, units):
Expand Down Expand Up @@ -914,7 +915,7 @@ def __init__(self, butler=None, *args, **kwargs):
pipeBase.Task.__init__(self, *args, **kwargs)
self.butler = butler

@pipeBase.timeMethod
@timeMethod
def loadPixelBox(self, bbox, wcs, filterName=None, photoCalib=None, epoch=None):
"""Load reference objects that overlap a rectangular pixel region.

Expand Down