lsst.meas.base.wrapSimpleAlgorithm(AlgClass, executionOrder, name=None, needsMetadata=False, hasMeasureN=False, hasLogName=False, deprecated=None, **kwds)

Expose a C++ SimpleAlgorithm class as a measurement plugin.

SimpleAlgorithms are made available as both SingleFramePlugins and ForcedPlugins.

AlgClassSubclass of C++ SimpleAlgorithm, or API compatible

Algorithm class to convert. The C++ class should be wrapped with Pybind11, and must provide measure(), measureN() and fail()` signatures equivalent to ``SimpleAlgorithm.


The order this plugin should be run, relative to others (see getExecutionOrder).

namestr, optional

Name to use when registering the algorithm. Ignored if doRegistry=False; set to generateAlgorithmName(AlgClass) if None.

needsMetadatabool, optional

Sets whether the AlgClass’s constructor should be passed a PropertySet metadata argument.

hasMeasureNbool, optional

Does the algorithm support simultaneous measurement of multiple sources? If True, a bool doMeasureN field will be added to the generated config class, and its value will be passed as the last argument when calling the AlgClass constructor.

hasLogNamebool, optional

True if the C++ algorithm supports logName as a constructor argument.

deprecatedstr, optional

If specified, emit as a deprecation warning when the plugin is constructed.


Additional keyword arguments are passed to the lower-level wrapAlgorithm and wrapAlgorithmControl classes.

singleFramePluginsubclass of SingleFramePlugin

The new single frame measurement plugin class.

forcedPluginsubclass of ForcedPlugin

The new forced measurement plugin class.


The first three arguments to the C++ constructor are expected to be Control const & ctrl, std::string const & name, Schema & schema.

If needsMetadata is True, we also append PropertySet & metadata.

If hasMeasureN is True, we also append bool doMeasureN.

If hasLogName is True, we also append std::string logName.

If more than one of the above is True, the metadata PropertySet precedes the doMeasureN bool and the logName comes last of the three.