How to use the ophyd.areadetector.plugins function in ophyd

To help you get started, we’ve selected a few ophyd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bluesky / ophyd / ophyd / areadetector / common_plugins.py View on Github external
plugins.AttributePlugin),
                          'attr')
    _make_common_numbered(f'CommonROIStatPlugin_V{ver_string}',
                          version,
                          plugins.ROIStatNPlugin, (CommonROIStatPlugin,
                                                   plugins.ROIStatPlugin),
                          'attr')

    _make_common_gather(f'CommonGatherPlugin_V{ver_string}', version)


all_plugins = [
    ('attr1', CommonAttributePlugin, 'Attr1:'),
    ('cb1', plugins.CircularBuffPlugin, 'CB1:'),
    ('cc1', plugins.ColorConvPlugin, 'CC1:'),
    ('cc2', plugins.ColorConvPlugin, 'CC2:'),
    ('codec1', plugins.CodecPlugin, 'Codec1:'),
    ('codec2', plugins.CodecPlugin, 'Codec2:'),
    ('fft1', plugins.FFTPlugin, 'FFT1:'),
    ('gather1', CommonGatherPlugin, 'Gather1:'),
    ('hdf1', plugins.HDF5Plugin, 'HDF1:'),
    ('jpeg1', plugins.JPEGPlugin, 'JPEG1:'),
    ('magick1', plugins.MagickPlugin, 'Magick1:'),
    ('netcdf1', plugins.NetCDFPlugin, 'netCDF1:'),
    ('nexus1', plugins.NexusPlugin, 'Nexus1:'),
    ('over1', CommonOverlayPlugin, 'Over1:'),
    ('proc1', plugins.ProcessPlugin, 'Proc1:'),
    ('proc1_tiff', plugins.TIFFPlugin, 'Proc1:TIFF:'),
    ('roi1', plugins.ROIPlugin, 'ROI1:'),
    ('roi2', plugins.ROIPlugin, 'ROI2:'),
    ('roi3', plugins.ROIPlugin, 'ROI3:'),
    ('roi4', plugins.ROIPlugin, 'ROI4:'),
github bluesky / ophyd / ophyd / areadetector / common_plugins.py View on Github external
def _make_common_gather(clsname, version):
    base_cls_base = plugins.GatherPlugin
    cpt_cls_base = plugins.GatherNPlugin

    try:
        cpt_cls = select_version(cpt_cls_base, version)
    except ValueError:
        return

    bases = (CommonGatherPlugin, ) + _get_bases(base_cls_base, version)

    return create_device_from_components(
        name=clsname,
        base_class=bases,
        class_kwargs={
            'version_of': CommonGatherPlugin,
            'version': version},
        **{f'gather_{j}': Cpt(cpt_cls, '', index=j)
           for j in range(1, 9)}
github bluesky / ophyd / ophyd / areadetector / common_plugins.py View on Github external
for version in versions:
    ver_string = "".join(str(_) for _ in version)
    _make_common_numbered(f'CommonOverlayPlugin_V{ver_string}',
                          version,
                          plugins.Overlay, (CommonOverlayPlugin,
                                            plugins.OverlayPlugin,),
                          'overlay')
    _make_common_numbered(f'CommonAttributePlugin_V{ver_string}',
                          version,
                          plugins.AttributeNPlugin, (CommonAttributePlugin,
                                                     plugins.AttributePlugin),
                          'attr')
    _make_common_numbered(f'CommonROIStatPlugin_V{ver_string}',
                          version,
                          plugins.ROIStatNPlugin, (CommonROIStatPlugin,
                                                   plugins.ROIStatPlugin),
                          'attr')

    _make_common_gather(f'CommonGatherPlugin_V{ver_string}', version)


all_plugins = [
    ('attr1', CommonAttributePlugin, 'Attr1:'),
    ('cb1', plugins.CircularBuffPlugin, 'CB1:'),
    ('cc1', plugins.ColorConvPlugin, 'CC1:'),
    ('cc2', plugins.ColorConvPlugin, 'CC2:'),
    ('codec1', plugins.CodecPlugin, 'Codec1:'),
    ('codec2', plugins.CodecPlugin, 'Codec2:'),
    ('fft1', plugins.FFTPlugin, 'FFT1:'),
    ('gather1', CommonGatherPlugin, 'Gather1:'),
    ('hdf1', plugins.HDF5Plugin, 'HDF1:'),
github bluesky / ophyd / ophyd / areadetector / common_plugins.py View on Github external
_make_common_gather(f'CommonGatherPlugin_V{ver_string}', version)


all_plugins = [
    ('attr1', CommonAttributePlugin, 'Attr1:'),
    ('cb1', plugins.CircularBuffPlugin, 'CB1:'),
    ('cc1', plugins.ColorConvPlugin, 'CC1:'),
    ('cc2', plugins.ColorConvPlugin, 'CC2:'),
    ('codec1', plugins.CodecPlugin, 'Codec1:'),
    ('codec2', plugins.CodecPlugin, 'Codec2:'),
    ('fft1', plugins.FFTPlugin, 'FFT1:'),
    ('gather1', CommonGatherPlugin, 'Gather1:'),
    ('hdf1', plugins.HDF5Plugin, 'HDF1:'),
    ('jpeg1', plugins.JPEGPlugin, 'JPEG1:'),
    ('magick1', plugins.MagickPlugin, 'Magick1:'),
    ('netcdf1', plugins.NetCDFPlugin, 'netCDF1:'),
    ('nexus1', plugins.NexusPlugin, 'Nexus1:'),
    ('over1', CommonOverlayPlugin, 'Over1:'),
    ('proc1', plugins.ProcessPlugin, 'Proc1:'),
    ('proc1_tiff', plugins.TIFFPlugin, 'Proc1:TIFF:'),
    ('roi1', plugins.ROIPlugin, 'ROI1:'),
    ('roi2', plugins.ROIPlugin, 'ROI2:'),
    ('roi3', plugins.ROIPlugin, 'ROI3:'),
    ('roi4', plugins.ROIPlugin, 'ROI4:'),
    ('roistat1', CommonROIStatPlugin, 'ROIStat1:'),
    ('scatter1', plugins.ScatterPlugin, 'Scatter1:'),
    ('stats1', plugins.StatsPlugin, 'Stats1:'),
    ('stats1_ts', plugins.TimeSeriesPlugin, 'Stats1:TS:'),
    ('stats2', plugins.StatsPlugin, 'Stats2:'),
    ('stats2_ts', plugins.TimeSeriesPlugin, 'Stats2:TS:'),
    ('stats3', plugins.StatsPlugin, 'Stats3:'),
github bluesky / ophyd / ophyd / areadetector / common_plugins.py View on Github external
def _get_bases(cls, version):
    mixin_cls = select_version(cls, version)
    base_cls = select_version(plugins.PluginBase, version)
    if issubclass(mixin_cls, base_cls):
        return (mixin_cls, )

    return (mixin_cls, base_cls)
github bluesky / ophyd / ophyd / areadetector / common_plugins.py View on Github external
('roi3', plugins.ROIPlugin, 'ROI3:'),
    ('roi4', plugins.ROIPlugin, 'ROI4:'),
    ('roistat1', CommonROIStatPlugin, 'ROIStat1:'),
    ('scatter1', plugins.ScatterPlugin, 'Scatter1:'),
    ('stats1', plugins.StatsPlugin, 'Stats1:'),
    ('stats1_ts', plugins.TimeSeriesPlugin, 'Stats1:TS:'),
    ('stats2', plugins.StatsPlugin, 'Stats2:'),
    ('stats2_ts', plugins.TimeSeriesPlugin, 'Stats2:TS:'),
    ('stats3', plugins.StatsPlugin, 'Stats3:'),
    ('stats3_ts', plugins.TimeSeriesPlugin, 'Stats3:TS:'),
    ('stats4', plugins.StatsPlugin, 'Stats4:'),
    ('stats4_ts', plugins.TimeSeriesPlugin, 'Stats4:TS:'),
    ('stats5', plugins.StatsPlugin, 'Stats5:'),
    ('stats5_ts', plugins.TimeSeriesPlugin, 'Stats5:TS:'),
    ('tiff1', plugins.TIFFPlugin, 'TIFF1:'),
    ('trans1', plugins.TransformPlugin, 'Trans1:')
]


common_plugins = {}


for version in versions:
    local_plugins = {}
    for attr, cls, suffix in all_plugins:
        if attr == 'magick1' and version > (3, 0):
            continue
        elif attr.endswith('_ts') and version < (3, 3):
            continue
        elif attr == 'fft1' and version < (3, 0):
            continue
        elif attr == 'proc1_tiff' and version < (3, 3):
github bluesky / ophyd / ophyd / areadetector / common_plugins.py View on Github external
version,
                          plugins.AttributeNPlugin, (CommonAttributePlugin,
                                                     plugins.AttributePlugin),
                          'attr')
    _make_common_numbered(f'CommonROIStatPlugin_V{ver_string}',
                          version,
                          plugins.ROIStatNPlugin, (CommonROIStatPlugin,
                                                   plugins.ROIStatPlugin),
                          'attr')

    _make_common_gather(f'CommonGatherPlugin_V{ver_string}', version)


all_plugins = [
    ('attr1', CommonAttributePlugin, 'Attr1:'),
    ('cb1', plugins.CircularBuffPlugin, 'CB1:'),
    ('cc1', plugins.ColorConvPlugin, 'CC1:'),
    ('cc2', plugins.ColorConvPlugin, 'CC2:'),
    ('codec1', plugins.CodecPlugin, 'Codec1:'),
    ('codec2', plugins.CodecPlugin, 'Codec2:'),
    ('fft1', plugins.FFTPlugin, 'FFT1:'),
    ('gather1', CommonGatherPlugin, 'Gather1:'),
    ('hdf1', plugins.HDF5Plugin, 'HDF1:'),
    ('jpeg1', plugins.JPEGPlugin, 'JPEG1:'),
    ('magick1', plugins.MagickPlugin, 'Magick1:'),
    ('netcdf1', plugins.NetCDFPlugin, 'netCDF1:'),
    ('nexus1', plugins.NexusPlugin, 'Nexus1:'),
    ('over1', CommonOverlayPlugin, 'Over1:'),
    ('proc1', plugins.ProcessPlugin, 'Proc1:'),
    ('proc1_tiff', plugins.TIFFPlugin, 'Proc1:TIFF:'),
    ('roi1', plugins.ROIPlugin, 'ROI1:'),
    ('roi2', plugins.ROIPlugin, 'ROI2:'),
github bluesky / ophyd / ophyd / areadetector / common_plugins.py View on Github external
(2, 4),
            (2, 5),
            (2, 6),
            (3, 1),
            (3, 2),
            (3, 3),
            (3, 4)
            ]


for version in versions:
    ver_string = "".join(str(_) for _ in version)
    _make_common_numbered(f'CommonOverlayPlugin_V{ver_string}',
                          version,
                          plugins.Overlay, (CommonOverlayPlugin,
                                            plugins.OverlayPlugin,),
                          'overlay')
    _make_common_numbered(f'CommonAttributePlugin_V{ver_string}',
                          version,
                          plugins.AttributeNPlugin, (CommonAttributePlugin,
                                                     plugins.AttributePlugin),
                          'attr')
    _make_common_numbered(f'CommonROIStatPlugin_V{ver_string}',
                          version,
                          plugins.ROIStatNPlugin, (CommonROIStatPlugin,
                                                   plugins.ROIStatPlugin),
                          'attr')

    _make_common_gather(f'CommonGatherPlugin_V{ver_string}', version)


all_plugins = [
github bluesky / ophyd / ophyd / areadetector / common_plugins.py View on Github external
'attr')

    _make_common_gather(f'CommonGatherPlugin_V{ver_string}', version)


all_plugins = [
    ('attr1', CommonAttributePlugin, 'Attr1:'),
    ('cb1', plugins.CircularBuffPlugin, 'CB1:'),
    ('cc1', plugins.ColorConvPlugin, 'CC1:'),
    ('cc2', plugins.ColorConvPlugin, 'CC2:'),
    ('codec1', plugins.CodecPlugin, 'Codec1:'),
    ('codec2', plugins.CodecPlugin, 'Codec2:'),
    ('fft1', plugins.FFTPlugin, 'FFT1:'),
    ('gather1', CommonGatherPlugin, 'Gather1:'),
    ('hdf1', plugins.HDF5Plugin, 'HDF1:'),
    ('jpeg1', plugins.JPEGPlugin, 'JPEG1:'),
    ('magick1', plugins.MagickPlugin, 'Magick1:'),
    ('netcdf1', plugins.NetCDFPlugin, 'netCDF1:'),
    ('nexus1', plugins.NexusPlugin, 'Nexus1:'),
    ('over1', CommonOverlayPlugin, 'Over1:'),
    ('proc1', plugins.ProcessPlugin, 'Proc1:'),
    ('proc1_tiff', plugins.TIFFPlugin, 'Proc1:TIFF:'),
    ('roi1', plugins.ROIPlugin, 'ROI1:'),
    ('roi2', plugins.ROIPlugin, 'ROI2:'),
    ('roi3', plugins.ROIPlugin, 'ROI3:'),
    ('roi4', plugins.ROIPlugin, 'ROI4:'),
    ('roistat1', CommonROIStatPlugin, 'ROIStat1:'),
    ('scatter1', plugins.ScatterPlugin, 'Scatter1:'),
    ('stats1', plugins.StatsPlugin, 'Stats1:'),
    ('stats1_ts', plugins.TimeSeriesPlugin, 'Stats1:TS:'),
    ('stats2', plugins.StatsPlugin, 'Stats2:'),
    ('stats2_ts', plugins.TimeSeriesPlugin, 'Stats2:TS:'),
github bluesky / ophyd / ophyd / areadetector / common_plugins.py View on Github external
('roi2', plugins.ROIPlugin, 'ROI2:'),
    ('roi3', plugins.ROIPlugin, 'ROI3:'),
    ('roi4', plugins.ROIPlugin, 'ROI4:'),
    ('roistat1', CommonROIStatPlugin, 'ROIStat1:'),
    ('scatter1', plugins.ScatterPlugin, 'Scatter1:'),
    ('stats1', plugins.StatsPlugin, 'Stats1:'),
    ('stats1_ts', plugins.TimeSeriesPlugin, 'Stats1:TS:'),
    ('stats2', plugins.StatsPlugin, 'Stats2:'),
    ('stats2_ts', plugins.TimeSeriesPlugin, 'Stats2:TS:'),
    ('stats3', plugins.StatsPlugin, 'Stats3:'),
    ('stats3_ts', plugins.TimeSeriesPlugin, 'Stats3:TS:'),
    ('stats4', plugins.StatsPlugin, 'Stats4:'),
    ('stats4_ts', plugins.TimeSeriesPlugin, 'Stats4:TS:'),
    ('stats5', plugins.StatsPlugin, 'Stats5:'),
    ('stats5_ts', plugins.TimeSeriesPlugin, 'Stats5:TS:'),
    ('tiff1', plugins.TIFFPlugin, 'TIFF1:'),
    ('trans1', plugins.TransformPlugin, 'Trans1:')
]


common_plugins = {}


for version in versions:
    local_plugins = {}
    for attr, cls, suffix in all_plugins:
        if attr == 'magick1' and version > (3, 0):
            continue
        elif attr.endswith('_ts') and version < (3, 3):
            continue
        elif attr == 'fft1' and version < (3, 0):
            continue