Esempio n. 1
0
    def __init__(self):
        self.imageview = XArrayView()

        self.stages = {
            'Viewer': GUILayout(self.imageview),
        }

        super(CatalogViewerPlugin, self).__init__()
    def __init__(self):
        self.imageview = XArrayView()

        self.stages = {
            "Stage 1": GUILayout(self.imageview),
        }

        super(TestPlugin, self).__init__()
Esempio n. 3
0
def test_xarrayview(qtbot):
    from xicam.gui.widgets.imageviewmixins import XArrayView
    from xarray import DataArray
    import numpy as np

    data = np.random.random((
        100,
        10,
        10,
    ))
    xdata = DataArray(data,
                      dims=['E (eV)', 'y (μm)', 'x (μm)'],
                      coords=[
                          np.arange(100) * 100,
                          np.arange(10) / 10.,
                          np.arange(10) / 10.
                      ])

    w = XArrayView()

    w.setImage(xdata)

    w.show()