|
lsst.pipe.tasks g253578fa50+e0a50b457a
|
Public Member Functions | |
| None | __init__ (self) |
| Generator[PLUGIN_TYPE, None, None] | channel (self) |
| Generator[PLUGIN_TYPE, None, None] | partial (self) |
| Generator[PLUGIN_TYPE, None, None] | full (self) |
| Callable | register (self, float order, PluginType kind) |
Protected Attributes | |
| list | _full_values = [] |
| list | _partial_values = [] |
| list | _channel_values = [] |
A class to serve as a registry for all pretty picture manipulation plugins. This class should not be instantiated directly other than the one instantiation in this module. Examples -------- Using this registry to create a plugin would look somehting like the following. >>> @plugins.register(1, PluginType.PARTIAL) >>> def fixNoData( >>> image: NDArray, >>> mask: NDArray, >>> maskDict: Mapping[str, int] >>> ) -> NDArray: >>> m = (mask & 2 ** maskDict["NO_DATA"]).astype(bool) >>> for i in range(3): >>> image[:, :, i] = cv2.inpaint( >>> image[:, :, i].astype(np.float32), >>> m.astype(np.uint8), >>> 3, >>> cv2.INPAINT_TELEA >>> ).astype(image.dtype) >>> return image Parameters ---------- None
Definition at line 56 of file _plugins.py.
| None lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.__init__ | ( | self | ) |
Definition at line 90 of file _plugins.py.
| Generator[PLUGIN_TYPE, None, None] lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.channel | ( | self | ) |
Yield generators of channel plugins.
Returns
-------
gen : `~collections.abc.Iterator`
Generator of channel plugins.
Definition at line 95 of file _plugins.py.
| Generator[PLUGIN_TYPE, None, None] lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.full | ( | self | ) |
Yield generators of full plugins.
Returns
-------
gen : `~collections.abc.Iterator`
Generator of full plugins.
Definition at line 115 of file _plugins.py.
| Generator[PLUGIN_TYPE, None, None] lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.partial | ( | self | ) |
Yield generators of partial plugins.
Returns
-------
gen : `~collections.abc.Iterator`
Generator of partial plugins.
Definition at line 105 of file _plugins.py.
| Callable lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.register | ( | self, | |
| float | order, | ||
| PluginType | kind ) |
Register a plugin which is to be run when producing a
pretty picture.
Parameters
----------
order : `float`
This determines in what order plugins will be run. For
example, if plugin A specifies order 2, and plugin B
specifies order 1, and both are the same ``kind`` of
plugin type, plugin B will be run before plugin A.
kind : `PluginType`
This specifies what data the registered plugin expects
to run on, a channel, a partial image, or a full mosaic.
Returns
-------
wrapper : `Callable`
Decorator function for registering the plugin.
Definition at line 125 of file _plugins.py.
|
protected |
Definition at line 93 of file _plugins.py.
|
protected |
Definition at line 91 of file _plugins.py.
|
protected |
Definition at line 92 of file _plugins.py.