wrapForcedAlgorithm¶
- lsst.meas.base.wrapForcedAlgorithm(AlgClass, executionOrder, name=None, needsMetadata=False, hasMeasureN=False, needsSchemaOnly=False, hasLogName=False, **kwds)¶
- Expose a C++ - ForcedAlgorithmclass as a measurement plugin.- Parameters:
- AlgClassAPI compatible with ForcedAlgorithm
- C++ algorithm class to convert. May either derive directly from - ForcedAlgorithmor be an unrelated class which has the same- measure,- measureNand- failsignatures.
- executionOrderfloat
- The order this plugin should be run, relative to others (see - BasePlugin.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- PropertySetmetadata argument.
- hasMeasureNbool, optional
- Does the algorithm support simultaneous measurement of multiple sources? If - True, a- bool- doMeasureNfield will be added to the generated config class, and its value will be passed as the last argument when calling the- AlgClassconstructor.
- hasLogNamebool, optional
- Trueif the C++ algorithm supports- logNameas a constructor argument.
- needsSchemaOnlybool, optional
- Whether the algorithm constructor expects a Schema argument (representing the output - Schema) rather than the full- SchemaMapper(which provides access to both the reference schema and the output schema).
- **kwds
- Additional keyword arguments are passed to the lower-level - wrapAlgorithmand- wrapAlgorithmControlclasses.
 
- AlgClassAPI compatible with 
- Returns:
- forcedPluginsubclass of ForcedPlugin
- The new measurement plugin class. 
 
- forcedPluginsubclass of 
 - Notes - The first two arguments to the C++ constructor are expected to be - Control const & ctrl, std::string const & name- If - needsSchemaOnlyis- True, then the third argument will be- Schema & schema; otherwise, it will be- SchemaMapper & schemaMapper.- If - needsMetadatais- True, we also append- PropertySet & metadata.- If - hasMeasureNis- True, we also append- bool doMeasureN.- If - hasLogNameis- True, we also append- std::string logName.- If more than one of the above is - True, the metadata- PropertySetprecedes the- doMeasureN- booland the- logNamecomes last of the three.