FeatureMaps, ReverseCorrelation, MeasureResponseCommand, pattern_response,\ topo_metadata_fn, StorageHook, get_feature_preference from topo.base.projection import Projection from topo.base.sheet import Sheet from topo.base.sheetview import CFView from topo.misc.ipython import RunProgress from topo.misc import color from command import measure_cog CoG_spec = "Image.X CoG * Image.Y CoG * Image.BlueChannel" XYCoG = chain.instance(group='XYCoG', name='XYCoG', operations = [image_overlay.instance(spec=CoG_spec), factory.instance()]) Compositor.register(Compositor("Image.X CoG * Image.Y CoG", XYCoG, 'XYCoG', 'display')) import param from holoviews import RGB, ElementOperation from holoviews.operation.normalization import raster_normalization class colorizeHSV(ElementOperation): """ Given an Overlay consisting of two Image elements, colorize the data in the bottom Image with the data in the top Image using the HSV color space. """ group = param.String(default='ColorizedHSV', doc="""
return results from holoviews.core.options import Compositor from .analysis import toHCS #Default styles options = Store.options(backend='matplotlib') options.Image.Preference = Options('style', cmap='hsv') options.Image.Selectivity = Options('style', cmap='gray') options.Image.Activity = Options('style', cmap='gray') options.Image.Response = Options('style', cmap='gray') options.Image.FFT_Power = Options('style', cmap='gray') # Default channel definitions Compositor.register( Compositor('Image.Orientation_Preference * Image.Orientation_Selectivity', toHCS, 'OR PrefSel', mode='display', flipSC=True)) Compositor.register( Compositor('Image.Direction_Preference * Image.Direction_Selectivity', toHCS, 'DR PrefSel', mode='display', flipSC=True)) Compositor.register( Compositor('Image.Orientation_Preference * Image.Activity', toHCS, 'ORColoredResponse', mode='display', flipSC=True)) __all__ = [ "DistributionMatrix", "FullMatrix", "FeatureResponses",
from holoviews.operation import gridmatrix from .operation import regression from holoviews.plotting.bokeh import CurvePlot #unsure if necessary? class Regression(hv.Curve): group = param.String(default='Regression') class RegressionPlot(CurvePlot): """ RegressionPlot visualizes a distribution of values as a trend in time. """ Compositor.register( Compositor("Regression", regression, None, 'data', transfer_options=True, transfer_parameters=True, output_type=hv.Curve, backends=['bokeh', 'matplotlib'])) hv.Store.register({Regression: RegressionPlot}, 'bokeh') hv.Store.set_current_backend('bokeh')
topo_metadata_fn, StorageHook, get_feature_preference from topo.base.projection import Projection from topo.base.sheet import Sheet from topo.base.sheetview import CFView from topo.misc.ipython import RunProgress from topo.misc import color from command import measure_cog CoG_spec = "Image.X CoG * Image.Y CoG * Image.BlueChannel" XYCoG = chain.instance( group='XYCoG', name='XYCoG', operations=[image_overlay.instance(spec=CoG_spec), factory.instance()]) Compositor.register( Compositor("Image.X CoG * Image.Y CoG", XYCoG, 'XYCoG', 'display')) import param from holoviews import RGB, ElementOperation from holoviews.operation.normalization import raster_normalization class colorizeHSV(ElementOperation): """ Given an Overlay consisting of two Image elements, colorize the data in the bottom Image with the data in the top Image using the HSV color space. """ group = param.String(default='ColorizedHSV', doc="""
""" def _process(self, element, key=None): if isinstance(element, HexTiles): element = project_points._process(self, element) return hex_binning._process(self, element) compositor = Compositor("HexTiles", geo_hex_binning, None, 'data', output_type=HexTiles, transfer_options=True, transfer_parameters=True, backends=['bokeh']) Compositor.register(compositor) Store.register( { WMTS: TilePlot, Points: GeoPointPlot, Labels: GeoLabelsPlot, VectorField: GeoVectorFieldPlot, Polygons: GeoPolygonPlot, Contours: GeoContourPlot, Rectangles: GeoRectanglesPlot, Segments: GeoSegmentsPlot, Path: GeoPathPlot, Shape: GeoShapePlot, Image: GeoRasterPlot, RGB: GeoRGBPlot,
FeatureMaps, ReverseCorrelation, MeasureResponseCommand, pattern_response,\ topo_metadata_fn, StorageHook, get_feature_preference from topo.base.projection import Projection from topo.base.sheet import Sheet from topo.base.sheetview import CFView from topo.misc.ipython import RunProgress from topo.misc import color from command import measure_cog CoG_spec = "Image.X CoG * Image.Y CoG * Image.BlueChannel" XYCoG = chain.instance(group='XYCoG', name='XYCoG', operations = [image_overlay.instance(spec=CoG_spec), factory.instance()]) Compositor.register(Compositor("Image.X CoG * Image.Y CoG", XYCoG, 'XYCoG', 'display')) import param from holoviews import RGB, Image, ElementOperation from holoviews.operation.normalization import raster_normalization class colorizeHSV(ElementOperation): """ Given an Overlay consisting of two Image elements, colorize the data in the bottom Image with the data in the top Image using the HSV color space. """ group = param.String(default='ColorizedHSV', doc="""
_load_mpl() else: try: from . import mpl # noqa except ImportError: pass try: from . import bokeh # noqa except ImportError: pass Compositor.register( Compositor("LineContours", contours, None, 'data', transfer_options=True, transfer_parameters=True, output_type=Contours, backends=['bokeh', 'matplotlib'])) Compositor.register( Compositor("FilledContours", contours.instance(filled=True), None, 'data', transfer_options=True, transfer_parameters=True, output_type=Polygons, backends=['bokeh', 'matplotlib']))
def _load_mpl(): from . import mpl # noqa extension.register_backend_callback('matplotlib', _load_mpl) backends = Store.loaded_backends() if 'bokeh' in backends: _load_bokeh() if 'matplotlib' in backends: _load_mpl() else: try: from . import mpl # noqa except ImportError: pass try: from . import bokeh # noqa except ImportError: pass Compositor.register(Compositor("LineContours", contours, None, 'data', transfer_options=True, transfer_parameters=True, output_type=Contours, backends=['bokeh', 'matplotlib'])) Compositor.register(Compositor("FilledContours", contours.instance(filled=True), None, 'data', transfer_options=True, transfer_parameters=True, output_type=Polygons, backends=['bokeh', 'matplotlib']))
Applies hex binning by computing aggregates on a hexagonal grid. Should not be user facing as the returned element is not directly useable. """ def _process(self, element, key=None): if isinstance(element, HexTiles): element = project_points._process(self, element) return hex_binning._process(self, element) compositor = Compositor( "HexTiles", geo_hex_binning, None, 'data', output_type=HexTiles, transfer_options=True, transfer_parameters=True, backends=['bokeh'] ) Compositor.register(compositor) Store.register({WMTS: TilePlot, Points: GeoPointPlot, Labels: GeoLabelsPlot, VectorField: GeoVectorFieldPlot, Polygons: GeoPolygonPlot, Contours: GeoContourPlot, Path: GeoPathPlot, Shape: GeoShapePlot, Image: GeoRasterPlot, RGB: GeoRGBPlot, LineContours: LineContourPlot, FilledContours: FilledContourPlot, Feature: FeaturePlot,