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-35697: Use lsst.utils.timer.profile rather than deprecated pipe_base version #227

Merged
merged 1 commit into from
Aug 10, 2022
Merged
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
4 changes: 2 additions & 2 deletions python/lsst/jointcal/jointcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ def _load_data(self, inputSourceTableVisit, inputVisitSummary, associations,
oldWcsList = []
filters = []
load_cat_profile_file = 'jointcal_load_data.prof' if self.config.detailedProfile else ''
with pipeBase.cmdLineTask.profile(load_cat_profile_file):
with lsst.utils.timer.profile(load_cat_profile_file):
table = make_schema_table() # every detector catalog has the same layout
# No guarantee that the input is in the same order of visits, so we have to map one of them.
catalogMap = {ref.dataId['visit']: i for i, ref in enumerate(inputSourceTableVisit)}
Expand Down Expand Up @@ -1054,7 +1054,7 @@ def _do_load_refcat_and_fit(self, associations, defaultFilter, center, radius,

fit_profile_file = 'jointcal_fit_%s.prof'%name if self.config.detailedProfile else ''
dataName = "{}_{}".format(tract, defaultFilter.physicalLabel)
with pipeBase.cmdLineTask.profile(fit_profile_file):
with lsst.utils.timer.profile(fit_profile_file):
result = fit_function(associations, dataName)
# TODO DM-12446: turn this into a "butler save" somehow.
# Save reference and measurement chi2 contributions for this data
Expand Down