wrapAlgorithm¶
- 
lsst.meas.base.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 to create a measurement plugin. - Parameters: - Base : SingleFramePluginorForcedPlugin
- Base class for the returned Plugin. 
- AlgClass : API compatible with SingleFrameAlgorithmorForcedAlgorithm
- C++ algorithm class to convert. May either derive directly from - SingleFrameAlgorithmor- ForcedAlgorithm, or be an unrelated class which has the same- measureand- measureNsignatures.
- factory : callable
- A callable that is used to construct an instance of - AlgClass. It must take four arguments, either- (config, name, schema, metadata)or- (config, name, schemaMapper, metadata), depending on whether the algorithm is single-frame or forced.
- executionOrder : float
- The order this plugin should be run, relative to others (see - BasePlugin.getExecutionOrder).
- name : str, optional
- String to use when registering the algorithm. Ignored if - doRegistry=False, set to- generateAlgorithmName(AlgClass)if- None.
- Control : Pybind11-wrapped version of a C++ class, optional
- Pybind11-wrapped C++ Control class for the algorithm; - AlgClass.Controlis used if- None. Ignored if- ConfigClassis not- None.
- ConfigClass : subclass of BaseMeasurementPluginConfig
- Python config class that wraps the C++ algorithm’s pybind11-wrapped Control class. If - None,- wrapAlgorithmControlis called to generate a Config class using the- Controlargument.
- TransformClass : subclass of MeasurementTransform, optional
- Transformation which may be used to post-process the results of measurement. If - None, the default defined by- BasePluginis used.
- doRegister : bool, optional
- If - True(the default), register the plugin with- Base’s registry, allowing it to be used by measurement tasks.
- shouldApCorr : bool, optional
- Does this algorithm measure an instFlux that can be aperture corrected? This is shorthand for - apCorrList=[name]and is ignored if- apCorrListis specified.
- apCorrList : iterable of str, optional
- Field name prefixes for instFlux fields to be aperture corrected. If an algorithm measures a single instFlux that should be aperture corrected, then it is simpler to set - shouldApCorr=True. However, if an algorithm produces multiple such fields, then specify- apCorrListinstead. For example,- modelfit_CModelproduces three such fields:- apCorrList= ("modelfit_CModel_exp", "modelfit_CModel_exp", "modelfit_CModel_def")If- apCorrListis not empty then- shouldApCorris ignored. If non-empty and- doRegisteris- Truethen the names are added to the set retrieved by- getApCorrNameSet.
- hasLogName : bool, optional
- Trueif the C++ algorithm supports- logNameas a constructor argument.
- **kwds
- Additional keyword arguments passed to generateAlgorithmControl, which may include: - hasMeasureN: Whether the plugin supports fitting multiple objects at once ;if so, a config option to enable/disable this will be added (- bool).
- executionOrder: If not- None, an override for the default execution order for this plugin (the default is- 2.0, which is usually appropriate for fluxes;- bool).
 
 - Returns: - PluginClass : subclass of Base
- The new plugin class. 
 
- Base :