A decorator to register a plugin class in its base class's registry.
Parameters
----------
shouldApCorr : `bool`
If `True`, then this algorithm measures an instFlux that should be
aperture corrected. This is shorthand for ``apCorrList=[name]`` and is
ignored if ``apCorrList`` is specified.
apCorrList : `list` of `str`
List of field name prefixes for instFlux fields to be aperture
corrected. If an algorithm produces a single instFlux that should be
aperture corrected then it is simpler to set ``shouldApCorr=True``.
But if an algorithm produces multiple such fields then it must specify
``apCorrList`` instead. For example, ``modelfit_CModel`` produces
three such fields: ``apCorrList=("modelfit_CModel_exp",
"modelfit_CModel_exp", "modelfit_CModel_def")``. If ``apCorrList`` is
not empty then shouldApCorr is ignored.
Definition at line 163 of file pluginRegistry.py.
163 def register(name, shouldApCorr=False, apCorrList=()):
164 """A decorator to register a plugin class in its base class's registry. 168 shouldApCorr : `bool` 169 If `True`, then this algorithm measures an instFlux that should be 170 aperture corrected. This is shorthand for ``apCorrList=[name]`` and is 171 ignored if ``apCorrList`` is specified. 172 apCorrList : `list` of `str` 173 List of field name prefixes for instFlux fields to be aperture 174 corrected. If an algorithm produces a single instFlux that should be 175 aperture corrected then it is simpler to set ``shouldApCorr=True``. 176 But if an algorithm produces multiple such fields then it must specify 177 ``apCorrList`` instead. For example, ``modelfit_CModel`` produces 178 three such fields: ``apCorrList=("modelfit_CModel_exp", 179 "modelfit_CModel_exp", "modelfit_CModel_def")``. If ``apCorrList`` is 180 not empty then shouldApCorr is ignored. 184 def decorate(PluginClass):
185 PluginClass.registry.register(name, PluginClass, shouldApCorr=shouldApCorr, apCorrList=apCorrList)
def register(name, shouldApCorr=False, apCorrList=())