|
lsst.pipe.tasks g1c91cc4c4e+408365e0d6
|
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.
example
-------
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
Definition at line 56 of file _plugins.py.
| None lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.__init__ | ( | self | ) |
Definition at line 86 of file _plugins.py.
| Generator[PLUGIN_TYPE, None, None] lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.channel | ( | self | ) |
Definition at line 91 of file _plugins.py.
| Generator[PLUGIN_TYPE, None, None] lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.full | ( | self | ) |
Definition at line 97 of file _plugins.py.
| Generator[PLUGIN_TYPE, None, None] lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.partial | ( | self | ) |
Definition at line 94 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.
Definition at line 100 of file _plugins.py.
|
protected |
Definition at line 89 of file _plugins.py.
|
protected |
Definition at line 87 of file _plugins.py.
|
protected |
Definition at line 88 of file _plugins.py.