3 from .pluginsBase
import BasePlugin
4 from .pluginRegistry
import generateAlgorithmName, register
5 from .apCorrRegistry
import addApCorrName
6 from .sfm
import SingleFramePlugin, SingleFramePluginConfig
7 from .forcedMeasurement
import ForcedPlugin, ForcedPluginConfig
9 __all__ = (
"wrapSingleFrameAlgorithm",
"wrapForcedAlgorithm",
"wrapSimpleAlgorithm",
"wrapTransform",
15 def __init__(self, config, name, schema, metadata, logName=None):
16 SingleFramePlugin.__init__(self, config, name, schema, metadata, logName=logName)
17 if hasattr(self,
"hasLogName")
and self.hasLogName
and logName
is not None:
18 self.
cpp = self.factory(config, name, schema, metadata, logName=logName)
20 self.
cpp = self.factory(config, name, schema, metadata)
28 def fail(self, measRecord, error=None):
29 self.
cpp.
fail(measRecord, error.cpp
if error
is not None else None)
34 def __init__(self, config, name, schemaMapper, metadata, logName=None):
35 ForcedPlugin.__init__(self, config, name, schemaMapper, metadata, logName=logName)
36 if hasattr(self,
"hasLogName")
and self.hasLogName
and logName
is not None:
37 self.
cpp = self.factory(config, name, schemaMapper, metadata, logName=logName)
39 self.
cpp = self.factory(config, name, schemaMapper, metadata)
41 def measure(self, measRecord, exposure, refRecord, refWcs):
42 self.
cpp.measureForced(measRecord, exposure, refRecord, refWcs)
44 def measureN(self, measCat, exposure, refCat, refWcs):
45 self.
cpp.measureNForced(measCat, exposure, refCat, refWcs)
47 def fail(self, measRecord, error=None):
48 self.
cpp.
fail(measRecord, error.cpp
if error
is not None else None)
53 Wrap a C++ algorithm's control class into a Python Config class. 55 @param[in] Base Base class for the returned ConfigClass; one of SingleFramePluginConfig or 57 @param[in] Control Control class to be wrapped (a Swigged C++ class) 58 @param[in] module Either a module object, a string specifying the name of the module, or an 59 integer specifying how far back in the stack to look for the module to use: 60 0 is pex.config.wrap, 1 is lsst.meas.base.wrappers, 2 is the immediate 61 caller, etc. This will be used to set __module__ for the new config class, 62 and the class will also be added to the module. The default is to use the 64 @param[in] hasMeasureN Whether the plugin supports fitting multiple objects at once (if so, a 65 config option to enable/disable this will be added). 67 @return a new subclass of lsst.pex.config.Config 69 This function is generally only called by wrapAlgorithm; it is unlikely users will have to call it 78 Control.__name__.replace(
"Control",
"Config"),
80 {
"doMeasureN": lsst.pex.config.Field(dtype=bool, default=
True,
81 doc=
"whether to run this plugin in multi-object mode")}
83 ConfigClass = lsst.pex.config.makeConfigClass(Control, module=module, cls=cls)
87 ConfigClass = lsst.pex.config.makeConfigClass(Control, module=module, base=Base)
91 def wrapAlgorithm(Base, AlgClass, factory, executionOrder, name=None, Control=None,
92 ConfigClass=None, TransformClass=None, doRegister=True, shouldApCorr=False,
93 apCorrList=(), hasLogName=
False, **kwds):
95 Wrap a C++ Algorithm class into a Python Plugin class. 97 @param[in] Base Base class for the returned Plugin; one of SingleFramePlugin or 99 @param[in] AlgClass Swigged C++ Algorithm class to convert; must be a subclass of 100 SingleFrameAlgorithm or ForcedAlgorithm (matching the Base argument), or 101 an unrelated class with the same measure() and measureN() signatures as 103 @param[in] factory A callable that is used to construct an instance of AlgClass. It must take 104 four arguments, either (config, name, schema, metadata) or 105 (config, name, schemaMapper, metadata), depending on whether the algorithm is 106 single-frame or forced. 107 @param[in] executionOrder The order this plugin should be run, relative to others 108 (see BasePlugin.getExecutionOrder()). 109 @param[in] name String to use when registering the algorithm. Ignored if doRegistry=False, 110 set to generateAlgorithmName(AlgClass) if None. 111 @param[in] Control Swigged C++ Control class for the algorithm; AlgClass.Control is used if None. 112 Ignored if ConfigClass is not None. 113 @param[in] ConfigClass Python Config class that wraps the C++ Algorithm's swigged Control class. If 114 None, wrapAlgorithmControl is called to generate a Config class using the 116 @param[in] TransformClass Transformation which may be used to post-process the results of measurement. 117 If None, the default (defined by BasePlugin) is used. 118 @param[in] doRegister If True (the default), register the plugin with Base's registry, allowing it 119 to be used by measurement Tasks. 120 @param[in] shouldApCorr Does this algorithm measure a instFlux that can be aperture corrected? This is 121 shorthand for apCorrList=[name] and is ignored if apCorrList is specified. 122 @param[in] apCorrList List of field name prefixes for instFlux fields that to be aperture corrected. 123 If an algorithm produces a single instFlux that should be 124 aperture corrected then it is simpler to set shouldApCorr=True. But if an 125 algorithm produces multiple such fields then it must specify apCorrList, 126 instead. For example modelfit_CModel produces 3 such fields: apCorrList= 127 ("modelfit_CModel_exp", "modelfit_CModel_exp", "modelfit_CModel_def") 128 If apCorrList is non-empty then shouldApCorr is ignored. 129 If non-empty and doRegister is True then the names are added to the set 130 retrieved by getApCorrNameSet 131 @param[in] hasLogName Plugin supports a logName as a constructor argument 134 @param[in] **kwds Additional keyword arguments passed to generateAlgorithmControl, including: 135 - hasMeasureN: Whether the plugin supports fitting multiple objects at once 136 (if so, a config option to enable/disable this will be added). 137 - executionOrder: If not None, an override for the default executionOrder for 138 this plugin (the default is 2.0, which is usually appropriate for fluxes). 140 @return the new Plugin class, a subclass of Base 142 This function is generally only called by the public wrapSingleFrameAlgorithm, wrapForcedAlgorithm, and 143 wrapSimpleAlgorithm functions; it is unlikely users will have to call it directly. 145 if ConfigClass
is None:
147 Control = AlgClass.Control
150 def getExecutionOrder():
151 return executionOrder
152 typeDict = dict(AlgClass=AlgClass, ConfigClass=ConfigClass, factory=staticmethod(factory),
153 getExecutionOrder=staticmethod(getExecutionOrder))
155 typeDict[
'getTransformClass'] = staticmethod(
lambda: TransformClass)
156 PluginClass = type(AlgClass.__name__ + Base.__name__, (Base,), typeDict)
160 Base.registry.register(name, PluginClass)
163 PluginClass.hasLogName = hasLogName
168 hasLogName=False, **kwds):
170 Wrap a C++ SingleFrameAlgorithm class into a Python SingleFramePlugin class. 172 @param[in] AlgClass Swigged C++ Algorithm class to convert; must be a subclass of 173 SingleFrameAlgorithm, or an unrelated class with the same measure(), 174 measureN(), and fail() signatures. 175 @param[in] executionOrder The order this plugin should be run, relative to others 176 (see BasePlugin.getExecutionOrder()). 177 @param[in] name String to use when registering the algorithm. Ignored if doRegistry=False, 178 set to generateAlgorithmName(AlgClass) if None. 179 @param[in] needsMetadata Sets whether the AlgClass's constructor should be passed a PropertySet 181 @param[in] hasMeasureN Whether the algorithm supports simultaneous measurement of multiple sources. 182 If True, a bool doMeasureN field will be added to the generated Config class, 183 and its value will be passed as the last argument when calling the AlgClass 185 @param[in] hasLogName Plugin supports a logName as a constructor argument 186 @param[in] **kwds Additional keyword arguments passed to the lower-level wrapAlgorithm and 187 wrapAlgorithmControl classes. These include: 188 - Control: Swigged C++ Control class for the algorithm; AlgClass.Control 189 is used if None. Ignored if ConfigClass is not None. 190 - ConfigClass: Python Config class that wraps the C++ Algorithm's swigged 191 Control class. If None, wrapAlgorithmControl is called to generate a 192 Config class using the Control argument. 193 - doRegister: If True (the default), register the plugin with 194 SingleFramePlugin.registry, allowing it to be used by 195 SingleFrameMeasurementTask. 196 - shouldApCorr: does this algorithm measure a instFlux that can be aperture 197 corrected? This is shorthand for apCorrList=[name] and is ignored if 198 apCorrList is specified. 199 - apCorrList: list of field name prefixes for instFlux fields that should be 200 aperture corrected. If an algorithm produces a single instFlux that should be 201 aperture corrected then it is simpler to set shouldApCorr=True. But if an 202 algorithm produces multiple such fields then it must specify apCorrList, 203 instead. For example modelfit_CModel produces 3 such fields: apCorrList= 204 ("modelfit_CModel_exp", "modelfit_CModel_exp", "modelfit_CModel_def") 205 If apCorrList is non-empty then shouldApCorr is ignored. 206 If non-empty and doRegister is True then the names are added to the set 207 retrieved by getApCorrNameSet 208 - executionOrder: If not None, an override for the default executionOrder for 209 this plugin (the default is 2.0, which is usually appropriate for fluxes). 211 @return the new SingleFramePlugin subclass 213 The needsMetadata and hasMeasureN arguments combine to determine the expected constructor signature; 214 we always expect the first three arguments to be: 216 Control const & ctrl, std::string const & name, Schema & schema 218 If needsMetadata, we also append: 220 PropertySet & metadata 222 If hasMeasureN, we also append: 226 If hasLogName, we also append: 230 If more than one is True, the metadata PropertySet precedes the doMeasureN bool 231 and the logName comes last of the three 235 def factory(config, name, schema, metadata, **kwargs):
236 return AlgClass(config.makeControl(), name, schema, metadata, config.doMeasureN, **kwargs)
238 def factory(config, name, schema, metadata, **kwargs):
239 return AlgClass(config.makeControl(), name, schema, config.doMeasureN, **kwargs)
242 def factory(config, name, schema, metadata, **kwargs):
243 return AlgClass(config.makeControl(), name, schema, metadata, **kwargs)
245 def factory(config, name, schema, metadata, **kwargs):
246 return AlgClass(config.makeControl(), name, schema, **kwargs)
248 return wrapAlgorithm(WrappedSingleFramePlugin, AlgClass, executionOrder=executionOrder, name=name,
249 factory=factory, hasMeasureN=hasMeasureN, hasLogName=hasLogName, **kwds)
253 hasMeasureN=False, needsSchemaOnly=False, hasLogName=False, **kwds):
255 Wrap a C++ ForcedAlgorithm class into a Python ForcedPlugin class. 257 @param[in] AlgClass Swigged C++ Algorithm class to convert; must be a subclass of 258 ForcedAlgorithm, or an unrelated class with the same measure(), measureN(), 259 and fail() signatures. 260 @param[in] executionOrder The order this plugin should be run, relative to others 261 (see BasePlugin.getExecutionOrder()). 262 @param[in] name String to use when registering the algorithm. Ignored if doRegistry=False, 263 set to generateAlgorithmName(AlgClass) if None. 264 @param[in] needsMetadata Sets whether the AlgClass's constructor should be passed a PropertySet 266 @param[in] hasMeasureN Whether the algorithm supports simultaneous measurement of multiple sources. 267 If True, a bool doMeasureN field will be added to the generated Config class, 268 and its value will be passed as the last argument when calling the AlgClass 270 @param[in] hasLogName Plugin supports a logName as a constructor argument 271 @param[in] needsSchemaOnly Whether the algorithm constructor expects a Schema argument (representing the 272 output Schema) rather than the full SchemaMapper (which provides access to 273 both the reference Schema and the output Schema). 274 @param[in] **kwds Additional keyword arguments passed to the lower-level wrapAlgorithm and 275 wrapAlgorithmControl classes. These include: 276 - Control: Swigged C++ Control class for the algorithm; AlgClass.Control 277 is used if None. Ignored if ConfigClass is not None. 278 - ConfigClass: Python Config class that wraps the C++ Algorithm's swigged 279 Control class. If None, wrapAlgorithmControl is called to generate a 280 Config class using the Control argument. 281 - doRegister: If True (the default), register the plugin with 282 ForcedPlugin.registry, allowing it to be used by ForcedMeasurementTask. 283 - shouldApCorr: does this algorithm measure a instFlux that can be aperture 284 corrected? This is shorthand for apCorrList=[name] and is ignored if 285 apCorrList is specified. 286 - apCorrList: list of field name prefixes for instFlux fields that should be 287 aperture corrected. If an algorithm produces a single instFlux that should be 288 aperture corrected then it is simpler to set shouldApCorr=True. But if an 289 algorithm produces multiple such fields then it must specify apCorrList, 290 instead. For example modelfit_CModel produces 3 such fields: apCorrList= 291 ("modelfit_CModel_exp", "modelfit_CModel_exp", "modelfit_CModel_def") 292 If apCorrList is non-empty then shouldApCorr is ignored. 293 If non-empty and doRegister is True then the names are added to the set 294 retrieved by getApCorrNameSet 295 - executionOrder: If not None, an override for the default executionOrder for 296 this plugin (the default is 2.0, which is usually appropriate for fluxes). 298 @return the new ForcedPlugin subclass 300 The needsMetadata, hasMeasureN, and needsSchemaOnly arguments combine to determine the expected 301 constructor signature; we always expect the first two arguments to be: 303 Control const & ctrl, std::string const & name 305 If needsSchemaOnly is True, then the third argument will be 309 otherwise, it will be: 311 SchemaMapper & schemaMapper 313 If needsMetadata, we also append: 315 PropertySet & metadata 317 If hasMeasureN, we also append: 321 If hasLogName, we also append: 325 If more than one is True, the metadata PropertySet precedes the doMeasureN bool 326 and the logName comes last of the three 329 def extractSchemaArg(m):
330 return m.editOutputSchema()
332 def extractSchemaArg(m):
336 def factory(config, name, schemaMapper, metadata, **kwargs):
337 return AlgClass(config.makeControl(), name, extractSchemaArg(schemaMapper),
338 metadata, config.doMeasureN, **kwargs)
340 def factory(config, name, schemaMapper, metadata, **kwargs):
341 return AlgClass(config.makeControl(), name, extractSchemaArg(schemaMapper),
342 config.doMeasureN, **kwargs)
345 def factory(config, name, schemaMapper, metadata, **kwargs):
346 return AlgClass(config.makeControl(), name, extractSchemaArg(schemaMapper),
349 def factory(config, name, schemaMapper, metadata, **kwargs):
350 return AlgClass(config.makeControl(), name, extractSchemaArg(schemaMapper), **kwargs)
352 return wrapAlgorithm(WrappedForcedPlugin, AlgClass, executionOrder=executionOrder, name=name,
353 factory=factory, hasLogName=hasLogName, **kwds)
356 def wrapSimpleAlgorithm(AlgClass, executionOrder, name=None, needsMetadata=False, hasMeasureN=False,
357 hasLogName=False, **kwds):
359 Wrap a C++ SimpleAlgorithm class into both a Python SingleFramePlugin and ForcedPlugin classes 361 @param[in] AlgClass Swigged C++ Algorithm class to convert; must be a subclass of 362 simpleAlgorithm, or an unrelated class with the same measure(), measureN(), 363 and fail() signatures. 364 @param[in] executionOrder The order this plugin should be run, relative to others 365 (see BasePlugin.getExecutionOrder()). 366 @param[in] name String to use when registering the algorithm. Ignored if doRegistry=False, 367 set to generateAlgorithmName(AlgClass) if None. 368 @param[in] needsMetadata Sets whether the AlgClass's constructor should be passed a PropertySet 370 @param[in] hasMeasureN Whether the algorithm supports simultaneous measurement of multiple sources. 371 If True, a bool doMeasureN field will be added to the generated Config class, 372 and its value will be passed as the last argument when calling the AlgClass 374 @param[in] hasLogName Plugin supports a logName as a constructor argument 375 @param[in] **kwds Additional keyword arguments passed to the lower-level wrapAlgorithm and 376 wrapAlgorithmControl classes. These include: 377 - Control: Swigged C++ Control class for the algorithm; AlgClass.Control 378 is used if None. Ignored if ConfigClass is not None. 379 - ConfigClass: Python Config class that wraps the C++ Algorithm's swigged 380 Control class. If None, wrapAlgorithmControl is called to generate a 381 Config class using the Control argument. 382 - doRegister: If True (the default), register the plugins with Base's 383 registry, allowing it to be used by measurement Tasks. 384 - shouldApCorr: does this algorithm measure a instFlux that can be aperture 385 corrected? This is shorthand for apCorrList=[name] and is ignored if 386 apCorrList is specified. 387 - apCorrList: list of field name prefixes for instFlux fields that should be 388 aperture corrected. If an algorithm produces a single instFlux that should be 389 aperture corrected then it is simpler to set shouldApCorr=True. But if an 390 algorithm produces multiple such fields then it must specify apCorrList, 391 instead. For example modelfit_CModel produces 3 such fields: apCorrList= 392 ("modelfit_CModel_exp", "modelfit_CModel_exp", "modelfit_CModel_def") 393 If apCorrList is non-empty then shouldApCorr is ignored. 394 If non-empty and doRegister is True then the names are added to the set 395 retrieved by getApCorrNameSet 396 - executionOrder: If not None, an override for the default executionOrder for 397 this plugin (the default is 2.0, which is usually appropriate for fluxes). 399 @return a two-element tuple, containing the new SingleFramePlugin and ForcedPlugin subclasses 401 The needsMetadata and hasMeasureN arguments combine to determine the expected constructor signature; 402 we always expect the first three arguments to be: 404 Control const & ctrl, std::string const & name, Schema & schema 406 If needsMetadata, we also append: 408 PropertySet & metadata 410 If hasMeasureN, we also append: 414 If hasLogName, we also append: 418 If more than one is True, the metadata PropertySet precedes the doMeasureN bool 419 and the logName comes last of the three 422 needsMetadata=needsMetadata, hasLogName=hasLogName, **kwds),
424 needsMetadata=needsMetadata, hasLogName=hasLogName,
425 needsSchemaOnly=
True, **kwds))
429 """Modify a C++ Transform class so that it can be configured with either a Config or a Control. 433 transformClass: class 434 A Transform class. Its constructor must take a Control, a string, and 435 a SchemaMapper, in that order. 437 oldInit = transformClass.__init__
439 def _init(self, ctrl, name, mapper, logName=None):
440 if hasattr(ctrl,
"makeControl"):
441 ctrl = ctrl.makeControl()
443 oldInit(self, ctrl, name, mapper)
445 transformClass.__init__ = _init
449 """Abstract base class for a generic plugin 451 A generic plugin can be used with the `singleFramePluginFromGeneric` 452 and/or `forcedPluginFromGeneric` wrappers to create classes that can 453 be used for single frame measurement and/or forced measurement (as 454 appropriate). The only real difference between `SingleFramePlugin` 455 and `ForcedPlugin` is the `measure` method; this class introduces 456 a shared signature for the `measure` method that, in combination 457 with the afore-mentioned wrappers, allows both plugin styles to 458 share a single implementation. 460 This doesn't use abc.ABCMeta because I couldn't get it to work 463 Sub-classes should set `ConfigClass` and implement the `measure` 464 and `measureN` methods. They may optionally provide alternative 465 implementations for the `__init__`, `fail` and `getExecutionOrder` 468 Constructor parameters 469 ---------------------- 470 config : `lsst.pex.config.Config` 471 An instance of this class' ConfigClass. 473 Name of this measurement plguin, for registering. 474 schema : `lsst.afw.table.Schema` 475 The catalog schema. New fields should be added here to 476 hold measurements produced by this plugin. 477 metadata : `lsst.daf.base.PropertySet` 478 Metadata that will be attached to the output catalog. 480 Name of log component. 488 def __init__(self, config, name, schema, metadata, logName=None):
491 This default implementation simply adds a field for recording 492 a fatal failure of the measurement plugin. 494 BasePlugin.__init__(self, config, name, logName=logName)
495 self.
_failKey = schema.addField(name +
'_flag', type=
"Flag", doc=
"Set for any fatal failure")
497 def measure(self, measRecord, exposure, center):
500 It is the responsibility of this method to perform the desired 501 measurement and record the result in the `measRecord`. 505 measRecord : `lsst.afw.table.SourceRecord` 506 Catalog record for the source being measured. 507 exposure : `lsst.afw.image.Exposure` 508 Exposure on which the source is being measured. 509 center : `lsst.geom.Point2D` 510 Pixel coordinates of the object. 515 If the measurement fails for a known/justifiable reason. 517 raise NotImplementedError()
519 def measureN(self, measCat, exposure, refCat, refWcs):
520 """Measure multiple sources 522 It is the responsibility of this method to perform the desired 523 measurement and record the result in the `measCat`. 527 measCat : `lsst.afw.table.SourceCatalog` 528 Catalog for the sources being measured. 529 exposure : `lsst.afw.image.Exposure` 530 Exposure on which the source is being measured. 531 refCat : `lsst.afw.table.SourceCatalog` 533 refWcs : `lsst.afw.image.Wcs` 534 Astrometric solution for the reference image. 539 If the measurement fails for a known/justifiable reason. 541 raise NotImplementedError()
543 def fail(self, measRecord, error=None):
546 This default implementation simply records the failure 547 in the source record. 551 measRecord : `lsst.afw.table.SourceRecord` 552 Catalog record for the source being measured. 554 Error causing failure, or `None`. 560 """Produce a SingleFramePlugin sub-class from this GenericPlugin class 562 The class is also registered. 567 Name of plugin to register. 574 ConfigClass = SingleFrameFromGenericConfig
576 def __init__(self, config, name, schema, metadata, logName=None):
577 SingleFramePlugin.__init__(self, config, name, schema, metadata, logName=logName)
578 self.
_generic = cls(config, name, schema, metadata)
580 def measure(self, measRecord, exposure):
581 center = measRecord.getCentroid()
584 def measureN(self, measCat, exposure, refCat, refWcs):
587 def fail(self, measRecord, error=None):
588 self.
_generic.
fail(measRecord, error
if error
is not None else None)
597 return SingleFrameFromGenericPlugin
601 """Produce a ForcedPlugin sub-class from this GenericPlugin class 603 The class is also registered. 608 Name of plugin to register. 615 ConfigClass = ForcedFromGenericConfig
617 def __init__(self, config, name, schemaMapper, metadata, logName=None):
618 ForcedPlugin.__init__(self, config, name, schemaMapper, metadata, logName=logName)
619 schema = schemaMapper.editOutputSchema()
620 self.
_generic = cls(config, name, schema, metadata)
622 def measure(self, measRecord, exposure, refRecord, refWcs):
623 center = exposure.getWcs().skyToPixel(refWcs.pixelToSky(refRecord.getCentroid()))
626 def measureN(self, measCat, exposure, refCat, refWcs):
629 def fail(self, measRecord, error=None):
630 self.
_generic.
fail(measRecord, error
if error
is not None else None)
639 return ForcedFromGenericPlugin
def measureN(self, measCat, exposure, refCat, refWcs)
def makeSingleFramePlugin(cls, name)
def fail(self, measRecord, error=None)
def generateAlgorithmName(AlgClass)
def wrapForcedAlgorithm(AlgClass, executionOrder, name=None, needsMetadata=False, hasMeasureN=False, needsSchemaOnly=False, hasLogName=False, kwds)
Wrap a C++ ForcedAlgorithm class into a Python ForcedPlugin class.
def getExecutionOrder(cls)
Base class for configs of single-frame plugin algorithms.
def addApCorrName(name)
Add to the set of field name prefixes for instrument flux that should be aperture corrected...
def measure(self, measRecord, exposure)
Base class for single-frame plugin algorithms.
Base class for measurement plugins.
def __init__(self, config, name, schema, metadata, logName=None)
def fail(self, measRecord, error=None)
def getExecutionOrder(cls)
def getTransformClass()
Get the measurement transformation appropriate to this plugin.
def measureN(self, measCat, exposure)
def __init__(self, config, name, schemaMapper, metadata, logName=None)
def measure(self, measRecord, exposure, refRecord, refWcs)
def wrapAlgorithm(Base, AlgClass, factory, executionOrder, name=None, Control=None, ConfigClass=None, TransformClass=None, doRegister=True, shouldApCorr=False, apCorrList=(), hasLogName=False, kwds)
Wrap a C++ Algorithm class into a Python Plugin class.
def wrapTransform(transformClass, hasLogName=False)
def __init__(self, config, name, schema, metadata, logName=None)
def measure(self, measRecord, exposure, center)
def measureN(self, measCat, exposure, refCat, refWcs)
def makeForcedPlugin(cls, name)
def wrapSingleFrameAlgorithm(AlgClass, executionOrder, name=None, needsMetadata=False, hasMeasureN=False, hasLogName=False, kwds)
Wrap a C++ SingleFrameAlgorithm class into a Python SingleFramePlugin class.
def wrapAlgorithmControl(Base, Control, module=2, hasMeasureN=False)
Wrap a C++ algorithm's control class into a Python Config class.
def wrapSimpleAlgorithm(AlgClass, executionOrder, name=None, needsMetadata=False, hasMeasureN=False, hasLogName=False, kwds)
Wrap a C++ SimpleAlgorithm class into both a Python SingleFramePlugin and ForcedPlugin classes...
def fail(self, measRecord, error=None)