lsst.pipe.tasks g0367fb37c2+2005edf657
Loading...
Searching...
No Matches
lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry Class Reference

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 = []
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

None lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.__init__ ( self)

Definition at line 86 of file _plugins.py.

Member Function Documentation

◆ channel()

Generator[PLUGIN_TYPE, None, None] lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.channel ( self)

Definition at line 91 of file _plugins.py.

◆ full()

Generator[PLUGIN_TYPE, None, None] lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.full ( self)

Definition at line 97 of file _plugins.py.

◆ partial()

Generator[PLUGIN_TYPE, None, None] lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry.partial ( self)

Definition at line 94 of file _plugins.py.

◆ register()

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.

Member Data Documentation

◆ _channel_values

lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry._channel_values = []
protected

Definition at line 89 of file _plugins.py.

◆ _full_values

lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry._full_values = []
protected

Definition at line 87 of file _plugins.py.

◆ _partial_values

lsst.pipe.tasks.prettyPictureMaker._plugins.PluginsRegistry._partial_values = []
protected

Definition at line 88 of file _plugins.py.


The documentation for this class was generated from the following file: