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-430: Modify measurement framework to log plugins error in individual logs #83
Conversation
include/lsst/meas/base/PsfFlux.h
Outdated
@@ -78,7 +78,8 @@ class PsfFluxAlgorithm : public SimpleAlgorithm { | |||
/// The control object contains the configuration parameters for this algorithm. | |||
typedef PsfFluxControl Control; | |||
|
|||
PsfFluxAlgorithm(Control const & ctrl, std::string const & name, afw::table::Schema & schema); | |||
PsfFluxAlgorithm(Control const & ctrl, std::string const & name, afw::table::Schema & schema, | |||
std::string const & logName = ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation should match the beginning of the parentheses.
python/lsst/meas/base/algorithm.cc
Outdated
|
||
/* Members */ | ||
python::declareAlgorithm<SingleFrameAlgorithm>(clsSingleFrameAlgorithm); | ||
|
||
clsSimpleAlgorithm.def("measureForced", &SimpleAlgorithm::measureForced, | ||
"measRecord"_a, "exposure"_a, "refRecord"_a, "refWcs"_a); | ||
clsSimpleAlgorithm.def("getLogName", &SimpleAlgorithm::getLogName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be a method of BaseAlgorithm?
python/lsst/meas/base/wrappers.py
Outdated
@@ -119,8 +125,7 @@ def wrapAlgorithm(Base, AlgClass, factory, executionOrder, name=None, Control=No | |||
If apCorrList is non-empty then shouldApCorr is ignored. | |||
If non-empty and doRegister is True then the names are added to the set | |||
retrieved by getApCorrNameSet | |||
|
|||
|
|||
@param[in] hasLogName Plugin supports a logName as a constructor argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed extra blank line. Not sure what the standard is, but should be in a separate commit.
python/lsst/meas/base/wrappers.py
Outdated
if hasattr(ctrl, "makeControl"): | ||
ctrl = ctrl.makeControl() | ||
# logNmae signature needs to be on this Class __init__, but is not needed by the C++ plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logNmae -> logName
tests/testPluginLogs.py
Outdated
class RegisteredPluginsTestCase(AlgorithmTestCase, lsst.utils.tests.TestCase): | ||
""" | ||
Test all the registered Plugins to see if their logName is set as expected. | ||
Those which have the hasLogName=True attribute will have a LogName parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space after "True"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
ba59644
to
28dfd1d
Compare
…al logs Logs named for the taskName + pluginName (e.g., measurement.base_PsfFlux) Name is set by the task, but the name is pushed down to the plugin. if the plugin class has "hasLogName = True" and an optional "logName" parameter in its initialization. If both are so, plugin.getLogName() wil return the name of the log. if lsst.log.Log logs are identified by name, not by the logger itself, so the logName is enough. C++ routines can use the BaseAlgorithm function getLogName to get the right log. Log Measurement Errors, which were not previously logged. Checkin seg fault problem with pybind methods on BaseAlgorithm Add py:multiple_inheritance to SimpleAlgorithm wrapper.
I responded by fixing all the comments on the pull request as per Bob Armstrong's comment. |
No description provided.