lavuelib package — LaVue 2.76.0 documentation

# lavuelib package

## Subpackages

- lavuelib.plugins package
  - lavuelib.plugins.filters module

## Submodules

## lavuelib.axesDialog module

detector axis widget

class `lavuelib.axesDialog.` `AxesDialog`(parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  detector axis widget class

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `accept`()

    updates class variables with the form content

  `createGUI`()

    create GUI

  `xposition`

    (`float`) x-coordinates of the first pixel

  `xscale`

    (`float`) x-scale of pixels

  `xtext`

    (`str`) text of x-axis

  `xunits`

    (`str`) units of x-axis

  `yposition`

    (`float`) y-coordinates of the first pixel

  `yscale`

    (`float`) y-scale of pixels

  `ytext`

    (`str`) text of y-axis

  `yunits`

    (`str`) units of y-axis

## lavuelib.bkgSubtractionWidget module

background subtraction widget

class `lavuelib.bkgSubtractionWidget.` `BkgSubtractionWidget`(parent=None, settings=None)

  Bases: `PyQt5.QtWidgets.QWidget`

  Define bkg image and subtract from displayed image.

  constructor

  Parameters

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

    - settings (`lavuelib.settings.Settings`) – lavue configuration settings

  `applyStateChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) apply state change signal

  `bkgFileSelected`

    (`pyqtgraph.QtCore.pyqtSignal`) bkg file selected signal

  `bkgScalingFactor`()

    provides background scaling factor

    Returns

      background scaling factor

    Return type

      `float`

  `bkgScalingFactorChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) bkg scaling factor change signal

  `checkBkgSubtraction`(state)

    unchecks apply CheckBox if state is 1 and it is checked and reset the display

    Parameters

      state (`int`) – checkbox state

  `isBkgSubApplied`()

    if background subtraction applied :returns: apply status :rtype: `bool`

  `setBackground`(fname)

    sets the image background

    Parameters

      fname (`str`) – file name

  `setBkgScalingFactor`(scale)

    sets the background scaling factor

    Parameters

      scale (`float` or `str`) – background scaling factor

  `setDisplayedName`(name)

    sets displayed file name

    Parameters

      name (`str`) – file name

  `showScalingFactors`(show=True)
  `useCurrentImageAsBkg`

    (`pyqtgraph.QtCore.pyqtSignal`) use current image signal

## lavuelib.channelGroupBox module

level widget

class `lavuelib.channelGroupBox.` `ChannelGroupBox`(parent=None, settings=None, expertmode=False)

  Bases: `PyQt5.QtWidgets.QWidget`

  Set minimum and maximum displayed values and its color.

  constructor

  Parameters

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

    - settings (`lavuelib.settings.Settings`) – lavue configuration settings

    - expertmode (`bool`) – expert mode flag

  `changeView`(showlevels=None)

    shows or hides the histogram widget

    Parameters

      showlevels (`bool`) – if levels should be shown

  `channelChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) color channel changed signal

  `channelLabel`()

    provides color channel label

    Returns

      color channel label

    Return type

      `str`

  `channelLabels`()

    provides channel labels

    Returns

      list of channel labels

    Return type

      `list` <`str`>

  `colorChannel`()

    provides color channel

    Returns

      color channel

    Return type

      `int`

  `rgbChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) rgb color channel changed signal

  `rgbchannels`()
  `setChannel`(channel, force=False)

    sets color channel

    Parameters

      - channel (`int`) – color channel

      - force (`bool`) – force change

  `setChannelItemText`(iid, text)

    sets channel item text

    Parameters

      - iid (`str`) – label id

      - iid – label text

  `setDefaultColorChannel`(channel)

    sets default color channel

    Parameters

      channel (`int` or `int`) – default color channel(s)

  `setNumberOfChannels`(number)

    sets maximum number of color channel

    Parameters

      number (`int`) – number of color channel

  `showGradient`(status=True)

    resets color channel

    Parameters

      status (`bool`) – show gradient flag

  `updateBChannel`()

    update blue channel

  `updateChannelLabels`(chlabels=None)

    update channel labels

    Parameters

      chlabels (`dict` <`int` `str`>) – dictionary with channel labels

  `updateGChannel`()

    update green channel

  `updateRChannel`()

    update red channel

## lavuelib.commandThread module

command thread

class `lavuelib.commandThread.` `CommandThread`(instance, commands, parent)

  Bases: `lavuelib.omniQThread.OmniQThread`

  thread which executes a list of commands

  thread contructor

  Parameters

    - instance (`instanceobj` or `type`) – command instance

    - commands (`list` <`str`>) – a list of commands

    - parent (`pyqtgraph.QtCore.QObject`) – thread parent object

  `commands`

    (`list` <`str`>) a list of commands

  `error`

    (`Exception`) error thrown by the executed command

  `finished`

    (`pyqtgraph.QtCore.pyqtSignal`) finished signal

  `instance`

    (`instanceobj` or `type`) command instance

`lavuelib.commandThread.` `logger` = <Logger lavuelib.commandThread (WARNING)>

  (`logging.Logger`) logger object

## lavuelib.configDialog module

configuration widget

class `lavuelib.configDialog.` `ConfigDialog`(parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `accelbuffersum`

    (`bool`) accelerate buffer sum

  `accept`()

    updates class variables with the form content

  `addrois`

    (`bool`) add rois enabled

  `asapobeamtime`

    (`str`) asapo beamtime id

  `asapodatasources`

    (`list` < `str` > ) asapo datasources

  `asaposerver`

    (`str`) asapo server

  `asaposourcepath`

    (`str`) asapo sourcepath

  `asapotoken`

    (`str`) asapo token

  `aspectlocked`

    (`bool`) aspect ratio locked

  `autodownsample`

    (`bool`) auto down sample

  `autozmqtopics`

    (`bool`) topics for ZMQ stream source fetched from the stream

  `availimagesources`

    (`str`) list with available image source widget names

  `availtoolwidgets`

    (`str`) list with available tool widget names

  `calcvariance`

    (`bool`) calculate variance

  `correctsolidangle`

    (`bool`) correct solid angle flag

  `createGUI`()

    create GUI

  `crosshairlocker`

    (`bool`) crosshair locker switched on

  `defdetservers`

    (`bool`) use default detector servers

  `detservers`

    (`str`) json hidra detector server list

  `diffnpt`

    (`int`) number of points for diffractogram

  `door`

    (`str`) device name of sardana door

  `eventFilter`(obj, event)

    event filter

    Parameters

      - obj – qt object

      - event – qt event

    Returns

      status flag

    Return type

      `bool`

  `filters`

    (`str`) json list with filters

  `floattype`

    (`str`) float type for pixel intensity

  `geometryfromsource`

    (`bool`) fetch geometry from source

  `gradientcolors`

    (`bool`) image channels shown with gradient colors

  `hidraport`

    (`str`) hidra data port

  `imagechannels`

    (`bool`) map image sources to color channels

  `imagesources`

    (`str`) json list with image source widget names

  `interruptonerror`

    (`bool`) interrupt on error

  `keepcoords`

    (`bool`) keep original coordinates

  `lazyimageslider`

    (`bool`) lazy image slider

  `maxmbuffersize`

    (`str`) maximal number of images in memory buffer

  `nanmask`

    (`bool`) nan mask enabled

  `negmask`

    (`bool`) adding maximal type value to negative high value mask

  `nrsources`

    (`int`) number of image sources

  `nxslast`

    (`bool`) nexus file source starts from the last image

  `nxsopen`

    (`bool`) nexus file source keeps the file open

  `orderrois`

    (`bool`) fetch rois order enabled

  `refreshrate`

    (`float`) refresh rate

  `roiscolors`

    (`str`) json list with rois colors

  `sardana`

    (`bool`) sardana enabled

  `secautoport`

    (`bool`) find security stream port automatically

  `secport`

    (`str`) security stream port

  `secstream`

    (`bool`) security stream enabled

  `sendresults`

    (`bool`) send results to LavueController flag

  `sendrois`

    (`bool`) send rois to LavueController flag

  `showaddhisto`

    (`bool`) show color distribution additional histogram widget

  `showallrois`

    (`bool`) show all rois flag

  `showfilters`

    (`bool`) show filter widget

  `showframerate`

    (`bool`) show frame rate widget

  `showhighvaluemask`

    (`bool`) show high value mask widget

  `showhisto`

    (`bool`) show color distribution histogram widget

  `showlevels`

    (`bool`) show intensity levels widget

  `showmask`

    (`bool`) show mask widget

  `showmbuffer`

    (`bool`) show memory buffer widget

  `shownorm`

    (`bool`) show image normalization widget

  `shownormsf`

    (`bool`) show image normalization scaling factor widget

  `showrange`

    (`bool`) show range window widget

  `showscale`

    (`bool`) show intensity scale widget

  `showstats`

    (`bool`) show statistics widget

  `showsteps`

    (`bool`) show image step widget

  `showsub`

    (`bool`) show bakcground subtraction widget

  `showsubsf`

    (`bool`) show bakcground subtraction scaling factor widget

  `showtrans`

    (`bool`) show transformation widget

  `singlerois`

    (`bool`) set roi1, roi2, roi3, … when alias names are missing

  `sourcedisplay`

    (`bool`) store display parameters for specific sources

  `statswoscaling`

    (`bool`) statistics without intensity scaling

  `storegeometry`

    (`bool`) store detector geometry

  `timeout`

    (`int`) image source timeout in ms

  `toolpollinginterval`

    (`float`) tool polling interval is s

  `toolrefreshtime`

    (`float`) tool refresh rate time is s

  `toolwidgets`

    (`str`) json list with tool widget names

  `zeromask`

    (`bool`) zero mask enabled

  `zmqtopics`

    (`list` < `str`>) list of topics for ZMQ stream source

class `lavuelib.configDialog.` `TableWidgetDragCheckBoxes`(parent)

  Bases: `PyQt5.QtWidgets.QTableWidget`

  TableWidget with drag and drop checkboxes

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `create`(selected, available, itemnames=None)

    populates table

    Parameters

      - selected (`list` < `str`>) – all selected aliases

      - available (`list` < `str`>) – all available aliases

      - itemnames (`dict` < `str`, `str`>) – dictionary of alias names

  `dropEvent`(event)

    replaces rows in the table

    Parameters

      event (`pyqtgraph.QtCore.QEvent`:) – drop event

  `getChecks`(available)

    update checks in checkboxdata

    Parameters

      available (`list` < `str`>) – all available aliases

    Returns

      all selected aliases

    Return type

      `list` < `str`>

## lavuelib.controllerClient module

tango lavue controller client

class `lavuelib.controllerClient.` `ControllerClient`(device)

  Bases: `PyQt5.QtCore.QObject`

  lavue controller client

  constructor

  Parameters

    device (`str`) – tango device name

  `beamCenterXChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) beam Center X changed signal

  `beamCenterYChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) beam Center Y changed signal

  `detectorDistanceChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) detector distance changed signal

  `detectorROIsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) detector ROIs changed signal

  `device`()

    provides tango device name

    Returns

      tango device name

    Return type

      `str`

  `energyChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) energy changed signal

  `lavueStateChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) lavueState changed signal

  `pixelSizeXChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) pixel Size X changed signal

  `pixelSizeYChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) pixel Size Y changed signal

  `subscribe`()

    subscribe callback methods

  `unsubscribe`()

    unsubscribe callback methods

  `writeAttribute`(name, value)

    writes attribute value of device

    Parameters

      - name (`str`) – attribute name

      - value (`any`) – attribute value

`lavuelib.controllerClient.` `TANGO` = True

  (`bool`) tango imported

class `lavuelib.controllerClient.` `TangoCB`(client, name, signal)

  Bases: `object`

  tango attribute callback class

  constructor

  Parameters

    - client (`str`) – tango controller client

    - name (`str`) – attribute name

    - signal (`pyqtgraph.QtCore.pyqtSignal`) – signal to emit

  `push_event`(*args, **kwargs)

    callback method receiving the event

## lavuelib.dataFetchThread module

data fetch thread

class `lavuelib.dataFetchThread.` `DataFetchThread`(datasource, alist)

  Bases: `lavuelib.omniQThread.OmniQThread`

  constructor

  Parameters

    - datasource (`lavuelib.imageSource.BaseSource`) – image source

    - alist (`ExchangeList`) – exchange object

  `changeStatus`(status)

    change connection status

    Parameters

      status (`bool`) – connection status

  `fetching`()

    provides read flag

  `isFetching`()

    is datasource source connected

    Returns

      if datasource source connected

    Return type

      `bool`

  `newDataNameFetched`

    (`pyqtgraph.QtCore.pyqtSignal`) new data name signal

  `ready`()

    continue acquisition

  `setDataSource`(datasource)

    sets datasource :param datasource: datasource object :type datasource: `lavuelib.imageSource.BaseSource`

  `stop`()

    stop the thread

class `lavuelib.dataFetchThread.` `ExchangeList`

  Bases: `object`

  subclass for data caching

  constructor

  `addData`(name, data, metadata='')

    write data into exchange object

    Parameters

      - name (`str`) – image name

      - data (`numpy.ndarray`) – image data

      - metadata (`str`) – json dictionary with image metadata

  `readData`()

    read data from exchange object

    Returns

      tuple of exchange object (name, data, metadata)

    Return type

      `list` <`str`, `numpy.ndarray`, `str` >

`lavuelib.dataFetchThread.` `GLOBALREFRESHRATE` = 0.1

  (`float`) refresh rate in seconds

## lavuelib.diffRangeDialog module

detector range widget

class `lavuelib.diffRangeDialog.` `DiffRangeTabDialog`(nranges=1, parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  diffractogram range widget class

  constructort

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `accept`()

    updates class variables with the form content

  `azend`

    (`float`) end position of azimuth angle

  `azstart`

    (`float`) start position of azimuth angle

  `createGUI`()

    create GUI

  `radend`

    (`float`) end position of radial coordinate

  `radstart`

    (`float`) start position of radial coordinate

  `radunitindex`

    (`int`) radial angle index

  `radunits`

    (`list` <`unicode`>) list of units

## lavuelib.displayExtensions module

image display widget

class `lavuelib.displayExtensions.` `BaseMarkExtension`(parent=None)

  Bases: `lavuelib.displayExtensions.DisplayExtension`

  base mark extension

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `name`

    (`str`) tool name

  `transpose`()

    transposes Mark Position lines

  `updatePositionMark`(xdata, ydata, scaled=False)

    updates the position mark

    Parameters

      - xdata (`float`) – x pixel position

      - ydata (`float`) – y-pixel position

      - scaled (`bool`) – scaled flag

class `lavuelib.displayExtensions.` `CenterExtension`(parent=None)

  Bases: `lavuelib.displayExtensions.DisplayExtension`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `mouse_doubleclick`(x, y, locked)

    sets vLine and hLine positions

    Parameters

      - x (float) – x coordinate

      - y (float) – y coordinate

      - locked (bool) – double click lock

  `mouse_position`(x, y)

    sets vLine and hLine positions

    Parameters

      - x (float) – x coordinate

      - y (float) – y coordinate

  `name`

    (`str`) tool name

  `show`(parameters)

    set subwidget properties

    Parameters

      parameters (`lavuelib.toolWidget.ToolParameters`) – tool parameters

  `transpose`()

    transposes Center lines

  `updateCenter`(xdata, ydata)

    updates the image center

    Parameters

      - xdata (`float`) – x pixel position

      - ydata (`float`) – y-pixel position

class `lavuelib.displayExtensions.` `CutExtension`(parent=None)

  Bases: `lavuelib.displayExtensions.DisplayExtension`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `changeCutRegion`(_=None)

    changes the current roi region

  `currentCut`()

    provides current cut id

    Returns

      cut id

    Return type

      `int`

  `cutCoords`()

    provides cuts coordinates

    Returns

      cuts coordinates

    Return type

      `list` < [`float`, `float`, `float`, `float`] >

  `cutCoordsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) cut coordinate changed signal

  `cutData`(cid=None)

    provides the current cut data

    Parameters

      cid (`int`) – cut id

    Returns

      current cut data

    Return type

      `numpy.ndarray`

  `isCutsEnabled`()

    provides flag cuts enabled

    Returns

      cut enabled flag

    Return type

      `bool`

  `name`

    (`str`) tool name

  `show`(parameters)

    set subwidget properties

    Parameters

      parameters (`lavuelib.toolWidget.ToolParameters`) – tool parameters

  `transpose`()

    transposes Cuts

  `updateCuts`(cid, coords)

    update Cuts

    Parameters

      - cid (`int`) – cut id

      - coords (`list` < [float, float, float, float] >) – cut coordinates

class `lavuelib.displayExtensions.` `DisplayExtension`(parent=None)

  Bases: `PyQt5.QtCore.QObject`

  display extension for ImageDisplayWidget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `coordinates`()

    returns coordinates

  `enabled`()

    is extension enabled

    Returns

      is extension enabled

    Return type

      `bool`

  `mouse_click`(x, y)

    sets vLine and hLine positions

    Parameters

      - x (float) – x coordinate

      - y (float) – y coordinate

  `mouse_doubleclick`(x, y, locked)

    sets vLine and hLine positions

    Parameters

      - x (float) – x coordinate

      - y (float) – y coordinate

      - locked (bool) – double click lock

  `mouse_position`(x, y)

    sets vLine and hLine positions

    Parameters

      - x (float) – x coordinate

      - y (float) – y coordinate

  `name`

    (`str`) extension name

  `refreshTime`()

    provides refresh time

    Returns

      refresh time in seconds

    Return type

      `float`

  `scalingLabel`()

    provides scaling label

    Returns

      scaling label

    Return type

      str

  `setRefreshTime`(refreshtime)

    sets refresh time

    Parameters

      refreshtime (`float`) – refresh time in seconds

  `show`(parameters)

    set subwidget properties

    Parameters

      parameters (`lavuelib.toolWidget.ToolParameters`) – tool parameters

  `transpose`()

    transposes subwidget

class `lavuelib.displayExtensions.` `HandleWithSignals`(pos, center, parent)

  Bases: `pyqtgraph.graphicsItems.ROI.Handle`

  handle with signals

  constructor

  Parameters

    - pos ([float, float]) – position of handle

    - center ([float, float]) – center of handle

    - parent (`pyqtgraph.graphicsItems.ROI.ROI`) – roi object

  `hoverEvent`(ev)

    hover event

    Parameters

      ev (`pyqtgraph.QtCore.QEvent`:) – close event

  `hovered`

    (`pyqtgraph.QtCore.pyqtSignal`) hover event emitted

class `lavuelib.displayExtensions.` `LockerExtension`(parent=None)

  Bases: `lavuelib.displayExtensions.DisplayExtension`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `coordinates`()

    returns coordinates

  `mouse_doubleclick`(x, y, locked)

    sets vLine and hLine positions

    Parameters

      - x (float) – x coordinate

      - y (float) – y coordinate

      - locked (bool) – double click lock

  `mouse_position`(x, y)

    sets vLine and hLine positions

    Parameters

      - x (float) – x coordinate

      - y (float) – y coordinate

  `name`

    (`str`) tool name

  `show`(parameters)

    set subwidget properties

    Parameters

      parameters (`lavuelib.toolWidget.ToolParameters`) – tool parameters

  `transpose`()

    transposes locker lines

  `updateLocker`(xdata, ydata)

    updates the locker position

    Parameters

      - xdata (`float`) – x pixel position

      - ydata (`float`) – y-pixel position

class `lavuelib.displayExtensions.` `MarkExtension`(parent=None)

  Bases: `lavuelib.displayExtensions.BaseMarkExtension`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `mouse_doubleclick`(x, y, locked)

    sets vLine and hLine positions

    Parameters

      - x (float) – x coordinate

      - y (float) – y coordinate

      - locked (bool) – double click lock

  `mouse_position`(x, y)

    sets vLine and hLine positions

    Parameters

      - x (float) – x coordinate

      - y (float) – y coordinate

  `name`

    (`str`) tool name

  `show`(parameters)

    set subwidget properties

    Parameters

      parameters (`lavuelib.toolWidget.ToolParameters`) – tool parameters

class `lavuelib.displayExtensions.` `MaximaExtension`(parent=None)

  Bases: `lavuelib.displayExtensions.DisplayExtension`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `name`

    (`str`) tool name

  `setMaximaPos`(positionlist, offset=None)

    sets maxima postions

    Parameters

      - positionlist (`list` < (float, float) >) – [(x1, y1), … , (xn, yn)]

      - offset ([ `float`, `float`]) – offset of position

  `show`(parameters)

    set subwidget properties

    Parameters

      parameters (`lavuelib.toolWidget.ToolParameters`) – tool parameters

  `transpose`()

    transposes maxima

class `lavuelib.displayExtensions.` `MeshExtension`(parent=None)

  Bases: `lavuelib.displayExtensions.DisplayExtension`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `changeROIRegion`(_=None)

    changes the current roi region

  `currentROI`()

    provides current roi id

    Returns

      roi id

    Return type

      `int`

  `isROIsEnabled`()

    provides flag rois enabled

    Returns

      roi enabled flag

    Return type

      `bool`

  `name`

    (`str`) tool name

  `roiCoords`()

    provides rois coordinates

    Returns

      rois coordinates

    Return type

      `list` < [`float`, `float`, `float`, `float`] >

  `roiCoordsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) roi coordinate changed signal

  `scalingLabel`()

    provides scaling label

    Returns

      scaling label

    Return type

      str

  `show`(parameters)

    set subwidget properties

    Parameters

      parameters (`lavuelib.toolWidget.ToolParameters`) – tool parameters

  `transpose`()

    transposes ROIs

  `updateROIs`(rid, coords)

    update ROIs

    Parameters

      - rid (`int`) – roi id

      - coords (`list` < [`float`, `float`, `float`, `float`] >) – roi coordinates

class `lavuelib.displayExtensions.` `ROIExtension`(parent=None)

  Bases: `lavuelib.displayExtensions.DisplayExtension`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `calcROIsum`()

    calculates the current roi sum

    Returns

      sum roi value, roi id

    Return type

      (float, int)

  `calcROIsums`()

    calculates all roi sums

    Returns

      sum roi value, roi id

    Return type

      :obj:list < float >

  `changeROIRegion`(_=None)

    changes the current roi region

  `currentROI`()

    provides current roi id

    Returns

      roi id

    Return type

      `int`

  `isROIsEnabled`()

    provides flag rois enabled

    Returns

      roi enabled flag

    Return type

      `bool`

  `name`

    (`str`) tool name

  `roiCoords`()

    provides rois coordinates

    Returns

      rois coordinates

    Return type

      `list` < [`float`, `float`, `float`, `float`] >

  `roiCoordsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) roi coordinate changed signal

  `scalingLabel`()

    provides scaling label

    Returns

      scaling label

    Return type

      str

  `setColors`(colors=None)

    sets colors

    Parameters

      colors (`str`) – json list of roi colors

    Returns

      change status

    Return type

      `bool`

  `show`(parameters)

    set subwidget properties

    Parameters

      parameters (`lavuelib.toolWidget.ToolParameters`) – tool parameters

  `transpose`()

    transposes ROIs

  `updateROIs`(rid, coords)

    update ROIs

    Parameters

      - rid (`int`) – roi id

      - coords (`list` < [`float`, `float`, `float`, `float`] >) – roi coordinates

class `lavuelib.displayExtensions.` `RegionItem`(points=None, pen='w', **args)

  Bases: `pyqtgraph.graphicsItems.IsocurveItem.IsocurveItem`

  constructor

  Parameters

    - points (`list` < (float, float) >) – list of points

    - pen (`pyqtgraph.QtGui.QPen`) – qt pen

    - args (`dict` <`str`, any>) – more params

  `generatePath`()

    generate QPainterPath

class `lavuelib.displayExtensions.` `RegionsExtension`(parent=None)

  Bases: `lavuelib.displayExtensions.DisplayExtension`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `currentRegion`()

    provides current region id

    Returns

      region id

    Return type

      `int`

  `isRegionEnabled`()

    provides flag regions enabled

    Returns

      region enabled flag

    Return type

      `bool`

  `name`

    (`str`) tool name

  `regionPoints`()

    provides region coordinates

    Returns

      region coordinates

    Return type

      `list` < `list` < `list` < (`float`, `float`) > > >

  `regionPointsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) region points changed signal

  `scalingLabel`()

    provides scaling label

    Returns

      scaling label

    Return type

      str

  `setColors`(colors=None)

    sets colors

    Parameters

      colors (`str`) – json list of roi colors

    Returns

      change status

    Return type

      `bool`

  `show`(parameters)

    set subwidget properties

    Parameters

      parameters (`lavuelib.toolWidget.ToolParameters`) – tool parameters

  `transpose`()

    transposes Regions

  `updateRegions`(points, rid=None)

    update Regions

    Parameters

      - rid (`int`) – rng id

      - points (`list` < `list` < `list` < (`float`, `float`) > > >) – rng coordinates

class `lavuelib.displayExtensions.` `SimpleLineROI`(pos1, pos2, width=1e-05, **args)

  Bases: `pyqtgraph.graphicsItems.ROI.LineROI`

  simple line roi

  constructor

  Parameters

    - pos1 ([float, float]) – start position

    - pos2 ([float, float]) – end position

    - args (`dict`<:obj:`str`, `any`>) – dictionary with ROI parameters

  `getCoordinates`()

    provides the roi coordinates

    Parameters

      trans (`bool`) – transposed flag

    Returns

      x1, y1, x2, y2 positions of the roi

    Return type

      [`float`, `float`, `float`, `float`]

class `lavuelib.displayExtensions.` `TrackingExtension`(parent=None)

  Bases: `lavuelib.displayExtensions.BaseMarkExtension`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `name`

    (`str`) tool name

  `show`(parameters)

    set subwidget properties

    Parameters

      parameters (`lavuelib.toolWidget.ToolParameters`) – tool parameters

class `lavuelib.displayExtensions.` `VHBoundsExtension`(parent=None)

  Bases: `lavuelib.displayExtensions.DisplayExtension`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `name`

    (`str`) tool name

  `show`(parameters)

    set subwidget properties

    Parameters

      parameters (`lavuelib.toolWidget.ToolParameters`) – tool parameters

  `updateHBounds`(ydata1, ydata2)

    updates the horizontal bounds

    Parameters

      - ydata1 (`float`) – first y-pixel position

      - ydata2 (`float`) – second y-pixel position

  `updateVBounds`(xdata1, xdata2)

    updates the vertical bounds

    Parameters

      - xdata1 (`float`) – first x-pixel position

      - xdata2 (`float`) – second x-pixel position

## lavuelib.edDictDialog module

editable list dialog

class `lavuelib.edDictDialog.` `EdDictDialog`(parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  editable list dialog

  constructor

  Parameters

    parent (`QtCore.QObject`) – parent object

  `accept`()

    updates class variables with the form content

  `createGUI`()

    creates widget GUI

  `dirty`

    (`bool`) dirty flag

  `headers`

    (`list` <`str`>) table headers

  `newvalues`

    (`list` <`str`>) table headers

  `record`

    (`dict` <`str`, any>) data (name, value) dictionary

  `title`

    (`str`) dialog title

`lavuelib.edDictDialog.` `logger` = <Logger lavue (WARNING)>

  (`logging.Logger`) logger object

## lavuelib.edListDialog module

editable list dialog

class `lavuelib.edListDialog.` `EdListDialog`(parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  editable list dialog

  constructor

  Parameters

    parent (`QtCore.QObject`) – parent object

  `accept`()

    updates class variables with the form content

  `createGUI`()

    creates widget GUI

  `dirty`

    (`bool`) dirty flag

  `headers`

    (`list` <`str`>) table headers

  `record`

    (`dict` <`str`, any>) data (name, value) dictionary

  `title`

    (`str`) dialog title

`lavuelib.edListDialog.` `logger` = <Logger lavue (WARNING)>

  (`logging.Logger`) logger object

## lavuelib.filewriter module

Provides abstraction for file writer

class `lavuelib.filewriter.` `FTAttribute`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTObject`

  virtual file tree attribute

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  property `dtype`

    attribute data type

    Returns

      attribute data type

    Return type

      `str`

  `read`()

    read attribute value

    Returns

      python object

    Return type

      `any`

  `reopen`()

    reopen attribute

  property `shape`

    attribute shape

    Returns

      attribute shape

    Return type

      `list` < `int` >

  `write`(o)

    write attribute value

    Parameters

      o (`any`) – python object

class `lavuelib.filewriter.` `FTAttributeManager`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTObject`

  file tree attribute

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  `create`(name, dtype, shape=None, overwrite=False)

    create a new attribute

    Parameters

      - name (`str`) – attribute name

      - dtype (`str`) – attribute type

      - shape (`list`< :obj:`int`>) – attribute shape

      - overwrite (`bool`) – overwrite flag

    Returns

      attribute object

    Return type

      `FTAtribute`

  `names`()

    key values

    Returns

      attribute names

    Return type

      `list` <`str`>

  `reopen`()

    reopen attribute

class `lavuelib.filewriter.` `FTDataFilter`(h5object=None, tparent=None)

  Bases: `lavuelib.filewriter.FTObject`

  file tree data filter

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  property `filterid`

    getter for compression filter id

    Returns

      compression rate

    Return type

      `int`

  property `options`

    getter for compression options

    Returns

      compression options

    Return type

      `tuple` <`int`>

  property `rate`

    getter for compression rate

    Returns

      compression rate

    Return type

      `int`

  `reopen`()

    reopen attribute

  property `shuffle`

    getter for compression shuffle

    Returns

      compression shuffle

    Return type

      `bool`

class `lavuelib.filewriter.` `FTDeflate`(h5object=None, tparent=None)

  Bases: `lavuelib.filewriter.FTDataFilter`

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

class `lavuelib.filewriter.` `FTField`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTObject`

  file writer field

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  property `attributes`

    return the attribute manager

    Returns

      attribute manager

    Return type

      `FTAttributeManager`

  property `dtype`

    field data type

    Returns

      field data type

    Return type

      `str`

  `grow`(dim=0, ext=1)

    grow the field

    Parameters

      - dim (`int`) – growing dimension

      - dim – size of the grow

  `read`()

    read the field value

    Returns

      h5 object

    Return type

      `any`

  `refresh`()

    refresh the field

    Returns

      refreshed

    Return type

      `bool`

  `reopen`()

    reopen attribute

  property `shape`

    field shape

    Returns

      field shape

    Return type

      `list` < `int` >

  property `size`

    field size

    Returns

      field size

    Return type

      `int`

  `write`(o)

    write the field value

    Parameters

      o (`any`) – h5 object

class `lavuelib.filewriter.` `FTFile`(h5object, filename)

  Bases: `lavuelib.filewriter.FTObject`

  file tree file

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - filename (`str`) – file name

    - writer (`H5PYWriter` or `H5CppWriter`) – writer module

  classmethod `currenttime`()

    returns current time string

    Returns

      current time

    Return type

      `str`

  `default_field`()

    field pointed by default attributes

    Returns

      field pointed by default attributes

    Return type

      `FTField`

  `flush`()

    flash the data

  `hasswmr`()

    if has swmr_mode

    Returns

      has swmr_mode

    Return type

      `bool`

  `name`

    (`str`) file name

  property `readonly`

    check if file is readonly

    Returns

      readonly flag

    Return type

      `bool`

  `reopen`(readonly=False, swmr=False, libver=None)

    reopen attribute

    Parameters

      - readonly (`bool`) – readonly flag

      - swmr (`bool`) – swmr flag

      - libver (`str`) – library version, default: ‘latest’

  `root`()

    root object

    Returns

      parent object

    Return type

      `FTGroup`

class `lavuelib.filewriter.` `FTGroup`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTObject`

  file tree group

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  property `attributes`

    return the attribute manager

    Returns

      attribute manager

    Return type

      `FTAttributeManager`

  `create_field`(name, type_code, shape=None, chunk=None, dfilter=None)

    open a file tree element

    Parameters

      - n (`str`) – group name

      - type_code (`str`) – nexus field type

      - shape (`list` < `int` >) – shape

      - chunk (`list` < `int` >) – chunk

      - dfilter (`FTDeflate`) – filter deflater

    Returns

      file tree field

    Return type

      `FTField`

  `create_group`(n, nxclass='')

    open a file tree element

    Parameters

      - n (`str`) – group name

      - nxclass (`str`) – group type

    Returns

      file tree group

    Return type

      `FTGroup`

  `create_virtual_field`(name, layout, fillvalue=None)

    creates a virtual filed tres element

    Parameters

      - name (`str`) – group name

      - layout (`H5CppFieldLayout`) – virual field layout

      - fillvalue (`int` or `np.ndarray`) – fill value

  `exists`(name)

    if child exists

    Parameters

      name (`str`) – child name

    Returns

      existing flag

    Return type

      `bool`

  `names`()

    read the child names

    Returns

      h5 object

    Return type

      `list` <str>

  `open`(name)

    open a file tree element

    Parameters

      name (`str`) – element name

    Returns

      file tree object

    Return type

      `FTObject`

  `open_link`(name)

    open a file tree element as link

    Parameters

      name (`str`) – element name

    Returns

      file tree object

    Return type

      `FTObject`

  `reopen`()

    reopen attribute

  property `size`

    group size

    Returns

      group size

    Return type

      `int`

  `stepsperfile`

    (`int`) steps per file

class `lavuelib.filewriter.` `FTHyperslab`(offset=None, block=None, count=None, stride=None)

  Bases: `object`

  hyperslab class

  constructor

  Parameters

    - offset (`tuple`) – a list of offsets

    - block (`tuple`) – a list of blocks

    - count (`tuple`) – a list of counts

    - stride (`tuple`) – a list of strides

class `lavuelib.filewriter.` `FTLink`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTObject`

  file tree link

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  `refresh`()

    refresh the link

    Returns

      refreshed

    Return type

      `bool`

  `reopen`()

    reopen attribute

  property `target_path`

    target path

    Returns

      target path

    Return type

      `str`

class `lavuelib.filewriter.` `FTObject`(h5object, tparent=None)

  Bases: `object`

  virtual file tree object

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – tree parent

  `append`(child)

    append child weakref

    Parameters

      tparent (`FTObject`) – tree parent

  `close`()

    close element

  property `h5object`

    provide object of native library

    Returns

      h5 object

    Return type

      `any`

  property `is_valid`

    check if attribute is valid

    Returns

      valid flag

    Return type

      `bool`

  property `parent`

    return the parent object

    Returns

      file tree group

    Return type

      `FTGroup`

  `reload`()

    reload a list of valid children

class `lavuelib.filewriter.` `FTTargetFieldView`(h5object=None)

  Bases: `lavuelib.filewriter.FTObject`

  target field view for VDS

  constructor

  Parameters

    h5object (`any`) – h5 object

class `lavuelib.filewriter.` `FTVirtualFieldLayout`(h5object=None)

  Bases: `lavuelib.filewriter.FTObject`

  virtual field layout

  constructor

  Parameters

    h5object (`any`) – h5 object

  `add`(key, source, sourcekey=None)

    add target field to layout

    Parameters

      - key (`tuple`) – slide or selection

      - source (`FTTargetFieldView`) – target field

      - sourcekey (`tuple`) – slide or selection

`lavuelib.filewriter.` `create_file`(filename, overwrite=False, **pars)

  create a new file

  Parameters

    - filename (`str`) – file name

    - overwrite (`bool`) – overwrite flag

    - pars (`dict` < `str`, `str`>) – parameters

  Returns

    file object

  Return type

    `FTFile`

`lavuelib.filewriter.` `data_filter`(parent=None)

  create deflate filter

  Parameters

    parent (`FTObject`) – parent object

  Returns

    deflate filter object

  Return type

    `FTDeflate`

`lavuelib.filewriter.` `deflate_filter`(parent=None)

  create deflate filter

  Parameters

    parent (`FTObject`) – parent object

  Returns

    deflate filter object

  Return type

    `FTDeflate`

`lavuelib.filewriter.` `first`(array)

  get first element if the only

  Parameters

    array (`any`) – numpy array

  Returns

    first element of the array

`lavuelib.filewriter.` `get_links`(parent)

  get links

  Parameters

    parent (`FTObject`) – parent object

  Returns

    list of link objects

  Return type

    obj

      list <`FTLink`>

`lavuelib.filewriter.` `link`(target, parent, name)

  create link

  Parameters

    - target (`str`) – file name

    - parent (`FTObject`) – parent object

    - name (`str`) – link name

  Returns

    link object

  Return type

    `FTLink`

`lavuelib.filewriter.` `load_file`(membuffer, filename=None, readonly=False, **pars)

  load a file from memory byte buffer

  Parameters

    - membuffer (`bytes` or `io.BytesIO`) – memory buffer

    - filename (`str`) – file name

    - readonly (`bool`) – readonly flag

    - pars (`dict` < `str`, `str`>) – parameters

  Returns

    file objects

  Return type

    `H5PYFile` or `H5CppFile`

`lavuelib.filewriter.` `open_file`(filename, readonly=False, **pars)

  open the new file

  Parameters

    - filename (`str`) – file name

    - readonly (`bool`) – readonly flag

    - pars (`dict` < `str`, `str`>) – parameters

  Returns

    file object

  Return type

    `FTFile`

`lavuelib.filewriter.` `setwriter`(wr)

  sets writer

  Parameters

    wr (`H5PYWriter` or `H5CppWriter`) – writer module

`lavuelib.filewriter.` `target_field_view`(filename, fieldpath, shape, dtype=None, maxshape=None, parent=None)

  create target field view for VDS

  Parameters

    - filename (`str`) – file name

    - fieldpath (`str`) – nexus field path

    - shape (`list` < `int` >) – shape

    - dtype (`str`) – attribute type

    - maxshape (`list` < `int` >) – shape

    - parent (`FTObject`) – parent object

  Returns

    target field object

  Return type

    `FTTargetFieldView`

`lavuelib.filewriter.` `unlimited`(parent=None)

  return dataspace UNLIMITED variable for the current writer module

  Parameters

    parent (`FTObject`) – parent object

  Returns

    dataspace UNLIMITED variable

  Return type

    `h5cpp.dataspace.UNLIMITED` or `h5py.UNLIMITED`

`lavuelib.filewriter.` `virtual_field_layout`(shape, dtype, maxshape=None, parent=None)

  creates a virtual field layout for a VDS file

  Parameters

    - shape (`list` < `int` >) – shape

    - dtype (`str`) – attribute type

    - maxshape (`list` < `int` >) – shape

    - parent (`FTObject`) – parent object

  Returns

    virtual layout

  Return type

    `FTVirtualFieldLayout`

`lavuelib.filewriter.` `writerlock` = <unlocked _thread.lock object>

  (`threading.Lock`) writer module

## lavuelib.filters module

set of image sources

class `lavuelib.filters.` `BaseFilter`(configuration=None)

  Bases: `object`

  filter base class

  constructor

  Parameters

    name – image name

  `initialize`()

    initialize the filter

  `terminate`()

    stop filter

class `lavuelib.filters.` `FilterList`(configlist=None)

  Bases: `list`

  Filter list

  constructor

  Parameters

    configlist (: `list` < [`str` , `str`] >) – list with filter configuration

  `appendFilters`(configlist)

    appends filters

    Parameters

      configlist (: `list` < [`str` , `str`] >) – list with filter configuration

  `reset`(configlist)

    reset filters

    Parameters

      configlist (: `list` < [`str` , `str`] >) – list with filter configuration

## lavuelib.filtersGroupBox module

filter widget

class `lavuelib.filtersGroupBox.` `FiltersGroupBox`(parent=None)

  Bases: `PyQt5.QtWidgets.QWidget`

  Select how an image should be transformed.

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `changeView`(showfilters=None)

    show or hide widgets

    Parameters

      showfilters (`bool`) – filter widget shown

  `filtersChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) filter changed signal

  `setLabel`(text)

    sets filter label

    Parameters

      text (`str`) – label text

  `setState`(state)

    sets filter state

    Parameters

      tname (`int`) – filter state

  `setToolTip`(text)

    sets filter label

    Parameters

      text (`str`) – tool tip text

## lavuelib.geometryDialog module

detector geometry widget

class `lavuelib.geometryDialog.` `GeometryDialog`(parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  detector geometry widget class

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `accept`()

    updates class variables with the form content

  `centerx`

    (`float`) x-coordinates of the center of the image

  `centery`

    (`float`) y-coordinates of the center of the image

  `createGUI`()

    create GUI

  `detdistance`

    (`float`) detector distance in mm

  `energy`

    (`float`) energy in eV

  `pixelsizex`

    (`float`) pixel x-size in um

  `pixelsizey`

    (`float`) pixel y-size in um

## lavuelib.gradientDialog module

gradient dialog

class `lavuelib.gradientDialog.` `GradientDialog`(parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  interval widget class

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `accept`()

    updates class variables with the form content

  `createGUI`()

    create GUI

  `name`

    (`int`) gradient name

## lavuelib.h5cppwriter

Provides h5cpp file writer

class `lavuelib.h5cppwriter.` `H5CppAttribute`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTAttribute`

  file tree attribute

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  `close`()

    close attribute

  property `dtype`

    field data type

    Returns

      field data type

    Return type

      `str`

  property `is_valid`

    check if attribute is valid

    Returns

      valid flag

    Return type

      `bool`

  `name`

    (`str`) object name

  `path`

    (`str`) object nexus path

  `read`()

    read attribute value

    Returns

      python object

    Return type

      `any`

  `reopen`()

    reopen attribute

  property `shape`

    attribute shape

    Returns

      attribute shape

    Return type

      `list` < `int` >

  `write`(o)

    write attribute value

    Parameters

      o (`any`) – python object

class `lavuelib.h5cppwriter.` `H5CppAttributeManager`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTAttributeManager`

  file tree attribute

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  `close`()

    close attribure manager

  `create`(name, dtype, shape=None, overwrite=False)

    create a new attribute

    Parameters

      - name (`str`) – attribute name

      - dtype (`str`) – attribute type

      - shape (`list` < `int` >) – attribute shape

      - overwrite (`bool`) – overwrite flag

    Returns

      attribute object

    Return type

      `H5CppAtribute`

  property `is_valid`

    check if link is valid

    Returns

      valid flag

    Return type

      `bool`

  `name`

    (`str`) object name

  `names`()

    key values

    Returns

      attribute names

    Return type

      `list` <`str`>

  `path`

    (`str`) object nexus path

  `reopen`()

    reopen field

class `lavuelib.h5cppwriter.` `H5CppDataFilter`(h5object=None, tparent=None)

  Bases: `lavuelib.filewriter.FTDataFilter`

  file tree deflate

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

class `lavuelib.h5cppwriter.` `H5CppDeflate`(h5object=None, tparent=None)

  Bases: `lavuelib.h5cppwriter.H5CppDataFilter`

  deflate filter

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

class `lavuelib.h5cppwriter.` `H5CppField`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTField`

  file tree file

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  property `attributes`

    return the attribute manager

    Returns

      attribute manager

    Return type

      `H5CppAttributeManager`

  `close`()

    close field

  property `dtype`

    field data type

    Returns

      field data type

    Return type

      `str`

  `grow`(dim=0, ext=1)

    grow the field

    Parameters

      - dim (`int`) – growing dimension

      - dim – size of the grow

  property `is_valid`

    check if field is valid

    Returns

      valid flag

    Return type

      `bool`

  `name`

    (`str`) object name

  `path`

    (`str`) object nexus path

  `read`()

    read the field value

    Returns

      h5 object

    Return type

      `any`

  `refresh`()

    refresh the field

    Returns

      refreshed

    Return type

      `bool`

  `reopen`()

    reopen field

  property `shape`

    field shape

    Returns

      field shape

    Return type

      `list` < `int` >

  property `size`

    field size

    Returns

      field size

    Return type

      `int`

  `write`(o)

    write the field value

    Parameters

      o (`any`) – h5 object

class `lavuelib.h5cppwriter.` `H5CppFile`(h5object, filename)

  Bases: `lavuelib.filewriter.FTFile`

  file tree file

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - filename (`str`) – file name

  `close`()

    close file

  `flush`()

    flash the data

  property `is_valid`

    check if file is valid

    Returns

      valid flag

    Return type

      `bool`

  `path`

    (`str`) object nexus path

  property `readonly`

    check if file is readonly

    Returns

      readonly flag

    Return type

      `bool`

  `reopen`(readonly=False, swmr=False, libver=None)

    reopen file

    Parameters

      - readonly (`bool`) – readonly flag

      - swmr (`bool`) – swmr flag

      - libver (`str`) – library version, default: ‘latest’

  `root`()

    root object

    Returns

      parent object

    Return type

      `H5CppGroup`

class `lavuelib.h5cppwriter.` `H5CppGroup`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTGroup`

  file tree group

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – tree parent

  class `H5CppGroupIter`(group)

    Bases: `object`

    constructor

    Parameters

      group – group object

    `next`()

      the next attribute

      Returns

        attribute object

      Return type

        `FTAtribute`

  property `attributes`

    return the attribute manager

    Returns

      attribute manager

    Return type

      `H5CppAttributeManager`

  `close`()

    close group

  `create_field`(name, type_code, shape=None, chunk=None, dfilter=None)

    open a file tree element

    Parameters

      - n (`str`) – group name

      - type_code (`str`) – nexus field type

      - shape (`list` < `int` >) – shape

      - chunk (`list` < `int` >) – chunk

      - dfilter (`H5CppDataFilter`) – filter deflater

    Returns

      file tree field

    Return type

      `H5CppField`

  `create_group`(n, nxclass=None)

    open a file tree element

    Parameters

      - n (`str`) – group name

      - nxclass (`str`) – group type

    Returns

      file tree group

    Return type

      `H5CppGroup`

  `create_virtual_field`(name, layout, fillvalue=0)

    creates a virtual filed tres element

    Parameters

      - name (`str`) – field name

      - layout (`H5CppFieldLayout`) – virual field layout

      - fillvalue (`int` or `np.ndarray`) – fill value

  `exists`(name)

    if child exists

    Parameters

      name (`str`) – child name

    Returns

      existing flag

    Return type

      `bool`

  property `is_valid`

    check if field is valid

    Returns

      valid flag

    Return type

      `bool`

  `name`

    (`str`) object name

  `names`()

    read the child names

    Returns

      h5 object

    Return type

      `list` <str>

  `open`(name)

    open a file tree element

    Parameters

      name (`str`) – element name

    Returns

      file tree object

    Return type

      `FTObject`

  `open_link`(name)

    open a file tree element as link

    Parameters

      name (`str`) – element name

    Returns

      file tree object

    Return type

      `FTObject`

  `path`

    (`str`) object nexus path

  `reopen`()

    reopen group

  property `size`

    group size

    Returns

      group size

    Return type

      `int`

class `lavuelib.h5cppwriter.` `H5CppLink`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTLink`

  file tree link

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  `close`()

    close group

  classmethod `getfilename`(obj)

    provides a filename from h5 node

    Parameters

      obj (`FTObject`) – h5 node

    Returns

      file name

    Return type

      `str`

  property `is_valid`

    check if link is valid

    Returns

      valid flag

    Return type

      `bool`

  `name`

    (`str`) object name

  `path`

    (`str`) object nexus path

  `refresh`()

    refresh the field

    Returns

      refreshed

    Return type

      `bool`

  `reopen`()

    reopen field

  property `target_path`

    target path

    Returns

      target path

    Return type

      `str`

class `lavuelib.h5cppwriter.` `H5CppTargetFieldView`(filename, fieldpath, shape, dtype=None, maxshape=None)

  Bases: `lavuelib.filewriter.FTTargetFieldView`

  target field for VDS

  constructor

  Parameters

    - filename (`str`) – file name

    - fieldpath (`str`) – nexus field path

    - shape (`list` < `int` >) – shape

    - dtype (`str`) – attribute type

    - maxshape (`list` < `int` >) – shape

  `fieldpath`

    (`str`) nexus field path

  `filename`

    (`str`) directory and file name

  `maxshape`

    (`list` < `int` >) maximal shape

  `shape`

    (`list` < `int` >) shape

class `lavuelib.h5cppwriter.` `H5CppVirtualFieldLayout`(h5object, shape, dtype=None, maxshape=None)

  Bases: `lavuelib.filewriter.FTVirtualFieldLayout`

  virtual field layout

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - shape (`list` < `int` >) – shape

    - dtype (`str`) – attribute type

    - maxshape (`list` < `int` >) – shape

  `add`(key, source, sourcekey=None, shape=None)

    add target field to layout

    Parameters

      - key (`tuple`) – slide

      - source (`H5PYTargetFieldView`) – target field view

      - sourcekey (`tuple`) – slide or selection

      - shape (`tuple`) – target shape in the layout

  `maxshape`

    (`list` < `int` >) maximal shape

  `shape`

    (`list` < `int` >) shape

`lavuelib.h5cppwriter.` `create_file`(filename, overwrite=False, libver=None, swmr=None)

  create a new file

  Parameters

    - filename (`str`) – file name

    - overwrite (`bool`) – overwrite flag

    - libver (`str`) – library version: ‘lastest’ or ‘earliest’

  Returns

    file object

  Return type

    `H5CppFile`

`lavuelib.h5cppwriter.` `data_filter`()

  create deflate filter

  Returns

    deflate filter object

  Return type

    `H5CppDataFilter`

`lavuelib.h5cppwriter.` `deflate_filter`()

  create deflate filter

  Returns

    deflate filter object

  Return type

    `H5CppDataFilter`

`lavuelib.h5cppwriter.` `get_links`(parent)

  get links

  Parameters

    parent (`FTObject`) – parent object

  Returns

    list of link objects

  Returns

    link object

  Return type

    obj

      list <`H5CppLink`>

`lavuelib.h5cppwriter.` `is_image_file_supported`()

  provides if loading of image files are supported

  Retruns

    if loading of image files are supported

  Return type

    `bool`

`lavuelib.h5cppwriter.` `is_unlimited_vds_supported`()

  provides if unlimited vds are supported

  Retruns

    if unlimited vds are supported

  Return type

    `bool`

`lavuelib.h5cppwriter.` `is_vds_supported`()

  provides if vds are supported

  Retruns

    if vds are supported

  Return type

    `bool`

`lavuelib.h5cppwriter.` `link`(target, parent, name)

  create link

  Parameters

    - target (`str`) – nexus path name

    - parent (`FTObject`) – parent object

    - name (`str`) – link name

  Returns

    link object

  Return type

    `H5CppLink`

`lavuelib.h5cppwriter.` `load_file`(membuffer, filename=None, readonly=False, **pars)

  load a file from memory byte buffer

  Parameters

    - membuffer (`bytes` or `io.BytesIO`) – memory buffer

    - filename (`str`) – file name

    - readonly (`bool`) – readonly flag

    - pars (`dict` < `str`, `str`>) – parameters

  Returns

    file object

  Return type

    `H5PYFile`

`lavuelib.h5cppwriter.` `nptype`(dtype)

  converts to numpy types

  Parameters

    dtype (`str`) – h5 writer type type

  Returns

    nupy type

  Return type

    `str`

`lavuelib.h5cppwriter.` `open_file`(filename, readonly=False, libver=None, swmr=False)

  open the new file

  Parameters

    - filename (`str`) – file name

    - readonly (`bool`) – readonly flag

    - libver (`str`) – library version: ‘lastest’ or ‘earliest’

  Returns

    file object

  Return type

    `H5CppFile`

`lavuelib.h5cppwriter.` `target_field_view`(filename, fieldpath, shape, dtype=None, maxshape=None)

  create target field view for VDS

  Parameters

    - filename (`str`) – file name

    - fieldpath (`str`) – nexus field path

    - shape (`list` < `int` >) – shape

    - dtype (`str`) – attribute type

    - maxshape (`list` < `int` >) – shape

  Returns

    target field view object

  Return type

    `H5CppTargetFieldView`

`lavuelib.h5cppwriter.` `unlimited`(parent=None)

  return dataspace UNLIMITED variable for the current writer module

  Parameters

    parent (`FTObject`) – parent object

  Returns

    dataspace UNLIMITED variable

  Return type

    `h5cpp.dataspace.UNLIMITED`

`lavuelib.h5cppwriter.` `unlimited_selection`(sel, shape)

  checks if hyperslab is unlimited

  Parameters

    - sel (`filewriter.FTHyperslab`) – hyperslab selection

    - shape (`list`) – give shape

  Returns

    if hyperslab is unlimited list

  Return type

    `list` <`bool`>

`lavuelib.h5cppwriter.` `virtual_field_layout`(shape, dtype, maxshape=None)

  creates a virtual field layout for a VDS file

  Parameters

    - shape (`list` < `int` >) – shape

    - dtype (`str`) – attribute type

    - maxshape (`list` < `int` >) – shape

  Returns

    virtual layout

  Return type

    `H5CppVirtualFieldLayout`

## lavuelib.h5pywriter

Provides h5py file writer

class `lavuelib.h5pywriter.` `H5PYAttribute`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTAttribute`

  file tree attribute

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  `close`()

    close attribute

  property `dtype`

    attribute data type

    Returns

      attribute data type

    Return type

      `str`

  property `is_valid`

    check if field is valid

    Returns

      valid flag

    Return type

      `bool`

  `read`()

    read attribute value

    Returns

      python object

    Return type

      `any`

  `reopen`()

    reopen attribute

  property `shape`

    attribute shape

    Returns

      attribute shape

    Return type

      `list` < `int` >

  `write`(o)

    write attribute value

    Parameters

      o (`any`) – python object

class `lavuelib.h5pywriter.` `H5PYAttributeManager`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTAttributeManager`

  file tree attribute

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  class `H5PYAttrIter`(manager)

    Bases: `object`

    constructor

    Parameters

      manager (`H5PYAttributeManager`) – attribute manager

    `next`()

      the next attribute

      Returns

        attribute object

      Return type

        `FTAtribute`

  `close`()

    close attribure manager

  `create`(name, dtype, shape=None, overwrite=False)

    create a new attribute

    Parameters

      - name (`str`) – attribute name

      - dtype (`str`) – attribute type

      - shape (`list` < `int` >) – attribute shape

      - overwrite (`bool`) – overwrite flag

    Returns

      attribute object

    Return type

      `H5PYAtribute`

  property `is_valid`

    check if link is valid

    Returns

      valid flag

    Return type

      `bool`

  `name`

    (`str`) object name

  `names`()

    key values

    Returns

      attribute names

    Return type

      `list` <`str`>

  `path`

    (`str`) object nexus path

  `reopen`()

    reopen field

class `lavuelib.h5pywriter.` `H5PYDataFilter`(h5object=None, tparent=None)

  Bases: `lavuelib.filewriter.FTDataFilter`

  file tree data filter

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

class `lavuelib.h5pywriter.` `H5PYDeflate`(h5object=None, tparent=None)

  Bases: `lavuelib.h5pywriter.H5PYDataFilter`

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

class `lavuelib.h5pywriter.` `H5PYField`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTField`

  file writer field

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  property `attributes`

    return the attribute manager

    Returns

      attribute manager

    Return type

      `H5PYAttributeManager`

  `close`()

    close field

  property `dtype`

    field data type

    Returns

      field data type

    Return type

      `str`

  `grow`(dim=0, ext=1)

    grow the field

    Parameters

      - dim (`int`) – growing dimension

      - dim – size of the grow

  property `is_valid`

    check if group is valid

    Returns

      valid flag

    Return type

      `bool`

  `read`()

    read the field value

    Returns

      h5 object

    Return type

      `any`

  `refresh`()

    refresh the field

    Returns

      refreshed

    Return type

      `bool`

  `reopen`()

    reopen field

  property `shape`

    field shape

    Returns

      field shape

    Return type

      `list` < `int` >

  property `size`

    field size

    Returns

      field size

    Return type

      `int`

  `write`(o)

    write the field value

    Parameters

      o (`any`) – h5 object

class `lavuelib.h5pywriter.` `H5PYFile`(h5object, filename)

  Bases: `lavuelib.filewriter.FTFile`

  file tree file

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - filename (`str`) – file name

  `close`()

    close file

  `flush`()

    flash the data

  `hasswmr`()

    if has swmr_mode

    Returns

      has swmr_mode

    Return type

      `bool`

  property `is_valid`

    check if group is valid

    Returns

      valid flag

    Return type

      `bool`

  `path`

    (`str`) object nexus path

  property `readonly`

    check if file is readonly

    Returns

      readonly flag

    Return type

      `bool`

  `reopen`(readonly=False, swmr=False, libver=None)

    reopen file

    Parameters

      - readonly (`bool`) – readonly flag

      - swmr (`bool`) – swmr flag

      - libver (`str`) – library version, default: ‘latest’

  `root`()

    root object

    Returns

      parent object

    Return type

      `H5PYGroup`

class `lavuelib.h5pywriter.` `H5PYGroup`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTGroup`

  file tree group

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  class `H5PYGroupIter`(group)

    Bases: `object`

    constructor

    Parameters

      group – group object

    `next`()

      the next attribute

      Returns

        attribute object

      Return type

        `FTAtribute`

  property `attributes`

    return the attribute manager

    Returns

      attribute manager

    Return type

      `H5PYAttributeManager`

  `close`()

    close group

  `create_field`(name, type_code, shape=None, chunk=None, dfilter=None)

    creates a field tree element

    Parameters

      - name (`str`) – group name

      - type_code (`str`) – nexus field type

      - shape (`list` < `int` >) – shape

      - chunk (`list` < `int` >) – chunk

      - dfilter (`H5PYDataFilter`) – filter deflater

    Returns

      file tree field

    Return type

      `H5PYField`

  `create_group`(n, nxclass='')

    open a file tree element

    Parameters

      - n (`str`) – group name

      - nxclass (`str`) – group type

    Returns

      file tree group

    Return type

      `H5PYGroup`

  `create_virtual_field`(name, layout, fillvalue=None)

    creates a virtual filed tres element

    Parameters

      - name (`str`) – group name

      - layout (`H5PYFieldLayout`) – virual field layout

      - fillvalue (`int`) – fill value

  `exists`(name)

    if child exists

    Parameters

      name (`str`) – child name

    Returns

      existing flag

    Return type

      `bool`

  property `is_valid`

    check if group is valid

    Returns

      valid flag

    Return type

      `bool`

  `names`()

    read the child names

    Returns

      h5 object

    Return type

      `list` <str>

  `open`(name)

    open a file tree element

    Parameters

      name (`str`) – element name

    Returns

      file tree object

    Return type

      `FTObject`

  `open_link`(name)

    open a file tree element as link

    Parameters

      name (`str`) – element name

    Returns

      file tree object

    Return type

      `FTObject`

  `reopen`()

    reopen file

  property `size`

    group size

    Returns

      group size

    Return type

      `int`

class `lavuelib.h5pywriter.` `H5PYLink`(h5object, tparent=None)

  Bases: `lavuelib.filewriter.FTLink`

  file tree link

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - tparent (`FTObject`) – treee parent

  `close`()

    close group

  classmethod `getfilename`(obj)

    provides a filename from h5 node

    Parameters

      obj (`FTObject`) – h5 node

    Returns

      file name

    Return type

      `str`

  property `is_valid`

    check if link is valid

    Returns

      valid flag

    Return type

      `bool`

  `read`()

    read object value

    Returns

      valid flag

    Return type

      `bool`

  `refresh`()

    refresh the field

    Returns

      refreshed

    Return type

      `bool`

  `reopen`()

    reopen field

  `setname`(name)
  property `target_path`

    target path

    Returns

      target path

    Return type

      `str`

class `lavuelib.h5pywriter.` `H5PYTargetFieldView`(h5object, shape)

  Bases: `lavuelib.filewriter.FTTargetFieldView`

  target field view for VDS

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - shape (`list` < `int` >) – shape

  `shape`

    (`list` < `int` >) shape

class `lavuelib.h5pywriter.` `H5PYVirtualFieldLayout`(h5object, shape)

  Bases: `lavuelib.filewriter.FTVirtualFieldLayout`

  virtual field layout

  constructor

  Parameters

    - h5object (`any`) – h5 object

    - shape (`list` < `int` >) – shape

  `add`(key, source, sourcekey=None, shape=None)

    add target field to layout

    Parameters

      - key (`tuple`) – slide

      - source (`H5PYTargetFieldView`) – target field view

      - sourcekey (`tuple`) – slide or selection

      - shape (`tuple`) – target shape in the layout

  `shape`

    (`list` < `int` >) shape

`lavuelib.h5pywriter.` `create_file`(filename, overwrite=False, **pars)

  create a new file

  Parameters

    - filename (`str`) – file name

    - overwrite (`bool`) – overwrite flag

    - pars (`dict` < `str`, `str`>) – parameters

  Returns

    file object

  Return type

    `H5PYFile`

`lavuelib.h5pywriter.` `data_filter`()

  create deflate filter

  Returns

    deflate filter object

  Return type

    `H5PYDataFilter`

`lavuelib.h5pywriter.` `deflate_filter`()

  create deflate filter

  Returns

    deflate filter object

  Return type

    `H5PYDataFilter`

`lavuelib.h5pywriter.` `get_links`(parent)

  get links

  Parameters

    parent (`FTObject`) – parent object

  Returns

    list of link objects

  Returns

    link object

  Return type

    obj

      list <`H5PYLink`>

`lavuelib.h5pywriter.` `is_image_file_supported`()

  provides if loading of image files are supported

  Retruns

    if loading of image files are supported

  Return type

    `bool`

`lavuelib.h5pywriter.` `is_mbs_supported`()

  provides if MultiBlockSlice are supported

  Retruns

    if MultiBlockSlice are supported

  Return type

    `bool`

`lavuelib.h5pywriter.` `is_strings_as_bytes`()

  provides if string read to bytes

  Retruns

    if string read to bytes

  Return type

    `bool`

`lavuelib.h5pywriter.` `is_unlimited_vds_supported`()

  provides if unlimited vds are supported

  Retruns

    if unlimited vds are supported

  Return type

    `bool`

`lavuelib.h5pywriter.` `is_vds_supported`()

  provides if VDS are supported

  Retruns

    if VDS are supported

  Return type

    `bool`

`lavuelib.h5pywriter.` `link`(target, parent, name)

  create link

  Parameters

    - target (`str`) – file name

    - parent (`FTObject`) – parent object

    - name (`str`) – link name

  Returns

    link object

  Return type

    `H5PYLink`

`lavuelib.h5pywriter.` `load_file`(membuffer, filename=None, readonly=False, **pars)

  load a file from memory byte buffer

  Parameters

    - membuffer (`bytes` or `io.BytesIO`) – memory buffer

    - filename (`str`) – file name

    - readonly (`bool`) – readonly flag

    - pars (`dict` < `str`, `str`>) – parameters

  Returns

    file object

  Return type

    `H5PYFile`

`lavuelib.h5pywriter.` `nptype`(dtype)

  converts to numpy types

  Parameters

    dtype (`str`) – h5 writer type type

  Returns

    nupy type

  Return type

    `str`

`lavuelib.h5pywriter.` `open_file`(filename, readonly=False, **pars)

  open the new file

  Parameters

    - filename (`str`) – file name

    - readonly (`bool`) – readonly flag

    - pars (`dict` < `str`, `str`>) – parameters

  Returns

    file object

  Return type

    `H5PYFile`

`lavuelib.h5pywriter.` `target_field_view`(filename, fieldpath, shape, dtype=None, maxshape=None)

  create target field view for VDS

  Parameters

    - filename (`str`) – file name

    - fieldpath (`str`) – nexus field path

    - shape (`list` < `int` >) – shape

    - dtype (`str`) – attribute type

    - maxshape (`list` < `int` >) – shape

  Returns

    target field view object

  Return type

    `FTTargetFieldView`

`lavuelib.h5pywriter.` `unlimited`(parent=None)

  return dataspace UNLIMITED variable for the current writer module

  Parameters

    parent (`FTObject`) – parent object

  Returns

    dataspace UNLIMITED variable

  Return type

    `h5py.h5s.UNLIMITED`

`lavuelib.h5pywriter.` `unlimited_selection`(sel, shape)

  checks if hyperslab is unlimited

  Parameters

    - sel (`filewriter.FTHyperslab`) – hyperslab selection

    - shape (`list`) – give shape

  Returns

    if hyperslab is unlimited list

  Return type

    `list` <`bool`>

`lavuelib.h5pywriter.` `virtual_field_layout`(shape, dtype, maxshape=None)

  creates a virtual field layout for a VDS file

  Parameters

    - shape (`list` < `int` >) – shape

    - dtype (`str`) – attribute type

    - maxshape (`list` < `int` >) – shape

  Returns

    virtual layout

  Return type

    `FTVirtualFieldLayout`

## lavuelib.helpForm

help widget

class `lavuelib.helpForm.` `HelpForm`(page, parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  constructor

  Parameters

    - page (`str`) – the starting html page

    - parent (`pyqtgraph.QtCore.QObject`) – parent widget

  `createActions`()

    creates actions and sets the command pool and stack

  `createGUI`()

    creates dialogs for help dialog

  `updatePageTitle`()

    resets the __pageLabel withg the document title

## lavuelib.hidraServerList module

A list of possible hidra servers. Take your pick.

`lavuelib.hidraServerList.` `HIDRASERVERLIST` = {'p03': ['haspp03pilatus.desy.de'], 'p08': ['haspp08pil100.desy.de', 'haspp08perk01.desy.de'], 'p09': ['haspp09pilatus.desy.de'], 'p10': ['haspp10pilatus.desy.de'], 'p11': ['haspp11pilatus.desy.de'], 'pool': ['haspilatus300k.desy.de', 'haspilatus1m.desy.de', 'haspilatus100k.desy.de']}

  (`dict` < `str`, `list` <`str`> >) server dictionary

## lavuelib.highValueMaskWidget module

mask widget

class `lavuelib.highValueMaskWidget.` `HighValueMaskWidget`(parent=None, settings=None)

  Bases: `PyQt5.QtWidgets.QWidget`

  Define and apply masking of the displayed image.

  constructor

  Parameters

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

    - settings (`lavuelib.settings.Settings`) – lavue configuration settings

  `applyStateChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) apply state change signal

  `mask`()

    provides the image mask high value

    Returns

      high pixel value for masking

    Return type

      `str`

  `maskHighValueChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) mask high value changed signal

  `noValue`()

    unchecks the apply checkbox and clear the file display

  `setDisplayedValue`(value)

    sets displayed high pixel value

    Parameters

      name (`str`) – high pixel value

  `setMask`(value)

    sets the image mask high value

    Parameters

      fname (`str`) – high pixel value for masking

## lavuelib.histogramWidget module

Horizontal HistogramWidget

class `lavuelib.histogramWidget.` `HistogramHLUTWidget`(parent=None, bins=None, step=None, *args, **kargs)

  Bases: `pyqtgraph.widgets.GraphicsView.GraphicsView`

  Horizontal HistogramWidget

  constructor

  Parameters

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

    - bins (`str`) – bins edges algorithm for histogram, default: ‘auto’

    - step (`str` or `int`) – data step for calculation of histogram levels, default: ‘auto’

    - args (`list` < `any`>) – HistogramHLUTItem parameters list

    - kargs (`dict` < `str`, `any`>) – HistogramHLUTItem parameter dictionary

  `item`

    (`HistogramHLUTItem`) histogram item

  `setAutoFactor`(factor)

    sets auto level factor

    Parameters

      factor (`float`) – auto level factor of maximal peak

  `setBins`(bins)

    sets bins edges algorithm for histogram

    Parameters

      channel (`str`) – bins edges algorithm for histogram

  `setStep`(step)

    sets image step data for algorithm of histogram

    Parameters

      channel (`int`) – image step data for algorithm of histogram

  `sizeHint`()

    sets size hint

## lavuelib.imageDisplayWidget module

image display widget

class `lavuelib.imageDisplayWidget.` `AxesParameters`

  Bases: `object`

  axes parameters

  constructor

  `enabled`

    (`bool`) enabled flag

  `scale`

    (`tuple` <`float`, `float`> ) image scale (x,y)

  `xtext`

    (`str`) label of x-axis

  `xunits`

    (`str`) units of x-axis

  `ytext`

    (`str`) label of y-axis

  `yunits`

    (`str`) units of y-axis

class `lavuelib.imageDisplayWidget.` `ImageDisplayWidget`(parent=None)

  Bases: `pyqtgraph.widgets.GraphicsLayoutWidget.GraphicsLayoutWidget`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `addExtensions`(extlist)

    provides viewbox :param extlist: extension list :type extlist: `list` < `DisplayExtension` >

  `aspectLockedToggled`

    (`pyqtgraph.QtCore.pyqtSignal`) aspect locked toggled signal

  `autoRange`()

    sets auto range

  `axestext`()

    return axes text :returns: x,y text :rtype: (`str`, `str`)

  `axesunits`()

    return axes units :returns: x,y units :rtype: (`str`, `str`)

  `currentData`()

    provides the data

    Returns

      current data

    Return type

      `numpy.ndarray`

  `currentIntensity`()

    provides intensity for current mouse position

    Returns

      (x position, y position, pixel intensity, x position, y position)

    Return type

      (float, float, float, float, float)

  `descaledxy`(x, y, useraxes=True)

    provides scaled x,y positions

    Parameters

      - x (float) – x pixel coordinate

      - y (float) – y pixel coordinate

      - useraxes (`bool`) – use user scaling

    Returns

      scaled x,y position

    Return type

      (float, float)

  `emitAspectLockedToggled`(status)

    emits aspectLockedToggled

    Parameters

      status (`bool`) – aspectLockedToggled status

  `extension`(name)

    provides viewbox :param name: extension name :type name: `str` :rtype: `DisplayExtension` :returns: display extension

  `extensions`()

    provides extension names

    Return type

      `list`

    Returns

      extension names

  `gradientColors`()

    gets gradientcolors on/off

    Returns

      True for on and False for off

    Return type

      `bool`

  `image`(iid=0)

    provides imageItem object

    Parameters

      iid (`int`) – image id

    Returns

      image object

    Return type

      `pyqtgraph.imageItem.ImageItem`

  `levelMode`()

    gets level mode

    Returns

      level mode, i.e. mono or rgba

    Return type

      `str`

  `mouseImageDoubleClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) mouse double clicked

  `mouseImagePositionChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) mouse position changed signal

  `mouseImageSingleClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) mouse single clicked

  `mouse_click`(event)

    updates image widget after mouse click

    Parameters

      event (`pyqtgraph.QtCore.QEvent`) – mouse click event

  `mouse_position`(event=None)

    updates image widget after mouse position change

    Parameters

      event (`pyqtgraph.QtCore.QEvent`) – mouse move event

  `rangeWindowEnabled`()

    provide info if range window enabled

    Returns

      range window enabled

    Return type

      `bool`

  `rangeWindowScale`()

    provide info about range window sclae

    Returns

      range window scale

    Return type

      `float`

  `rawData`()

    provides the raw data

    Returns

      current raw data

    Return type

      `numpy.ndarray`

  `rgb`()

    gets RGB on/off

    Returns

      True for on and False for off

    Return type

      `bool`

  `scale`(useraxes=True, noNone=False)

    provides scale and position of the axes

    Parameters

      - useraxes (`bool`) – use user scaling

      - noNone (`bool`) – return values without None

    Return type

      [int, int, int, int]

    Returns

      [posx, posy, scalex, scaley]

  `scaledxy`(x, y, useraxes=True)

    provides scaled x,y positions

    Parameters

      - x (float) – x pixel coordinate

      - y (float) – y pixel coordinate

      - useraxes (`bool`) – use user scaling

    Returns

      scaled x,y position

    Return type

      (float, float)

  `scaling`()

    provides scaling type

    Returns

      scaling type

    Return type

      str

  `scalingLabel`()

    provides scaling label

    Returns

      scaling label

    Return type

      str

  `setAspectLocked`(flag)

    sets aspectLocked

    Parameters

      status (`bool`) – state to set

    Returns

      old state

    Return type

      `bool`

  `setAutoDownSample`(autodownsample)

    sets auto levels

    Parameters

      autolevels (`bool`) – auto down sample enabled

  `setAutoLevels`(autolevels)

    sets auto levels

    Parameters

      autolevels (`bool`) – auto levels enabled

  `setDisplayChannelLevels`(levels=None)

    sets maximum intensity levels

    Parameters

      levels (`list` < (:obj`float`:, :obj`float`:)>) – channel intensity levels

  `setDisplayMaxLevel`(level=None)

    sets maximum intensity level

    Parameters

      level (`float`) – maximum intensity

  `setDisplayMinLevel`(level=None)

    sets minimum intensity level

    Parameters

      level (`float`) – minimum intensity

  `setDoBFSubtraction`(state)

    sets do brightfield subtraction flag

    Parameters

      status (`bool`) – do brightfield subtraction flag

  `setDoBkgSubtraction`(state)

    sets do background subtraction flag

    Parameters

      status (`bool`) – do background subtraction flag

  `setDoubleClickLock`(status=True)

    sets double click lock :param status: status flag :type status: `bool`

  `setGradientColors`(status=True)

    sets gradientcolors on/off

    Parameters

      status (`bool`) – True for on and False for off

  `setLevelMode`(levelmode=True)

    sets levelmode

    Parameters

      levelmode (`str`) – level mode, i.e. mono or rgba

  `setScalingType`(scalingtype)

    sets intensity scaling types

    Parameters

      scalingtype (`str`) – intensity scaling type

  `setStatsWOScaling`(status)

    sets statistics without scaling flag

    Parameters

      status (`bool`) – statistics without scaling flag

    Returns

      change status

    Return type

      `bool`

  `setSubWidgets`(parameters)

    set subwidget properties

    Parameters

      parameters (`lavuelib.toolWidget.ToolParameters`) – tool parameters

  `setTicks`()

    launch axes widget

    Returns

      apply status

    Return type

      `bool`

  `setToolScale`(position=None, scale=None)

    set axes scales

    Parameters

      - position ([`float`, `float`]) – start position of axes

      - scale ([`float`, `float`]) – scale axes

      - update – update scales on image

  `setTransformations`(transpose, leftrightflip, updownflip, orgtranspose)

    sets coordinate transformations

    Parameters

      - transpose (`bool`) – transpose coordinates flag

      - leftrightflip (`bool`) – left-right flip coordinates flag

      - updownflip (`bool`) – up-down flip coordinates flag

      - orgtranspose (`bool`) – selected transpose coordinates flag

  `setViewRange`(rangelist)

    set view range values

    Parameters

      rangelist (`str`) – xmin,ymin,xsize,ysize

  `setrgb`(status=True)

    sets RGB on/off

    Parameters

      status (`bool`) – True for on and False for off

  `transformations`()

    povides coordinates transformations

    Returns

      transpose, leftrightflip, updownflip flags, original transpose

    Return type

      (`bool`, `bool`, `bool`)

  `updateImage`(img=None, rawimg=None)

    updates the image to display

    Parameters

      - img (`numpy.ndarray`) – 2d image array

      - rawimg (`numpy.ndarray`) – 2d raw image array

  `updateMetaData`(axisscales=None, axislabels=None, rescale=False)

    update Metadata informations

    Parameters

      - axisscales ([`float`, `float`, `float`, `float`]) – [xstart, ystart, xscale, yscale]

      - axislabels ([`float`, `float`, `float`, `float`]) – [xtext, ytext, xunits, yunits]

      - rescale (`True`) – rescale or select range window

  `updateTicks`(record)

    update Ticks values

    Parameters

      record (`dict`<:obj:`str`, any>) – dict record with the tick parameters: “position” : [x, y] “scale” : [sx, sy] “xtext” : xlabel “ytext” : ylabel “xunits” : xunits “yunits” : yunits

  `viewRange`()

    get view range values

    Returns

      xmin,ymin,xsize,ysize

    Rtype rangelist

      `str`

  `viewbox`()

    provides viewbox :rtype: `pyqtgraph.ViewBox` :returns: viewbox

class `lavuelib.imageDisplayWidget.` `IntensityParameters`

  Bases: `object`

  intensity parameters

  constructor

  `dobfsubtraction`

    (`bool`) do brightfield substraction

  `dobkgsubtraction`

    (`bool`) do background substraction

  `scaling`

    (`str`) intensity scaling

  `statswoscaling`

    (`bool`) calculate statistics without scaling

class `lavuelib.imageDisplayWidget.` `SafeImageItem`(*args, **kargs)

  Bases: `pyqtgraph.graphicsItems.ImageItem.ImageItem`

  Image item which caught exceptions in paint

  constructor

  Parameters

    - args (`list` < `any`>) – ImageItem parameters list

    - kargs (`dict` < `str`, `any`>) – ImageItem parameter dictionary

  `paint`(p, *args)

    safe paint method

    Parameters

      - p (`PyQt5.QtGui.QPainter`) – painter

      - args (`list` < `any`>) – ImageItem parameters list

class `lavuelib.imageDisplayWidget.` `TransformationParameters`

  Bases: `object`

  transformation parameters

  constructor

  `leftrightflip`

    (`bool`) left-right flip coordinates flag

  `orgtranspose`

    (`bool`) transpose coordinates flag

  `transpose`

    (`bool`) transpose coordinates flag

  `updownflip`

    (`bool`) up-down flip coordinates flag

## lavuelib.imageField

configuration widget

class `lavuelib.imageField.` `ImageField`(parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `accept`()

    updates class variables with the form content

  `createGUI`()

    create GUI

  `field`

    (`str`) selected field

  `fields`

    (`dict` <`str`, `dict` <`str`, `any`>>) image field dictionary

  `frame`

    (`int`) frame

  `growing`

    (`int`) growing dimension

## lavuelib.imageFileHandler module

this a simple file handler that loads image files and delivers just the actual array

class `lavuelib.imageFileHandler.` `CBFLoader`

  Bases: `object`

  CBF loader

  classmethod `load`(flbuffer)

    loads CBF file image data into numpy array

    Parameters

      flbuffer (`numpy.ndarray`) – numpy array with CBF file image data

    Returns

      image data

    Return type

      `numpy.ndarray`

  classmethod `metadata`(flbuffer, premeta=None)

    extract header_contents from CBF file image data

    Parameters

      - flbuffer (`numpy.ndarray` or `str`) – numpy array with CBF file image data

      - premeta (`dict` <`str`, `any`>) – metadata to be merged

    Returns

      metadata dictionary

    Return type

      `numpy.ndarray`

`lavuelib.imageFileHandler.` `FABIO` = True

  (`bool`) fabio can be imported

class `lavuelib.imageFileHandler.` `ImageFileHandler`(fname)

  Bases: `object`

  Simple file handler class. Reads image from file and returns the numpy array.

  constructor

  Parameters

    fname (`str`) – file name

  `getImage`()

    provides the image data

    Returns

      image data

    Return type

      `numpy.ndarray`

  `getMetaData`()

    provides the image metadata

    Returns

      JSON dictionary with image metadata

    Return type

      `str`

class `lavuelib.imageFileHandler.` `NexusFieldHandler`(fname=None, writer=None)

  Bases: `object`

  Nexus file handler class. Reads image from file and returns the numpy array.

  constructor

  Parameters

    - fname (`str`) – file name

    - writer (`str`) – h5 writer module: “h5cpp” or “h5py”

  classmethod `extract`(value)
  `findImageFields`()

    provides a dictionary with of all image fields

    Returns

      dictionary of the field names and the field objects

    Return type

      `dict` <`str`, `dict` <`str`, `any`>>

  `frombuffer`(membuffer, fname=None, writer=None)

    constructor

    Parameters

      - membuffer (`bytes` or `io.BytesIO`) – memory buffer

      - fname (`str`) – file name

      - writer (`str`) – h5 writer module: “h5py” or “h5py”

  classmethod `getFrameCount`(node, growing=0, refresh=True)

    provides the last frame number

    Parameters

      - node (`lavuelib.filewriter.FTField`) – nexus field node

      - growing (`int`) – growing dimension

      - refresh (`bool`) – refresh image node

    Returns

      a number of frames

    Return type

      `int`

  classmethod `getImage`(node, frame=- 1, growing=0, refresh=True)

    parses the field and add it into the description list

    Parameters

      - node (`lavuelib.filewriter.FTField`) – nexus field node

      - frame (`int`) – frame to take, the last one is -1

      - growing (`int`) – growing dimension

      - refresh (`bool`) – refresh image node

    Returns

      get the image

    Return type

      `numpy.ndarray`

  classmethod `getMetaData`(node, mdata=None, maxrec=4)

    provides the image metadata

    Returns

      JSON dictionary with image metadata

    Return type

      `str`

  `getNode`(field=None)

    get node :param field: field path :type field: `str` :returns: nexus field node :rtype: `lavuelib.filewriter.FTField`

`lavuelib.imageFileHandler.` `PILLOW` = True

  (`bool`) PIL can be imported

class `lavuelib.imageFileHandler.` `TIFLoader`

  Bases: `object`

  TIF loader

  classmethod `load`(flbuffer)

    loads TIF file image data into numpy array

    Parameters

      flbuffer (`numpy.ndarray`) – numpy array with TIF file image data

    Returns

      image data

    Return type

      `numpy.ndarray`

`lavuelib.imageFileHandler.` `WRITERS` = {'h5cpp': <module 'lavuelib.h5cppwriter' from '/home/jkotan/sources/lavue/lavuelib/h5cppwriter.py'>, 'h5py': <module 'lavuelib.h5pywriter' from '/home/jkotan/sources/lavue/lavuelib/h5pywriter.py'>}

  (`dict` <`str`, `module`> ) nexus writer modules

## lavuelib.imageNexusExporter module

image Nexus exporter

class `lavuelib.imageNexusExporter.` `ImageNexusExporter`(item)

  Bases: `pyqtgraph.exporters.Exporter.Exporter`

  NeXus Raw Image Exporter

  constructor

  Parameters

    - item – image item

    - item –

      class

        pyqtgraph.PlotItem or pyqtgraph.GraphicsScene

  `Name` = 'NeXus Raw Image'
  `allowCopy` = False
  `export`(fileName=None)

    export data image to NeXus file

    Parameters

      fileName – output file name

    Rtype fileName

      `str`

  `parameters`()
    Returns

      exporter parameters

    Return type

      `pyqtgraph.parametertree.Parameter`

  `params`

    (`pyqtgraph.parametertree.Parameter`) exporter parameters

  `windows` = []

## lavuelib.imageSource module

set of image sources

`lavuelib.imageSource.` `ASAPO` = False

  (`bool`) asapo imported

class `lavuelib.imageSource.` `ASAPOSource`(timeout=None)

  Bases: `lavuelib.imageSource.BaseSource`

  asapo image source

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `connect`()

    connects the source

  `disconnect`()

    disconnects the source

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

  `getMetaData`()

    get metadata

    Returns

      dictionary with metadata

    Return type

      `dict` <`str`, `any`>

  `setConfiguration`(configuration)

    set configuration

    Parameters

      configuration (`str`) – configuration string

class `lavuelib.imageSource.` `BaseSource`(timeout=None)

  Bases: `object`

  source base class

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `connect`()

    connects the source

  `disconnect`()

    disconnects the source

  `errormessage`

    (`str`) errormessage

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

  `getMetaData`()

    get metadata

    Returns

      dictionary with metadata

    Return type

      `dict` <`str`, `any`>

  `setConfiguration`(configuration)

    set configuration

    Parameters

      configuration (`str`) – configuration string

  `setTimeOut`(timeout)

    set timeout

    Parameters

      timeout (`int`) – timeout in ms

class `lavuelib.imageSource.` `DATAARRAYdecoder`

  Bases: `object`

  DATA ARRAY LIMA decoder

  constructor

  Brief

    It clears the local variables

  `decode`()

    provides the decoded data

    Returns

      the decoded data if data was loaded

    Return type

      `numpy.ndarray`

  `dtype`

    (`str`) data type

  `format`

    (`str`) decoder format

  `frameNumber`()

    no data

  `load`(data)

    loads encoded data

    Parameters

      data ([`str`, `str`]) – encoded data

  `name`

    (`str`) decoder name

  `shape`()

    provides the data shape

    Returns

      the data shape if data was loaded

    Return type

      `list` <`int` >

  `steps`()

    provides the data steps

    Returns

      the data steps if data was loaded

    Return type

      `list` <`int` >

class `lavuelib.imageSource.` `DOOCSPropSource`(timeout=None)

  Bases: `lavuelib.imageSource.BaseSource`

  image source as IMAGE DOOCS property

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `connect`()

    connects the source

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

class `lavuelib.imageSource.` `EpicsPVSource`(timeout=None)

  Bases: `lavuelib.imageSource.BaseSource`

  image source as Epics Process variable

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `connect`()

    connects the source

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

class `lavuelib.imageSource.` `FixTestSource`(timeout=None)

  Bases: `lavuelib.imageSource.BaseSource`

  image source as Tango attributes describing an image file name and its directory

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `connect`()

    connects the source

  `disconnect`()

    disconnects the source

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

`lavuelib.imageSource.` `HIDRA` = False

  (`bool`) hidra imported

class `lavuelib.imageSource.` `HTTPSource`(timeout=None)

  Bases: `lavuelib.imageSource.BaseSource`

  image source as HTTP request response

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `connect`()

    connects the source

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

class `lavuelib.imageSource.` `HiDRASource`(timeout=None)

  Bases: `lavuelib.imageSource.BaseSource`

  hidra image source

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `connect`()

    connects the source

  `disconnect`()

    disconnects the source

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

  `setConfiguration`(configuration)

    set configuration

    Parameters

      configuration (`str`) – configuration string

class `lavuelib.imageSource.` `NXSFileSource`(timeout=None)

  Bases: `lavuelib.imageSource.BaseSource`

  image source as Tango attributes describing an image file name and its directory

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `connect`()

    connects the source

  `disconnect`()

    disconnects the source

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

  `setConfiguration`(configuration)

    set configuration

    Parameters

      configuration (`str`) – configuration string

`lavuelib.imageSource.` `PILLOW` = True

  (`bool`) PIL imported

`lavuelib.imageSource.` `PYDOOCS` = False

  (`bool`) pydoocs imported

`lavuelib.imageSource.` `PYEPICS` = False

  (`bool`) pyepics imported

`lavuelib.imageSource.` `PYFAI` = True

  (`bool`) pyFAI imported

`lavuelib.imageSource.` `PYTG_BUG_213` = False

  (`bool`) PyTango bug #213 flag related to EncodedAttributes in python3

`lavuelib.imageSource.` `REQUESTS` = True

  (`bool`) requests imported

`lavuelib.imageSource.` `TANGO` = True

  (`bool`) tango imported

class `lavuelib.imageSource.` `TangoAttrSource`(timeout=None)

  Bases: `lavuelib.imageSource.BaseSource`

  image source as IMAGE Tango attribute

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `connect`()

    connects the source

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

class `lavuelib.imageSource.` `TangoEventsCB`(client, name, mutex)

  Bases: `object`

  tango attribute callback class

  constructor

  Parameters

    - client (`str`) – tango controller client

    - name (`str`) – attribute name

    - mutex – mutex lock for CB

  `push_event`(event_data)

    callback method receiving the event

class `lavuelib.imageSource.` `TangoEventsSource`(timeout=None)

  Bases: `lavuelib.imageSource.BaseSource`

  image source as IMAGE Tango attribute

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `connect`()

    connects the source

  `disconnect`()

    disconnects the source

  `fresh`

    (`bool`) fresh attribute flag

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

  `reading`

    (`bool`) reading flag

class `lavuelib.imageSource.` `TangoFileSource`(timeout=None)

  Bases: `lavuelib.imageSource.BaseSource`

  image source as Tango attributes describing an image file name and its directory

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `connect`()

    connects the source

  `disconnect`()

    disconnects the source

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

class `lavuelib.imageSource.` `TangoReadyEventsCB`(client, name, mutex)

  Bases: `object`

  tango attribute callback class

  constructor

  Parameters

    - client (`str`) – tango controller client

    - name (`str`) – attribute name

    - mutex – mutex lock for CB

  `push_event`(event_data)

    callback method receiving the event

class `lavuelib.imageSource.` `TinePropSource`(timeout=None)

  Bases: `lavuelib.imageSource.BaseSource`

  image source as Tine Property

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

  `setConfiguration`(configuration)

    set configuration

    Parameters

      configuration (`str`) – configuration string

class `lavuelib.imageSource.` `VDEOdecoder`

  Bases: `object`

  VIDEO IMAGE LIMA decoder

  constructor

  Brief

    It clears the local variables

  `decode`()

    provides the decoded data

    Returns

      the decoded data if data was loaded

    Return type

      `numpy.ndarray`

  `dtype`

    (`str`) data type

  `format`

    (`str`) decoder format

  `frameNumber`()

    provides the frame number

    Returns

      the frame number

    Return type

      `int`

  `load`(data)

    loads encoded data

    Parameters

      data ([`str`, `str`]) – encoded data

  `name`

    (`str`) decoder name

  `shape`()

    provides the data shape

    Returns

      the data shape if data was loaded

    Return type

      `list` <`int` >

`lavuelib.imageSource.` `ZMQMAJOR` = 4

  (`str`,:obj:str) zmq major version, zmq minor version

`lavuelib.imageSource.` `ZMQMINOR` = 3

  (`str`,:obj:str) zmq major version, zmq minor version

class `lavuelib.imageSource.` `ZMQSource`(timeout=None)

  Bases: `lavuelib.imageSource.BaseSource`

  image source as ZMQ stream

  constructor

  Parameters

    timeout (`int`) – timeout for setting connection in ms

  `connect`()

    connects the source

  `disconnect`()

    disconnects the source

  `getData`()

    provides image name, image data and metadata

    Returns

      image name, image data, json dictionary with metadata

    Return type

      (`str` , `numpy.ndarray` , `str`)

  `setConfiguration`(configuration)

    set configuration

    Parameters

      configuration (`str`) – configuration string

`lavuelib.imageSource.` `currenttime`()

  provides current time in iso format

  Returns

    current time in iso format

  Return type

    `str`

`lavuelib.imageSource.` `fbmj` = '0'

  (`bool`) fabio can be imported

`lavuelib.imageSource.` `fbmn` = '11'

  (`bool`) fabio can be imported

`lavuelib.imageSource.` `fbpa` = '0'

  (`bool`) fabio can be imported

`lavuelib.imageSource.` `tobytes`(x)

  decode str to bytes

  Parameters

    x (`str`) – string

  Returns

    decode string in byte array

  Return type

    `bytes`

`lavuelib.imageSource.` `tostr`(x)

  decode bytes to str

  Parameters

    x (`bytes`) – string

  Returns

    decode string in byte array

  Return type

    `str`

## lavuelib.imageWidget module

image widget

class `lavuelib.imageWidget.` `ImageWidget`(parent=None, tooltypes=None, settings=None)

  Bases: `PyQt5.QtWidgets.QWidget`

  The part of the GUI that incorporates the image view.

  constructor

  Parameters

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

    - tooltypes (`list` <`str`>) – tool class names

    - settings (`lavuelib.settings.Settings`) – lavue configuration settings

  `applyMask`()

    provides apply mask flag

    Returns

      True for apply mask

    Return type

      `bool`

  `applyROIs`(rlabel, roispin)

    saves ROIs in sardana and add them to the measurement group

    Parameters

      - rlabel (`str`) – rois aliases separated by space

      - roispin (`int`) – the current number of rois

  `applyTipsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) apply tips changed signal

  `aspectLockedToggled`

    (`pyqtgraph.QtCore.pyqtSignal`) aspect locked toggled signal

  `autoRange`()

    sets auto range

  `axestext`()

    return axes text

    Returns

      x,y text

    Return type

      (`str`, `str`)

  `axesunits`()

    return axes units

    Returns

      x,y units

    Return type

      (`str`, `str`)

  `bottomplotShowMenu`(freeze=False, clear=False)

    shows freeze or/and clean action in the menu

    Parameters

      - freeze (`bool`) – freeze show status

      - freeze – clean show status

  `bottomplotStretch`(stretch=1)

    stretches the bottom plot

    Parameters

      stretch (`int`) – stretch factor

  `calcROIsum`()

    calculates the current roi sum

    Returns

      sum roi value, roi id

    Return type

      (`str`, `int`)

  `calcROIsums`()

    calculates all roi sums

    Returns

      sum roi value, roi id

    Return type

      `list` < float >

  `changeMeshRegion`()

    changes the current roi region

  `changeROIRegion`()

    changes the current roi region

  `clearBottomPlotClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) clear clicked signal

  `colorsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) colors changed signal

  `currentCut`()

    provides current cut id

    Returns

      cut id

    Return type

      `int`

  `currentData`()

    provides the data

    Returns

      current data

    Return type

      `numpy.ndarray`

  `currentIntensity`()

    provides intensity for current mouse position

    Returns

      x position, y position, pixel intensity

    Return type

      (float, float, float)

  `currentROI`()

    provides current roi id

    Returns

      roi id

    Return type

      `int`

  `currentTool`()

    provides the current tool

    Returns

      current tool name

    Return type

      `str`

  `currentToolChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) current tool changed signal

  `cutCoords`()

    provides cuts coordinates

    Returns

      cuts coordinates

    Return type

      `list` < [`float`, `float`, `float`, `float`] >

  `cutCoordsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) cut coordinate changed signal

  `cutData`(cid=None)

    provides the current cut data

    Parameters

      cid (`int`) – cut id

    Returns

      current cut data

    Return type

      `numpy.ndarray`

  `cutNumberChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) cut number changed signal

  `disconnecttool`()

    disconnect current tool widget

  `emitAspectLockedToggled`(status)

    emits aspectLockedToggled

    Parameters

      status (`bool`) – current state

  `emitCutCoordsChanged`()

    emits cutCoordsChanged

  `emitReplotImage`(autorange=True)

    emits replotImage

  `emitTCC`()

    emits toolConfigurationChanged

  `fetchROIs`(rlabel)

    loads ROIs from sardana

    Parameters

      rlabel (`str`) – rois aliases separated by space

  `freezeBottomPlotClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) freeze clicked signal

  `geometryChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) geometry changed

  `getDoor`()

    runs macro

    Parameters

      command (`list` <`str`>) – command list

    Returns

      macro runned

    Return type

      `bool`

  `getElementNames`(listattr, typefilter=None)

    provides experimental Channels

    Parameters

      - listattr (`str`) – pool attribute with list

      - typefilter (`list` <`str`>) – pool attribute with list

    Returns

      names from given pool listattr

    Return type

      `list` <`str`>

  `gradientColors`()

    gets gradientcolors on/off

    Returns

      True for on and False for off

    Return type

      `bool`

  `image`(iid=0)

    provides imageItem object

    Parameters

      iid (`int`) – image id

    Returns

      image object

    Return type

      `pyqtgraph.ImageItem`

  `imageName`()

    provide the current image name

    Returns

      image name

    Return type

      `str`

  `imagePlotted`

    (`pyqtgraph.QtCore.pyqtSignal`) image plotted signal

  `levelMode`()

    gets level mode

    Returns

      level mode, i.e. mono or rgba

    Return type

      `str`

  `maskIndices`()

    provides mask image indices

    Returns

      mask image indices

    Return type

      `numpy.ndarray`

  `maskValue`()

    provides high mask value

    Returns

      high mask value

    Return type

      `float`

  `maskValueIndices`()

    provides mask image value indices

    Returns

      mask image indices

    Return type

      `numpy.ndarray`

  `meshCoords`()

    provides rois coordinates

    Returns

      rois coordinates

    Return type

      `list` < [`float`, `float`, `float`, `float`] >

  `meshCoordsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) mesh coordinate changed signal

  `mouseImageDoubleClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) mouse double clicked

  `mouseImagePositionChanged`
  `mouseImageSingleClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) mouse single clicked

  `onedbarbottomplot`()

    creates 1d bottom bar plot

    Returns

      1d bottom bar plot

    Return type

      `pyqtgraph.BarGraphItem`

  `onedbarrightplot`()

    creates 1d right bar plot

    Returns

      1d right bar plot

    Return type

      `pyqtgraph.BarGraphItem`

  `onedbottomplot`(clear=False, name=None)

    creates 1d bottom plot

    Parameters

      clear (`bool`) – clear flag

    Returns

      1d bottom plot

    Return type

      `pyqtgraph.PlotDataItem`

  `onedrightplot`(clear=False)

    creates 1d right plot

    Parameters

      clear (`bool`) – clear flag

    Returns

      1d right plot

    Return type

      `pyqtgraph.PlotDataItem`

  `onedshowlegend`(show=True)

    shows/hides 1d bottom plot legend

    Parameters

      status (`bool`) – show flag

    Returns

      1d bottom plot

    Return type

      `pyqtgraph.PlotDataItem`

  `plot`(array, rawarray=None, imagename=None)

    plots the image

    Parameters

      - array (`numpy.ndarray`) – 2d image array

      - rawarray (`numpy.ndarray`) – 2d raw image array

      - imagename (`str`) – image name

  `rangeWindowEnabled`()

    provide info if range window enabled

    Returns

      range window enabled

    Return type

      `bool`

  `rangeWindowScale`()

    provide info range window scale

    Returns

      range window scale

    Return type

      `float`

  `rawData`()

    provides the raw data

    Returns

      current raw data

    Return type

      `numpy.ndarray`

  `removebottomplot`(plot)

    removes bottom plot

    Parameters

      plot (`pyqtgraph.PlotItem`) – right plot item

  `removerightplot`(plot)

    removes right plot

    Parameters

      plot (`pyqtgraph.PlotItem`) – right plot item

  `replotImage`

    (`pyqtgraph.QtCore.pyqtSignal`) replot image signal

  `rgb`()

    gets RGB on/off

    Returns

      True for on and False for off

    Return type

      `bool`

  `roiAliasesChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) roi aliases changed signal

  `roiCoords`()

    provides rois coordinates

    Returns

      rois coordinates

    Return type

      `list` < [`float`, `float`, `float`, `float`] >

  `roiCoordsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) roi coordinate changed signal

  `roiLineEditChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) roi Line Edit changed signal

  `roiNumberChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) roi number changed signal

  `roiValueChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) roi value changed signal

  `roilabels`

    (obj`str`) roi labels

  `runMacro`(command)

    runs macro

    Parameters

      command (`list` <`str`>) – command list

    Returns

      macro runned

    Return type

      `bool`

  `sardanaEnabled`

    (`pyqtgraph.QtCore.pyqtSignal`) sardana enabled signal

  `scale`(useraxes=True, noNone=False)

    provides scale and position of the axes

    Parameters

      - useraxes (`bool`) – use user scaling

      - noNone (`bool`) – return values without None

    Return type

      [int, int, int, int]

    Returns

      [posx, posy, scalex, scaley]

  `scaledxy`(x, y, useraxes=True)

    provides scaled x,y positions

    Parameters

      - x (`float`) – x pixel coordinate

      - y (`float`) – y pixel coordinate

      - useraxes (`bool`) – use user scaling

    Returns

      scaled x,y position

    Return type

      (`float`, `float`)

  `scalesChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) scales changed signal

  `scaling`()

    provides scaling type

    Returns

      scaling type

    Return type

      str

  `scalingLabel`()

    provides scaling label

    Returns

      scaling label

    Return type

      str

  `setApplyMask`(applymask=True)

    sets apply mask flag

    Params applymask

      True for apply mask

  `setAspectLocked`(status)

    sets aspectLocked

    Parameters

      status (`bool`) – state to set

    Returns

      old state

    Return type

      `bool`

  `setAutoDownSample`(autodownsample)

    sets auto down sample

    Parameters

      autolevels (`bool`) – auto down sample enabled

  `setAutoLevels`(autolevels)

    sets auto levels

    Parameters

      autolevels (:obj:'int`) – 2: auto levels enabled 1: with autofactor

  `setChannelLevels`(levels=None)

    sets minimum intensity levels

    Parameters

      levels (`list` < (:obj`float`:, :obj`float`:)>) – channel intensity levels

  `setColors`(colors)

    sets item colors

    Parameters

      colors (`str`) – json list of roi colors

  `setDisplayedText`(text=None)

    sets displayed info text and recalculates the current roi sum

    Parameters

      text (`str`) – text to display

  `setDoBFSubtraction`(state)

    sets do brightfield subtraction flag

    Parameters

      status (`bool`) – do brightfield subtraction flag

  `setDoBkgSubtraction`(state)

    sets do background subtraction flag

    Parameters

      status (`bool`) – do background subtraction flag

  `setDoubleClickLock`(status=True)

    sets double click lock

    Parameters

      status (`bool`) – status flag

  `setExtensionsRefreshTime`(refreshtime)

    set display extension refresh time

    Parameters

      refreshtime (`float`) – refresh time in seconds

  `setGradientColors`(status=True)

    sets gradientcolors on/off

    Parameters

      status (`bool`) – True for on and False for off

  `setLevelMode`(levelmode=True)

    sets levelmode

    Parameters

      levelmode (`str`) – level mode, i.e. mono or rgba

  `setMaskIndices`(maskindices)

    sets mask image indices

    Params maskindices

      mask image indices

  `setMaskValue`(maskvalue)

    sets high mask value

    Params applymask

      high mask value

  `setMaskValueIndices`(maskindices)

    sets mask image indices

    Params maskindices

      mask image value indices

  `setMaxLevel`(level=None)

    sets maximum intensity level

    Parameters

      level (`float`) – maximum intensity

  `setMaximaPos`(positionlist, offset=None)

    sets maxima postions

    Parameters

      - positionlist (`list` < (float, float) >) – [(x1, y1), … , (xn, yn)]

      - offset ([ `float`, `float`]) – offset of position

  `setMinLevel`(level=None)

    sets minimum intensity level

    Parameters

      level (`float`) – minimum intensity

  `setSardanaUtils`(sardana)

    sets sardana utils

    Parameters

      sardana (`lavuelib.sardanaUtils.SardanaUtils`) – sardana utils

  `setScalingType`(scalingtype)

    sets intensity scaling types

    Parameters

      scalingtype (`str`) – intensity scaling type

  `setStatsWOScaling`(status)

    sets statistics without scaling flag

    Parameters

      status (`bool`) – statistics without scaling flag

    Returns

      change status

    Return type

      `bool`

  `setTangoClient`(tangoclient)

    sets tango client

    Parameters

      tangoclient (`lavuelib.controllerClient.ControllerClient`) – attribute name

  `setTicks`()

    launch axes widget

    Returns

      apply status

    Return type

      `bool`

  `setTool`(tool)

    sets tool from string

    Parameters

      tool (`str`) – tool name

  `setToolConfiguration`(config)

    sets tool configuration from JSON dictionary

    Parameters

      config (`str`) – JSON dictionary with tool configuration

  `setToolScale`(position=None, scale=None)

    get axes parameters

    Parameters

      - position ([`float`, `float`]) – start position of axes

      - scale ([`float`, `float`]) – scale axes

  `setTransformations`(transpose, leftrightflip, updownflip, orgtranspose, orgleftrightflip, orgupdownflip)

    sets coordinate transformations

    Parameters

      - transpose (`bool`) – transpose coordinates flag

      - leftrightflip (`bool`) – left-right flip coordinates flag

      - updownflip (`bool`) – up-down flip coordinates flag

      - orgtranspose (`bool`) – selected transpose coordinates flag

      - orgleftrightflip (`bool`) – selected left-right flip coordinates flag

      - orgupdownflip (`bool`) – selected up-down flip coordinates flag

  `setViewRange`(rangelist)

    set view range values

    Parameters

      rangelist (`str`) – xmin,ymin,xsize,ysize

  `setrgb`(status=True)

    sets RGB on/off

    Parameters

      status (`bool`) – True for on and False for off

  `settings`()

    provides settings

    Returns

      setting object

    Return type

      `lavuelib.settings.Settings`

  `showCurrentTool`()

    shows the current tool

  `showDoorError`()

    show door error

  `showTool`(text)

    shows the current tool

  `tool`()

    provices tool from string

    Parameters

      tool (`str`) – tool name

  `toolConfiguration`()

    provides tool configuration

    Returns

      JSON dictionary with tool configuration

    Return type

      `str`

  `toolConfigurationChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) tool configuration changed signal

  `transformations`()

    povides coordinates transformations

    Returns

      transpose, leftrightflip, updownflip flags, original transpose

    Return type

      (`bool`, `bool`, `bool`, `bool`)

  `updateBeamCenterX`(x)

    updates the beam center x

    Parameters

      x (`float`) – beam center x

  `updateBeamCenterY`(y)

    updates the beam center y

    Parameters

      y (`float`) – beam center y

  `updateCenter`(xdata, ydata)

    updates the image center

    Parameters

      - xdata (`float`) – x pixel position

      - ydata (`float`) – y-pixel position

  `updateCuts`(cid, coords=None)

    update Cuts

    Parameters

      - cid (`int`) – cut id

      - coords (`list` < [float, float, float, float, float] >) – cut coordinates and width

  `updateDetectorDistance`(distance)

    updates the detector distance

    Parameters

      distance (`float`) – detector distance

  `updateDetectorROIs`(rois)

    updates the detector ROIs

    Parameters

      distance (`str`) – json dictionary with detector ROIs

  `updateDisplayedText`(text)

    sets displayed info text

    Parameters

      text (`str`) – text to display

  `updateDisplayedTextTip`(text)

    sets displayed info text tup

    Parameters

      text (`str`) – tip text to display

  `updateEnergy`(energy)

    updates the beam energy

    Parameters

      energy (`float`) – beam energy

  `updateHBounds`(xdata1, xdata2)

    updates the vertical bounds

    Parameters

      - xdata1 (`float`) – first x-pixel position

      - xdata2 (`float`) – second x-pixel position

  `updateImage`(array=None, rawarray=None)

    update the image

    Parameters

      - array (`numpy.ndarray`) – 2d image array

      - rawarray (`numpy.ndarray`) – 2d raw image array

  `updateMetaData`(axisscales=None, axislabels=None, rescale=False)

    update Metadata informations

    Parameters

      - axisscales ([`float`, `float`, `float`, `float`]) – [xstart, ystart, xscale, yscale]

      - axislabels ([`float`, `float`, `float`, `float`]) – [xtext, ytext, xunits, yunits]

      - rescale (`True`) – rescale or select range window

  `updatePixelSizeX`(x)

    updates the pixel x-size

    Parameters

      x (`float`) – pixel x-size

  `updatePixelSizeY`(y)

    updates the pixel y-size

    Parameters

      y (`float`) – pixel y-size

  `updatePositionMark`(xdata, ydata, scaled=False)

    updates the position mark

    Parameters

      - xdata (`float`) – x pixel position

      - ydata (`float`) – y-pixel position

      - scaled (`bool`) – scaled flag

  `updatePositionTrackingMark`(xdata, ydata, scaled=False)

    updates the position tracking mark

    Parameters

      - xdata (`float`) – x pixel position

      - ydata (`float`) – y-pixel position

      - scaled (`bool`) – scaled flag

  `updateROIs`(rid, coords=None)

    update ROIs

    Parameters

      - rid (`int`) – roi id

      - coords (`list` < [`float`, `float`, `float`, `float`] >) – roi coordinates

  `updateRegions`(points=None, rid=None)

    update Ranges

    Parameters

      - points (`list` < `list` < `list` < (`float`, `float`) > > >) – roi coordinates

      - rid (`int`) – region id

  `updateTicks`(record)

    update Ticks values

    Parameters

      record (`dict`<:obj:`str`, any>) – dict record with the tick parameters: “position” : [x, y] “scale” : [sx, sy] “xtext” : xlabel “ytext” : ylabel “xunits” : xunits “yunits” : yunits

  `updateToolComboBox`(toolnames, name=None)

    set tool by changing combobox

    Parameters

      - toolnames (`list` < `str` >) – tool names

      - index (`int`) – combobox index

  `updateVBounds`(ydata1, ydata2)

    updates the vertical bounds

    Parameters

      - ydata1 (`float`) – first x-pixel position

      - ydata2 (`float`) – second x-pixel position

  `updateinfowidgets`(parameters)
  `viewRange`()

    get view range values

    Returns

      xmin,ymin,xsize,ysize

    Rtype rangelist

      `str`

  `writeAttribute`(name, value)

    writes attribute value of device

    Parameters

      - name (`str`) – attribute name

      - value (`any`) – attribute value

  `writeDetectorAttributes`()

    write detector settings from ai object

  `writeDetectorROIsAttribute`()

    writes DetectorROIsattribute value of device

  `writeDetectorROIsValuesAttribute`(rvalues)

    writes DetectorROIsValuesattribute of device

    Parameters

      rvalues (obj`list < :obj:`float>) – list of roi values

## lavuelib.intervalsDialog module

interval device widget

class `lavuelib.intervalsDialog.` `IntervalsDialog`(parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  interval widget class

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `accept`()

    updates class variables with the form content

  `createGUI`()

    create GUI

  `itime`

    (`float`) integration time in seconds

  `xintervals`

    (`int`) number of x intervals

  `yintervals`

    (`int`) number of y intervals

## lavuelib.levelsGroupBox module

level widget

class `lavuelib.levelsGroupBox.` `LevelsGroupBox`(parent=None, settings=None, expertmode=False)

  Bases: `PyQt5.QtWidgets.QWidget`

  Set minimum and maximum displayed values and its color.

  constructor

  Parameters

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

    - settings (`lavuelib.settings.Settings`) – lavue configuration settings

    - expertmode (`bool`) – expert mode flag

  `autoFactor`()

    provides factor for automatic levels

    Returns

      factor for automatic levels

    Return type

      `str`

  `autoLevelsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) automatic levels changed signal

  `changeView`(showhistogram=None, showlevels=None, showadd=None)

    shows or hides the histogram widget

    Parameters

      - showhistogram (`bool`) – if histogram should be shown

      - showlevels (`bool`) – if levels should be shown

      - showadd (`bool`) – if additional histogram should be shown

  `channelLevels`()

    provides levels from configuration string

    Returns

      channel levels

    Return type

      `str`

  `channelLevelsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) channel levels changed signal

  `gradient`()

    provides the current color gradient

    Returns

      gradient name

    Return type

      `str`

  `gradientChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) gradient changed signal

  `gradientColors`()

    gets gradientcolors on/off

    Returns

      True for on and False for off

    Return type

      `bool`

  `isAutoLevel`()

    returns if automatics levels are enabled

    Returns

      if automatics levels are enabled

    Return type

      `bool`

  `levelMode`()

    return historgram level mode

    Returns

      level mode

    Return type

      `str`

  `levels`()

    provides levels from configuration string

    Returns

      configuration string: lowlim,uplim or lowlim,uplim;c1l,c1u;c2l,c2u;c3l,c3u

    Return type

      `str`

  `levelsChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) levels changed signal

  `maxLevelChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) maximum level changed signal

  `minLevelChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) minimum level changed signal

  `setAutoFactor`(factor)

    sets factor for automatic levels

    Parameters

      factor (`str`) – factor for automatic levels

  `setAutoLevels`(auto)

    enables or disables automatic levels

    Parameters

      auto (`bool` or `int`) – if automatics levels to be set

  `setBins`(index)

    sets bins edges algorithm for histogram

    Parameters

      index (`int`) – bins edges algorithm index for histogram

  `setGradient`(name, iid=None)

    sets gradient

    :param name gradient name :type name: `str` :param iid: image id :type iid: `int`

  `setGradientColors`(status=True)

    sets gradientcolors on/off

    Parameters

      status (`bool`) – True for on and False for off

  `setImageItem`(image, iid=0)

    sets histogram image

    Parameters

      - image (`pyqtgraph.graphicsItems.ImageItem.ImageItem`) – histogram image

      - iid (`int`) – image id

  `setLevels`(cnflevels)

    set levels from configuration string

    Parameters

      cnflevels (`str`) – configuration string: lowlim,uplim or lowlim,uplim;lowred,upred;lowgreen,upgreen;lowblue,upblue

  `setRGBChannels`(rgbchannels)

    rgb channel indexes

    Parameters

      rgbchannels (`tuple` <`int`>) – rgb channel indexes

  `setScalingLabel`(scalingtype)

    sets scaling label

    Parameters

      scalingtype (`str`) – scaling type, i.e. log, linear, sqrt

  `setrgb`(status=True)

    sets RGB on/off

    Parameters

      status (`bool`) – True for on and False for off

  `showChannels`(status=True)

    show/hide channel widget

    Parameters

      status (`bool`) – show channel flag

  `showGradient`(status=True)

    show/hide gradient widget

    Parameters

      status (`bool`) – show gradient flag

  `showHistograms`(status=True)

    show/hide gradient widget

    Parameters

      status (`bool`) – show gradient flag

  `storeSettingsRequested`

    (`pyqtgraph.QtCore.pyqtSignal`) store settings requested

  `updateAutoLevels`(lowlim, uplim, channels=None)

    set min/max level spinboxes and histogram from the parameters

    Parameters

      - lowlim (`float`) – minimum intensity value

      - uplim (`float`) – maximum intensity value

  `updateCustomGradients`(gradients)
  `updateHistoImage`(autoLevel=None)

    executes imageChanged of histogram with the givel autoLevel

    Parameters

      autoLevel (`bool`) – if automatics levels to be set

  `updateLevels`(lowlim, uplim, channels=None, signals=True, force=False)

    set min/max level spinboxes and histogram from the parameters

    Parameters

      - lowlim (`float`) – minimum intensity value

      - uplim (`float`) – maximum intensity value

      - signal (`bool`) – dont disconnect signals

      - force (`bool`) – force update histogram

## lavuelib.liveViewer module

live viewer settings

class `lavuelib.liveViewer.` `LavueState`

  Bases: `object`

  lavue state

  constructor

  `dump`()

    returns string representation

    Returns

      string representation

    Return type

      `str`

  `updateState`(dct)

    update lavue state dictonary

    Parameters

      dct (`dict` < `str`, `any`>) – lavue state dictionary

class `lavuelib.liveViewer.` `LiveViewer`(options, parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  The master class for the dialog, contains all other widget and handles communication.

  constructor

  Parameters

    - options (`argparse.Namespace`) – commandline options

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `closeEvent`(event)

    stores the setting before finishing the application

    Parameters

      event (`pyqtgraph.QtCore.QEvent`:) – close event

  `keyPressEvent`(event)

    skips escape key action

    Parameters

      event (`pyqtgraph.QtCore.QEvent`:) – close event

  `rgb`()

    gets RGB on/off

    Returns

      True for on and False for off

    Return type

      `bool`

  `setLavueState`(dct=None)

    update LavueState of LavueController

    Parameters

      dct (`dict` < `str`, `any`>) – lavue state dictionary

  `setState`()

    set current state

  `setrgb`(status=True)

    sets RGB on/off

    Parameters

      status (`bool`) – True for on and False for off

class `lavuelib.liveViewer.` `MainWindow`(options, parent=None)

  Bases: `PyQt5.QtWidgets.QMainWindow`

  constructor

  Parameters

    - options (`argparse.Namespace`) – commandline options

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `closeEvent`(event)

    stores the setting before finishing the application

    Parameters

      event (`pyqtgraph.QtCore.QEvent`:) – close event

class `lavuelib.liveViewer.` `PartialData`(name, rawdata, metadata, x, y, tr)

  Bases: `object`

  partial data

  constructor

  Parameters

    - name (`str`) – data name

    - rawdata (`numpy.ndarray`) – raw data

    - metadata (`str`) – json dictionary with metadata

    - x (`int`) – x translation

    - y (`int`) – y translation

    - tr (`str`) – transformation, e.g. fup, flr, t, r90, r180, r270, r180t

  `data`()

    provides transformed data

    Returns

      transformed data

    Return type

      `numpy.ndarray`

  `dtype`()

    provides data type

    Returns

      numpy data type

    Return type

      `numpy.dtype`

  `intmaxvalue`()

    provides data type maximal value

    Returns

      integer data type maximal value

    Return type

      `int`

  `metadata`

    (`str`) json dictionary with metadata

  `name`

    (`str`) data name

  `scc`

    (`int`) color channel size

  `sx`

    (`int`) x size

  `sy`

    (`int`) y size

  `tolist`()

    converts partial data to a list

    Returns

      a list: [name, rawdata, metadata, x, y, sx, sy, tr]

    Return type

      [`str`, `numpy.ndarray', :obj:`str`, `int`, `int`, `int`, `int`, `str`]

  `tpose` = {'flr': False, 'fup': False, 'none': False, 'r180': False, 'r180t': True, 'r270': True, 'r90': True, 't': True}
  `tr`

    (`str`) transformation

  `x`

    (`int`) x translation

  `y`

    (`int`) y translation

`lavuelib.liveViewer.` `setLoggerLevel`(logger, level)

## lavuelib.maskWidget module

mask widget

class `lavuelib.maskWidget.` `MaskWidget`(parent=None, settings=None)

  Bases: `PyQt5.QtWidgets.QWidget`

  Define and apply masking of the displayed image.

  constructor

  Parameters

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

    - settings (`lavuelib.settings.Settings`) – lavue configuration settings

  `applyStateChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) apply state change signal

  `isMaskApplied`()

    if background subtraction applied :returns: apply status :rtype: `bool`

  `maskFileSelected`

    (`pyqtgraph.QtCore.pyqtSignal`) mask file selected signal

  `noImage`()

    unchecks the apply checkbox and clear the file display

  `setDisplayedName`(name)

    sets displayed file name

    Parameters

      name (`str`) – file name

  `setMask`(fname)

    sets the image mask

    Parameters

      fname (`str`) – file name

## lavuelib.memoExportDialog

image display widget

`lavuelib.memoExportDialog.` `GraphicsScene_showExportDialog`(self)

  dynamic replacement of GraphicsScene.showExportDialog

class `lavuelib.memoExportDialog.` `MemoExportDialog`(scene)

  Bases: `pyqtgraph.GraphicsScene.exportDialog.ExportDialog`

  ExportDialog with bookkeeping parameters

  `exportFormatChanged`(item, prev)

class `lavuelib.memoExportDialog.` `MemoPlotWidget`(parent=None, background='default', **kargs)

  Bases: `pyqtgraph.widgets.PlotWidget.PlotWidget`

  Plot Widget with improved Export Dialog

  When initializing PlotWidget, parent and background are passed to `GraphicsWidget.__init__()` and all others are passed to `PlotItem.__init__()`.

  `clearClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) clear clicked signal

  `freezeClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) freeze clicked signal

  `showMenu`(freeze=False, clear=False)

    shows freeze or/and clear action in the menu

    Parameters

      - freeze (`bool`) – freeze show status

      - freeze – clear show status

## lavuelib.memoryBufferGroupBox

Memory Buffer widget

class `lavuelib.memoryBufferGroupBox.` `MemoryBufferGroupBox`(parent=None)

  Bases: `PyQt5.QtWidgets.QGroupBox`

  Set circular memory buffer for images

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `bufferSize`()

    provides buffer size

    Returns

      buffer size if buffer is on

    Return type

      int

  `bufferSizeChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) state updated signal

  `changeView`(show=False)

    shows or hides the histogram widget

    Parameters

      show (`bool`) – if histogram should be shown

  `initialize`()

    initialize the filter

  `isOn`()

    is on flag

    Returns

      is on flag

    Return type

      bool

  `onOff`(status)

    switch on/off the widget

    Parameters

      status (`int`) – flag on/off

  `process`(image, imagename)

    append image to the buffer and returns image buffer and metadata

    Parameters

      - image (`numpy.ndarray`) – numpy array with an image

      - imagename (`str`) – image name

    Returns

      numpy array with an image

    Return type

      (`numpy.ndarray`, :obj`dict`<`str`, `str`>) or None

  `setBufferSize`(buffersize)

    sets buffer size

    Parameters

      buffersize (`int` or `str`) – maximal number of images in the buffer

  `setComputeSum`(computesum)

    sets compute sum flag

    Parameters

      computesum (`bool`) – compute sum flag

  `setMaxBufferSize`(maxbuffersize)

    sets maximal buffer size

    Parameters

      maxbuffersize (`int` or `str`) – maximal number of images in the buffer

## lavuelib.messageBox module

error message box

class `lavuelib.messageBox.` `MessageBox`(parent)

  Bases: `PyQt5.QtCore.QObject`

  error message box

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  classmethod `getText`(default, error=None)

    provides error message text fro sys.exc_info()

    Parameters

      - default (`str`) – default message test

      - error (`Exception`) – exception to describe

    Returns

      exception message

    Return type

      `str`

  classmethod `warning`(parent, title, text, detailedText=None, icon=None)

    creates warning messagebox

    Parameters

      - parent (`pyqtgraph.QtCore.QObject`) – parent object

      - title (`str`) – message box title

      - text (`str`) – message box text

      - detailedText (`str`) – message box detailed text

      - icon (`pyqtgraph.QtCore.QIcon`) – message box icon

`lavuelib.messageBox.` `TANGO` = True

  (`bool`) tango imported

## lavuelib.motorWatchThread module

motor watch thread

class `lavuelib.motorWatchThread.` `AttributeWatchThread`(aproxies, refreshtime=None)

  Bases: `lavuelib.omniQThread.OmniQThread`

  constructor

  Parameters

    - refreshtime (`tango.DeviceProxy`) – refresh time

    - aproxies (`list` <`tango.DeviceProxy`>) – attribute proxies

  `attrValuesSignal`

    (`pyqtgraph.QtCore.pyqtSignal`) signal with attribute values

  `isWatching`()

    is datasource source connected

    Returns

      if datasource source connected

    Return type

      `bool`

  `stop`()

    stops loop

  `watchingFinished`

    (`pyqtgraph.QtCore.pyqtSignal`) watching finished

`lavuelib.motorWatchThread.` `GLOBALREFRESHRATE` = 0.1

  (`float`) refresh rate in seconds

class `lavuelib.motorWatchThread.` `MotorWatchThread`(motor1, motor2, server=None)

  Bases: `lavuelib.omniQThread.OmniQThread`

  constructor

  Parameters

    - motor1 (`tango.DeviceProxy`) – first motor device proxy

    - motor2 (`tango.DeviceProxy`) – second motor device proxy

    - mserver (`tango.DeviceProxy`) – door server device proxy

  `isWatching`()

    is datasource source connected

    Returns

      if datasource source connected

    Return type

      `bool`

  `motorStatusSignal`

    (`pyqtgraph.QtCore.pyqtSignal`) signal with motor status

  `stop`()

    stops loop

  `watchingFinished`

    (`pyqtgraph.QtCore.pyqtSignal`) watching finished

`lavuelib.motorWatchThread.` `POLLINGINTERVAL` = 1.0

  (`float`) polling inverval in seconds

## lavuelib.normalizationWidget module

normalization widget

class `lavuelib.normalizationWidget.` `NormalizationWidget`(parent=None, settings=None)

  Bases: `PyQt5.QtWidgets.QWidget`

  Define bkg image and subtract from displayed image.

  constructor

  Parameters

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

    - settings (`lavuelib.settings.Settings`) – lavue configuration settings

  `applyBFStateChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) apply state change signal

  `bfFileSelected`
  `bfScalingFactor`()

    provides bright field scaling factor

    Returns

      bright field scaling factor

    Return type

      `float`

  `bfScalingFactorChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) BF scaling factor change signal

  `checkBFSubtraction`(state)

    unchecks apply CheckBox if state is 1 and it is checked and reset the display

    Parameters

      state (`int`) – checkbox state

  `isBFSubApplied`()

    if brightfield correction applied :returns: apply status :rtype: `bool`

  `setBFScalingFactor`(scale)

    sets the bright field scaling factor

    Parameters

      scale (`float` or `str`) – bright field scaling factor

  `setBrightField`(fname)

    sets the image background

    Parameters

      fname (`str`) – file name

  `setDisplayedBFName`(name)

    sets displayed file name

    Parameters

      name (`str`) – file name

  `showScalingFactors`(show=True)
  `useCurrentImageAsBF`

    (`pyqtgraph.QtCore.pyqtSignal`) use current image signal

## lavuelib.omniQThread module

omni qt thread

class `lavuelib.omniQThread.` `OmniQThread`(parent=None)

  Bases: `PyQt5.QtCore.QThread`

  constructor

  `run`()

    runner of the fetching thread

`lavuelib.omniQThread.` `TANGO` = True

  (`bool`) tango imported

## lavuelib.preparationGroupBox module

preparationbox widget

class `lavuelib.preparationGroupBox.` `PreparationGroupBox`(parent=None, settings=None)

  Bases: `PyQt5.QtWidgets.QGroupBox`

  colection of image preperation widgets

  constructor

  Parameters

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

    - settings (`lavuelib.settings.Settings`) – lavue configuration settings

  `changeView`(showmask=None, showsub=None, showtrans=None, showhighvaluemask=None, showsubsf=None, shownorm=None, shownormsf=None)

    show or hide widgets in the preparation colection

    Parameters

      - showmask (`bool`) – mask widget shown

      - showsub (`bool`) – subtraction widget shown

      - showtrans (`bool`) – transformation widget shown

      - showhighvaluemask (`bool`) – mask widget shown

      - showsubsf (`bool`) – subtraction scaling widget shown

      - shownorm (`bool`) – normalization widget shown

      - shownormsf (`bool`) – normalization scaling widget shown

  `highValueMaskWidget`

    (`lavuelib.maskWidget.Maskwidget`) mask widget

  `maskWidget`

    (`lavuelib.maskWidget.Maskwidget`) mask widget

class `lavuelib.preparationGroupBox.` `QHLine`

  Bases: `PyQt5.QtWidgets.QFrame`

  horizontal line

  constructor

## lavuelib.qtuic module

uic support

class `lavuelib.qtuic.` `QWebView`(parent: QWidget = None)

  Bases: `PyQt5.QtWidgets.QWidget`

  `back`(self)
  `changeEvent`(self, QEvent)
  `contextMenuEvent`(self, QContextMenuEvent)
  `createWindow`(self, QWebPage.WebWindowType) → QWebView
  `dragEnterEvent`(self, QDragEnterEvent)
  `dragLeaveEvent`(self, QDragLeaveEvent)
  `dragMoveEvent`(self, QDragMoveEvent)
  `dropEvent`(self, QDropEvent)
  `event`(self, QEvent) → bool
  `findText`(self, str, options: QWebPage.FindFlags = 0) → bool
  `focusInEvent`(self, QFocusEvent)
  `focusNextPrevChild`(self, bool) → bool
  `focusOutEvent`(self, QFocusEvent)
  `forward`(self)
  `hasSelection`(self) → bool
  `history`(self) → QWebHistory
  `icon`(self) → QIcon
  `iconChanged`

    iconChanged(self) [signal]

  `inputMethodEvent`(self, QInputMethodEvent)
  `inputMethodQuery`(self, Qt.InputMethodQuery) → Any
  `isModified`(self) → bool
  `keyPressEvent`(self, QKeyEvent)
  `keyReleaseEvent`(self, QKeyEvent)
  `linkClicked`

    linkClicked(self, QUrl) [signal]

  `load`(self, QUrl)

    load(self, QNetworkRequest, operation: QNetworkAccessManager.Operation = QNetworkAccessManager.GetOperation, body: Union[QByteArray, bytes, bytearray] = QByteArray())

  `loadFinished`

    loadFinished(self, bool) [signal]

  `loadProgress`

    loadProgress(self, int) [signal]

  `loadStarted`

    loadStarted(self) [signal]

  `mouseDoubleClickEvent`(self, QMouseEvent)
  `mouseMoveEvent`(self, QMouseEvent)
  `mousePressEvent`(self, QMouseEvent)
  `mouseReleaseEvent`(self, QMouseEvent)
  `page`(self) → QWebPage
  `pageAction`(self, QWebPage.WebAction) → QAction
  `paintEvent`(self, QPaintEvent)
  `print`(self, QPrinter)
  `print_`(self, QPrinter)
  `reload`(self)
  `renderHints`(self) → QPainter.RenderHints
  `resizeEvent`(self, QResizeEvent)
  `selectedHtml`(self) → str
  `selectedText`(self) → str
  `selectionChanged`

    selectionChanged(self) [signal]

  `setContent`(self, Union[QByteArray, bytes, bytearray], mimeType: str = '', baseUrl: QUrl = QUrl())
  `setHtml`(self, str, baseUrl: QUrl = QUrl())
  `setPage`(self, QWebPage)
  `setRenderHint`(self, QPainter.RenderHint, enabled: bool = True)
  `setRenderHints`(self, QPainter.RenderHints)
  `setUrl`(self, QUrl)
  `setZoomFactor`(self, float)
  `settings`(self) → QWebSettings
  `sizeHint`(self) → QSize
  `statusBarMessage`

    statusBarMessage(self, str) [signal]

  `stop`(self)
  `title`(self) → str
  `titleChanged`

    titleChanged(self, str) [signal]

  `triggerPageAction`(self, QWebPage.WebAction, checked: bool = False)
  `url`(self) → QUrl
  `urlChanged`

    urlChanged(self, QUrl) [signal]

  `wheelEvent`(self, QWheelEvent)
  `zoomFactor`(self) → float

## lavuelib.rangeDialog module

detector range widget

class `lavuelib.rangeDialog.` `RangeDialog`(parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  detector range widget class

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `accept`()

    updates class variables with the form content

  `createGUI`()

    create GUI

  `polend`

    (`float`) end position of polar angle

  `polsize`

    (`int`) grid size of polar angle

  `polstart`

    (`float`) start position of polar angle

  `radqend`

    (`float`) end position of radial coordinate

  `radqsize`

    (`int`) grid size of radial coordinate

  `radqstart`

    (`float`) start position of radial coordinate

  `radthend`

    (`float`) end position of radial coordinate

  `radthsize`

    (`int`) grid size of radial coordinate

  `radthstart`

    (`float`) start position of radial coordinate

## lavuelib.rangeWindowGroupBox module

range window widget

class `lavuelib.rangeWindowGroupBox.` `RangeWindowGroupBox`(parent=None)

  Bases: `PyQt5.QtWidgets.QWidget`

  Select how an image should be transformed.

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `changeView`(showrangeWindow=None)

    show or hide widgets

    Parameters

      showrangeWindow (`bool`) – widget shown

  `factor`()

    provides the current resize factor

    Returns

      resize factor

    Return type

      `int`

  `factorChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) factor changed signal

  `function`()

    provides the reduction function name, i.e. max, min, mean, sum

    Returns

      function name

    Return type

      `str`

  `functionChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) function changed signal

  `rangeWindow`()

    provides the range window

    Returns

      x1, y1, x2, y2 of range window bounds

    Return type

      `list` <`int`>

  `rangeWindowChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) range window changed signal

  `setFactor`(factor)

    provides the current resize factor

    Parameters

      factor (`int`) – resize factor

  `setFunction`(name)

    sets the reduction function

    Parameters

      name (`str`) – function name, i.e. max, min, mean, sum

  `setRangeWindow`(bounds)

    provides the range window

    Parameters

      bounds – range window bounds: x1:x2,y1:y2

    Type

      `str`

## lavuelib.release module

release version

## lavuelib.sardanaUtils module

sardana utils

class `lavuelib.sardanaUtils.` `SardanaUtils`

  Bases: `object`

  sardanamacro server

  constructor

  `getDeviceName`(cname, db=None)

    finds device of give class

    Parameters

      - cname (`str`) – device class name

      - db (`tango.Database`) – tango database

    Returns

      device name if exists

    Return type

      `str`

  `getElementNames`(door, listattr, typefilter=None)

    provides experimental Channels

    Parameters

      - door (`str`) – door device name

      - listattr (`str`) – pool attribute with list

      - typefilter (`list` <`str`>) – pool attribute with list

    Returns

      names from given pool listattr

    Return type

      `list` <`str`>

  `getError`(door)

    stores Scan Environment Data

    Parameters

      door (`str`) – door device

    Returns

      error or warning

    Return type

      `str`

  `getMacroServer`(door)

    door macro server device name

    Parameters

      door (`str`) – door device name

    Returns

      macroserver device proxy

    Return type

      `tango.DeviceProxy`

  `getPools`(door)

    provides pool devices

    Parameters

      door (`str`) – door device name

  classmethod `getProxies`(names)

    provides proxies of given device names

    Parameters

      names (`list` <`str`>) – given device names

    Returns

      list of device DeviceProxies

    Return type

      `list` <`tango.DeviceProxy`>

  `getScanEnv`(door, params=None)

    fetches Scan Environment Data

    Parameters

      door (`str`) – door device

    Returns

      JSON String with important variables

    Return type

      `str`

  classmethod `openProxy`(device, counter=100)

    opens device proxy of the given device

    Parameters

      device (`str`) – device name

    Returns

      DeviceProxy of device

    Return type

      `tango.DeviceProxy`

  classmethod `pickleloads`(bytestr)

    loads pickle byte string :param bytestr: byte string to convert :type bytesstr: `bytes` :returns: loaded bytestring :rtype: `any`

  `runMacro`(door, command, wait=True)

    stores Scan Environment Data

    Parameters

      - door (`str`) – door device

      - command (`list` <`str`>) – list with the macro name and its parameters

      - wait (`bool`) – wait till macro is finished

    Returns

      result, error or warning

    Return type

      [`str`, `str`]

  `setScanEnv`(door, jdata)

    stores Scan Environment Data

    Parameters

      - door (`str`) – door device

      - jdata (`str`) – JSON String with important variables

  classmethod `toString`(obj)

    converts list/dict/object of unicode/string to string object

    Parameters

      obj (any) – given unicode/string object

    Returns

      string object

    Return type

      `str`

  `wait`(name=None, proxy=None, maxcount=100)

    stores Scan Environment Data

    Parameters

      - name (`str`) – device name

      - proxy (`str`) – door device proxy

      - maxcount (`int`) – number of 0.01s to wait

`lavuelib.sardanaUtils.` `TANGO` = True

  (`bool`) tango imported

`lavuelib.sardanaUtils.` `debugmethod`(method)

  debug wrapper for methods :param method: any class method :type method: `any` :returns: wrapped class method :rtype: `any`

class `lavuelib.sardanaUtils.` `numpyEncoder`(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)

  Bases: `json.encoder.JSONEncoder`

  numpy json encoder with list

  Constructor for JSONEncoder, with sensible defaults.

  If skipkeys is false, then it is a TypeError to attempt encoding of keys that are not str, int, float or None. If skipkeys is True, such items are simply skipped.

  If ensure_ascii is true, the output is guaranteed to be str objects with all incoming non-ASCII characters escaped. If ensure_ascii is false, the output can contain non-ASCII characters.

  If check_circular is true, then lists, dicts, and custom encoded objects will be checked for circular references during encoding to prevent an infinite recursion (which would cause an OverflowError). Otherwise, no such check takes place.

  If allow_nan is true, then NaN, Infinity, and -Infinity will be encoded as such. This behavior is not JSON specification compliant, but is consistent with most JavaScript based encoders and decoders. Otherwise, it will be a ValueError to encode such floats.

  If sort_keys is true, then the output of dictionaries will be sorted by key; this is useful for regression tests to ensure that JSON serializations can be compared on a day-to-day basis.

  If indent is a non-negative integer, then JSON array elements and object members will be pretty-printed with that indent level. An indent level of 0 will only insert newlines. None is the most compact representation.

  If specified, separators should be an (item_separator, key_separator) tuple. The default is (‘, ‘, ‘: ‘) if indent is `None` and (‘,’, ‘: ‘) otherwise. To get the most compact JSON representation, you should specify (‘,’, ‘:’) to eliminate whitespace.

  If specified, default is a function that gets called for objects that can’t otherwise be serialized. It should return a JSON encodable version of the object or raise a `TypeError`.

  `default`(obj)

    default encoder

    Parameters

      obj (`object` or any) – numpy array object

## lavuelib.scalingGroupBox module

scalingGroupBox

class `lavuelib.scalingGroupBox.` `ScalingGroupBox`(parent=None)

  Bases: `PyQt5.QtWidgets.QGroupBox`

  Select how the image intensity is supposed to be scaled.

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `changeView`(showscale=False)

    shows or hides the histogram widget

    Parameters

      showhistogram (`bool`) – if histogram should be shown

  `currentScaling`()

    provides the current scaling

    Returns

      current scaline

    Return type

      `str`

  `scalingChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) scaling changed signal

  `setScaling`(scaling)

    sets scaling from string

    Parameters

      scaling – scaling name, i.e. linear, log or sqrt

  `simpleScalingChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) simple scaling changed signal

## lavuelib.settings module

live viewer image display base it on a qt dialog

`lavuelib.settings.` `PYFAI` = True

  (`bool`) pyFAI imported

class `lavuelib.settings.` `Settings`

  Bases: `object`

  lavue configuration settings

  constructor

  `accelbuffersum`

    (`bool`) accelerate buffer sum

  `addrois`

    (`bool`) add rois to sardana

  `aimutex`

    (`pyqtgraph.QtCore.QMutex`) ai mutex

  `analysisdevice`

    (`str`) analysis device name

  `asapobeamtime`

    (`str`) asapo beamtime id

  `asapodatasources`

    (`list` < `str` > ) asapo datasources

  `asaposerver`

    (`str`) asapo server

  `asaposourcepath`

    (`str`) asapo sourcepath

  `asapotoken`

    (`str`) asapo token

  `aspectlocked`

    (`bool`) image aspect ratio locked

  `autodownsample`

    (`bool`) auto down sample

  `autozmqtopics`

    (`bool`) automatic zmq source topics

  `bfimagename`

    (`str`) last brightfield image file name

  `bkgimagename`

    (`str`) last background/darkfield image file name

  `calcvariance`

    (`bool`) calculate variance

  `calibrationfilename`

    (`str`) calibration file name

  `centerx`

    (`float`) x-coordinates of the center of the image

  `centery`

    (`float`) y-coordinates of the center of the image

  `correctsolidangle`

    (`bool`) correct solid angle flag

  `crosshairlocker`

    (`bool`) crosshair locker switched on

  `customGradients`()

    sets source display parameters

    Returns

      custom gradients

    Return type

      `dict` <`str`, any>

  `defdetservers`

    (`bool`) use default detector servers

  `detdistance`

    (`float`) detector distance in mm

  `detname`

    (`str`) detector name

  `detponi1`

    (`float`) poni1 parameter in m

  `detponi2`

    (`float`) poni2 parameter in m

  `detrot1`

    (`float`) rot1 parameter in rad

  `detrot2`

    (`float`) rot2 parameter in rad

  `detrot3`

    (`float`) rot3 parameter in rad

  `detservers`

    (`list` < `str`>) hidra detector server list

  `detsplinefile`

    (`str`) detector splineFile

  `diffnpt`

    (`int`) number of points for diffractogram

  `dirtrans`

    (`str`) file name translation json dictionary

  `distance2m`(distance)

    converts distance to m units

    Parameters

      distance (`float` or (`float`, `str`)) – distance as value in m or tuple with units

    Returns

      distance in m

    Return type

      `float`

  `distance2mm`(distance)

    converts distance to mm units

    Parameters

      distance (`float` or (`float`, `str`)) – distance as value in m or tuple with units

    Returns

      distance in mm

    Return type

      `float`

  `distance2pixels`(distance, psize)

    converts distance to pixels

    Parameters

      - distance (`float` or (`float`, `str`)) – distance as value in pixels or tuple with units

      - psize (`float`) – pixel size

    Returns

      distance in pixels

    Return type

      `float`

  `distance2um`(distance)

    converts distance to um units

    Parameters

      distance (`float` or (`float`, `str`)) – distance as value in m or tuple with units

    Returns

      distance in um

    Return type

      `float`

  `doorname`

    (`str`) door device name

  `energy`

    (`float`) energy in eV

  `energy2m`(energy)

    converts energy to m

    Parameters

      energy (`float` or (`float`, `str`)) – energy as value in eV or tuple with units

    Returns

      length in m

    Return type

      `float`

  `filters`

    (`str`) json list with filters

  `floattype`

    (`str`) float type for pixel intensity

  `geometryfromsource`

    (`bool`) fetch geometry from source

  `gradientcolors`

    (`bool`) image channels shown with gradient colors

  `hidraport`

    (`str`) hidra data port

  `imagechannels`

    (`bool`) map image sources to color channels

  `imagename`

    (`str`) last image file name

  `imagesources`

    (`str`) json list with image source widget names

  `interruptonerror`

    (`bool`) interrupt on error

  `keepcoords`

    (`bool`) keep original coordinates

  `lazyimageslider`

    (`bool`) lazy image slider

  `length2ev`(length)

    converts length to energy in eV

    Parameters

      length (`float` or (`float`, `str`)) – length as value in A or tuple with units

    Returns

      energy in eV

    Return type

      `float`

  `load`(settings)

    load settings

    Parameters

      settings (`pyqtgraph.QtCore.QSettings`) – QSettings object

    Returns

      error messages list

    Return type

      `list` < (`str`, `str`) >

  `maskimagename`

    (`str`) last mask image file name

  `maxmbuffersize`

    (`str`) maximal number of images in memory buffer

  `nanmask`

    (`bool`) nan mask enabled

  `negmask`

    (`bool`) adding maximal type value to negative high value mask

  `nrsources`

    (`int`) number of image sources

  `nxslast`

    (`bool`) nexus file source starts from the last image

  `nxsopen`

    (`bool`) nexus file source keeps the file open

  `orderrois`

    (`bool`) fetch rois order enabled

  `pixelsize2um`(psize)

    converts pixel size to um units

    Parameters

      psize (`float` or (`float`, `str`, `float`, `str`)) – pixelsize as value in m or tuple with units

    Returns

      pixelsize in um

    Return type

      (`float`, `float`)

  `pixelsizex`

    (`float`) pixel x-size in um

  `pixelsizey`

    (`float`) pixel y-size in um

  `refreshrate`

    (`float`) refresh rate is s

  `roiscolors`

    (`str`) json list with roi colors

  `sardana`

    (`bool`) sardana enabled

  `secautoport`

    (`bool`) search for security stream port automatically

  `seccontext`

    (`zmq.Context`) zmq context

  `secport`

    (`str`) security stream port

  `secsocket`

    (`zmq.Socket`) zmq security stream socket

  `secsockopt`

    (`bool`) security stream options

  `secstream`

    (`bool`) security stream enabled

  `sendresults`

    (`bool`) send results to LavueController flag

  `sendrois`

    (`bool`) send rois to LavueController flag

  `setCustomGradients`(gradients)

    sets custom gradients

    Parameters

      gradients (`dict` <`str`, any>) – custom gradients

  `setSourceDisplay`(source, values)

    sets source display parameters

    Parameters

      - source (`str`) – source name

      - values (`dict` <`str`, any>) – display parameter dictionary

  `showaddhisto`

    (`bool`) show intensity hostogram

  `showallrois`

    (`bool`) show all rois flag

  `showfilters`

    (`bool`) show filter widget

  `showframerate`

    (`bool`) show frame rate widget

  `showhighvaluemask`

    (`bool`) show high mask value widget

  `showhisto`

    (`bool`) show intensity hostogram

  `showlevels`

    (`bool`) show intensity levels widget

  `showmask`

    (`bool`) show mask widget

  `showmbuffer`

    (`bool`) show memory buffer widget

  `shownorm`

    (`bool`) show image normalization widget

  `shownormsf`

    (`bool`) show image normalization scaling factor widget

  `showrange`

    (`bool`) show range window widget

  `showscale`

    (`bool`) show intensity scale widget

  `showstats`

    (`bool`) show statistics widget

  `showsteps`

    (`bool`) show image step widget

  `showsub`

    (`bool`) show bakcground subtraction widget

  `showsubsf`

    (`bool`) show bakcground subtraction scaling factor widget

  `showtrans`

    (`bool`) show transformation widget

  `singlerois`

    (`bool`) single rois flag

  `sourceDisplay`(source)

    gets source display parameters

    Parameters

      source (`str`) – source name

    Returns

      display parameter dictionary

    Return type

      `dict` <`str`, any>

  `sourcedisplay`

    (`bool`) store display parameters for specific sources

  `statswoscaling`

    (`bool`) statistics without scaling

  `store`(settings)

    Stores settings in QSettings object

    Parameters

      settings (`pyqtgraph.QtCore.QSettings`) – QSettings object

  `storegeometry`

    (`bool`) store detector geometry

  `timeout`

    (`int`) image source timeout for connection

  `toolpollinginterval`

    (`float`) tool polling interval is s

  `toolrefreshtime`

    (`float`) tool refresh rate time is s

  `toolwidgets`

    (`str`) json list with tool widget names

  `updateAISettings`()

    update AI settings

  `updateDetectorParameters`()

    update physical parameters

  `updateMetaData`(**kargs)

    update physical parameters

    Parameters

      kargs (`dict` < `str`, `any`>) – physical parameter dictionary

  `xyposition2pixels`(xypos)

    converts xy position to pixel units

    Parameters

      xypos (`float` or (`float`, `str`, `float`, `str`)) – xy-position a tuple value or tuple with units

    Returns

      xy-position in pixels

    Return type

      (`float`, `float`)

  `zeromask`

    (`bool`) zero mask enabled

  `zmqtopics`

    (`list` < `str` > ) zmq source topics

## lavuelib.sourceTabWidget module

image source selection

class `lavuelib.sourceTabWidget.` `SourceForm`(parent=None, sourceid=0, usersourcenames=None)

  Bases: `PyQt5.QtWidgets.QWidget`

  source form

  constructor

  Parameters

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

    - expertmode (`bool`) – expert mode flag

    - sourceid (`int`) – source id

    - usersourcenames (`list` < `str` >) – user source names

  `addCommonWidgets`(sln)

    add common widgets after given row in the grid layout

    Parameters

      sln (`int`) – given row in the grid layout

  `addIconClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) add Icon Clicked signal

  `addWidgets`(st, expertmode)

    add widgets

    Parameters

      - st (`sourceWidget.SourceBaseWidget`) – source type class

      - expertmode (`bool`) – expert mode

  `buttonEnabled`

    (`pyqtgraph.QtCore.pyqtSignal`) push button enabled signal

  `configuration`()

    provides configuration for the current image source

    Returns

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectFailure`()

    set connection status off and display connection status

  `connectSuccess`(port=None)

    set connection status on and display connection status

    Parameters

      port – zmq port

  `connectWidget`()

    connect widget

  `currentDataSource`()

    current data source

    Returns

      current datasource class name

    Return type

      `str`

  `currentDataSourceAlias`()

    current data source name

    Returns

      current datasource class name alias

    Return type

      `str`

  `currentDataSourceName`()

    current data source name

    Returns

      current datasource class name

    Return type

      `str`

  `disconnectWidget`()

    disconnect widget

  `emitButtonEnabled`(status)

    emit buttonEnabled

    Parameters

      trans (`bool`) – enabled status of button

  `emitSourceChanged`()

    emits sourceChanged signal

  `emitTranslationChanged`(trans)

    emit translationChanged

    Parameters

      trans (`str`) – x,y translation, e.g. 50,45

  `gridLayout`()

    provide grid layout

    Returns

      grid layout

    Return type

      `PyQt5.QtGui.QGridLayout`

  `init`()

    initialize widget

  `isConnected`()

    is datasource source connected

    Returns

      if datasource source connected

    Return type

      `bool`

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `onSourceChanged`()

    update current source widgets

  `pushButtonClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) push button clicked signal

  `pushButtonEnabled`()

    provide status of push button

    Returns

      if push button enabled

    Return type

      `bool`

  `removeCommonWidgets`()

    remove common widgets

  `removeIconClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) remove Icon Clicked signal

  `setErrorStatus`(status='')

    set error status

    Parameters

      status (`str`) – error status

  `setSource`(name=None, disconnect=True)

    set source with the given name

    Parameters

      - name (`str`) – source name

      - disconnect (`bool`) – disconnect signals on update

  `setSourceComboBoxByName`(name)

    set source by changing combobox by name

    Parameters

      name (`str`) – combobox name

  `setTranslation`(trans)

    stores translation of the given source

    Param

      x,y tranlation, e.g. 2345,354

    Type

      `str`

  `showItem`(trans)

    show items of the widget

    Parameters

      trans (`bool`) – translation item show status

  `sourceChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) source state signal

  `sourceLabelChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) source label name signal

  `sourceStateChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) source state signal

  `sourceStatus`()

    source status

    Returns

      source type id

    Return type

      `int`

  `start`()

    starts viewing if pushButton enable

  `toggleServerConnection`()

    toggles server connection

  `translationChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) translation changed signal

  `updateButton`(status)

    update slot for source button

    Parameters

      status (`bool`) – button state

  `updateLayout`()

    update source layout

  `updateMetaData`(**kargs)

    update source input parameters

    Parameters

      kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `updateSourceComboBox`(sourcenames, name=None)

    set source by changing combobox

    Parameters

      - sourcenames (`list` < `str` >) – source names

      - index (`int`) – combobox index

  `widgetnames`

    (`list` <`str`>) subwidget object names

class `lavuelib.sourceTabWidget.` `SourceTabWidget`(parent=None, sourcetypes=None, expertmode=False, nrsources=1)

  Bases: `PyQt5.QtWidgets.QTabWidget`

  image source selection

  constructor

  Parameters

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

    - sourcetypes (`list` <`str`>) – source type class names

    - expertmode (`bool`) – expert mode flag

    - nrsources (`int`) – number of sources

  `addIconClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) add Icon Clicked

  `addTab`(widget, title)

    add tab widget

    Parameters

      - widget (`pyqtgraph.QtGui.QWidget`) – tab widget

      - title (`str`) – tab title

  `configuration`()

    provides configuration for the current image source

    Returns

      configuration string

    Rtype configuration

      `str`

  `configure`(sid, configuration)

    set configuration for the current image source

    Parameters

      - sid (`int`) – source id

      - configuration (`str`) – configuration string

  `connectFailure`()

    set connection status off and display connection status

  `connectSuccess`(port=None)

    set connection status on and display connection status

    Parameters

      port – zmq port

  `currentDataSourceAlias`()

    current data source name alias

    Returns

      current datasource class name alias

    Return type

      `str`

  `currentDataSourceNames`()

    current data source name

    Returns

      current datasource class name

    Return type

      `str`

  `currentDataSources`()

    current data source

    Returns

      current datasource class name

    Return type

      `str`

  `emitSourceChanged`()

    emits sourceChanged signal

  `isChecked`(sid)

    check if tab is active

    Parameters

      sid (`int`) – source id

    Returns

      check state

    Return type

      `int`

  `isConnected`()

    is datasource source connected

    Returns

      if datasource source connected

    Return type

      `bool`

  `onSourceChanged`()

    update current source widgets

  `removeIconClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) remove Icon Clicked

  `removeTab`(sid)

    remove tab widget

    Parameters

      sid (`int`) – source id

  `setCheckState`(sid, state)

    set check status

    Parameters

      - state (`int`) – checkbox state

      - sid (`int`) – source id

  `setErrorStatus`(status='')

    set error status

    Parameters

      status (`str`) – error status

  `setNumberOfSources`(nrsources)

    set a number of image sources

    Parameters

      nrsources (`int`) – a number of image sources

  `setSourceComboBoxByName`(sid, name)

    set source by changing combobox by name

    Parameters

      - sid (`int`) – source id

      - name (`str`) – combobox name

  `setTranslation`(trans, sid)

    stores translation of the given source

    Param

      x,y tranlation, e.g. 2345,354

    Type

      `str`

    Parameters

      sid (`int`) – source id

  `showItem`(trans)

    show items of the widget

    Parameters

      trans (`bool`) – translation item show status

  `sourceChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) source state signal

  `sourceConnected`

    (`pyqtgraph.QtCore.pyqtSignal`) source connected signal

  `sourceDisconnected`

    (`pyqtgraph.QtCore.pyqtSignal`) source disconnected signal

  `sourceLabelChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) source label name signal

  `sourceStateChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) source state signal

  `start`()

    starts viewing if pushButton enable

  `tabCheckBoxStates`()

    provides checkbox states

    Returns

      checkbox state

    Return type

      `list <``int`>

  `toggleServerConnection`()

    toggles server connection

  `translationChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) translation changed signal

  `updateButton`(status, sid)

    update slot for image source

    Parameters

      - status (`bool`) – button status

      - sid (`int`) – source id

  `updateLayout`()

    update source layout

  `updateMetaData`(**kargs)

    update source input parameters

    Parameters

      kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `updateSourceComboBox`(sourcenames, names=None)

    set source by changing combobox

    Parameters

      - sourcenames (`list` < `str` >) – source names

      - sourcenames – source names to set

  `updateSourceMetaData`(sid, **kargs)

    update source input parameters

    Parameters

      - sid (`int`) – source id

      - kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

## lavuelib.sourceWidget module

image source selection

class `lavuelib.sourceWidget.` `ASAPOSourceWidget`(sourceid=0, parent=None)

  Bases: `lavuelib.sourceWidget.SourceBaseWidget`

  test source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `alias` = 'asapo'

    (`str`) source alias

  `configuration`()

    provides configuration for the current image source

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectWidget`()

    connects widget

  `datasource` = 'ASAPOSource'

    (`str`) datasource class name

  `disconnectWidget`()

    disconnects widget

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `name` = 'ASAPO'

    (`str`) source name

  `requires` = ('ASAPO',)

    (`tuple` <`str`>) capitalized required packages

  `updateButton`(disconnect=True)

    update slot for Asapo source

  `updateMetaData`(asaposerver=None, asapotoken=None, asapobeamtime=None, asapodatasources=None, asapostreams=None, asaposourcepath=None, disconnect=True, **kargs)

    update source input parameters

    :param asaposervers asapo servers, i.e. host:port :type asaposervers: `str` :param asapotoken: asapo token :type asapotoken: `str` :param asapobeamtime: beamtime id :type asapobeamtime: `str` :param asapodatasources: asapo datasource names :type asapodatasources: `list` <`str`> > :param asapostreams: asapo stream names :type asapostreams: `list` <`str`> > :param asaposourcepath: source path :type asaposourcepath: `str` :param disconnect: disconnect on update :type disconnect: `bool` :param kargs: source widget input parameter dictionary :type kargs: `dict` < `str`, `any`>

  `widgetnames`

    (`list` <`str`>) subwidget object names

class `lavuelib.sourceWidget.` `DOOCSPropSourceWidget`(sourceid=0, parent=None)

  Bases: `lavuelib.sourceWidget.SourceBaseWidget`

  test source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `alias` = 'doocsprop'

    (`str`) source alias

  `configuration`()

    provides configuration for the current image source

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectWidget`()

    connects widget

  `datasource` = 'DOOCSPropSource'

    (`str`) datasource class name

  `disconnectWidget`()

    disconnects widget

  `eventFilter`(obj, event)

    event filter

    Parameters

      - obj – qt object

      - event – qt event

    Returns

      status flag

    Return type

      `bool`

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `name` = 'DOOCS Property'

    (`str`) source name

  `requires` = ('PYDOOCS',)

    (`tuple` <`str`>) capitalized required packages

  `updateButton`()

    update slot for Doocs attribute source

  `updateComboBox`()

    updates ComboBox

  `updateMetaData`(doocsprops=None, **kargs)

    update source input parameters

    Parameters

      - doocsprops (`str`) – json dictionary with (label, doocs attribute) items

      - kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `widgetnames`

    (`list` <`str`>) subwidget object names

class `lavuelib.sourceWidget.` `EpicsPVSourceWidget`(sourceid=0, parent=None)

  Bases: `lavuelib.sourceWidget.SourceBaseWidget`

  test source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `alias` = 'epicspv'

    (`str`) source alias

  `configuration`()

    provides configuration for the current image source

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectWidget`()

    connects widget

  `datasource` = 'EpicsPVSource'

    (`str`) datasource class name

  `disconnectWidget`()

    disconnects widget

  `eventFilter`(obj, event)

    event filter

    Parameters

      - obj – qt object

      - event – qt event

    Returns

      status flag

    Return type

      `bool`

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `name` = 'Epics PV'

    (`str`) source name

  `requires` = ('PYEPICS',)

    (`tuple` <`str`>) capitalized required packages

  `updateButton`()

    update slot for Epics file source

  `updateComboBox`()

    updates ComboBox

  `updateMetaData`(epicspvnames=None, epicspvshapes=None, **kargs)

    update source input parameters

    Parameters

      - epicspvnames (`str`) – json dictionary with (label, file epics attribute) items

      - epicspvshapes (`str`) – json dictionary with (label, dir epics attribute) items

      - kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `widgetnames`

    (`list` <`str`>) subwidget object names

class `lavuelib.sourceWidget.` `HTTPSourceWidget`(sourceid=0, parent=None)

  Bases: `lavuelib.sourceWidget.SourceBaseWidget`

  test source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `alias` = 'http'

    (`str`) source alias

  `configuration`()

    provides configuration for the current image source

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectWidget`()

    connects widget

  `datasource` = 'HTTPSource'

    (`str`) datasource class name

  `disconnectWidget`()

    disconnects widget

  `eventFilter`(obj, event)

    event filter

    Parameters

      - obj – qt object

      - event – qt event

    Returns

      status flag

    Return type

      `bool`

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `name` = 'HTTP response'

    (`str`) source name

  `requires` = ('REQUESTS',)

    (`tuple` <`str`>) capitalized required packages

  `updateButton`()

    update slot for HTTP response source

  `updateComboBox`()

    updates ComboBox

  `updateMetaData`(httpurls=None, **kargs)

    update source input parameters

    Parameters

      - httpurls (`str`) – json dictionary with (label, http urls) items

      - kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `widgetnames`

    (`list` <`str`>) subwidget object names

class `lavuelib.sourceWidget.` `HidraSourceWidget`(sourceid=0, parent=None)

  Bases: `lavuelib.sourceWidget.SourceBaseWidget`

  test source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `alias` = 'hidra'

    (`str`) source alias

  `configuration`()

    provides configuration for the current image source

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectWidget`()

    connects widget

  `datasource` = 'HiDRASource'

    (`str`) datasource class name

  `disconnectWidget`()

    disconnects widget

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `name` = 'Hidra'

    (`str`) source name

  `requires` = ('HIDRA',)

    (`tuple` <`str`>) capitalized required packages

  `updateButton`()

    update slot for Hidra source

  `updateMetaData`(serverdict=None, hidraport=None, **kargs)

    update source input parameters

    Parameters

      - serverdict (`dict` < `str`, `list` <`str`> >) – server dictionary

      - hidaraport – list of hidra ports

      - kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `widgetnames`

    (`list` <`str`>) subwidget object names

class `lavuelib.sourceWidget.` `NXSFileSourceWidget`(sourceid=0, parent=None)

  Bases: `lavuelib.sourceWidget.SourceBaseWidget`

  test source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `alias` = 'nxsfile'

    (`str`) source alias

  `configuration`()

    provides configuration for the current image source

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectWidget`()

    connects widget

  `datasource` = 'NXSFileSource'

    (`str`) datasource class name

  `disconnectWidget`()

    disconnects widget

  `eventFilter`(obj, event)

    event filter

    Parameters

      - obj – qt object

      - event – qt event

    Returns

      status flag

    Return type

      `bool`

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `name` = 'NeXus File'

    (`str`) source name

  `updateButton`()

    update slot for nexus file source

  `updateMetaData`(nxsopen=None, nxslast=None, **kargs)

    update source input parameters

    Parameters

      - nxsopen (`bool`) – nexus file source keeps the file open

      - nxslast (`bool`) – nexus file source starts from the last image

      - kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `widgetnames`

    (`list` <`str`>) subwidget object names

class `lavuelib.sourceWidget.` `SourceBaseWidget`(sourceid=0, parent=None)

  Bases: `PyQt5.QtWidgets.QWidget`

  general source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `active`

    (`bool`) source widget active

  `addIconClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) add Icon Clicked

  `alias` = 'test'

    (`str`) source alias

  `buttonEnabled`

    (`pyqtgraph.QtCore.pyqtSignal`) push button enabled signal

  `configuration`()

    provides configuration for the current image source

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectWidget`()

    connects widget

  `datasource` = 'BaseSource'

    (`str`) datasource class name

  `disconnectWidget`()

    disconnects widget

  `eventObjectFilter`(event, combobox, varname, atdict, atlist)

    event filter

    Parameters

      - obj – qt object

      - event – qt event

    Returns

      status flag

    Return type

      `bool`

  `expertmode`

    (`bool`) expertmode flag

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `name` = 'Test'

    (`str`) source name

  `removeIconClicked`

    (`pyqtgraph.QtCore.pyqtSignal`) remove Icon Clicked

  `requires` = ()

    (`tuple` <`str`>) capitalized required packages

  `setActive`(active=True)

    set active flag

    Parameters

      active (`bool`) – active flag

  `sourceLabelChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) source label name signal

  `sourceStateChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) source state signal

  `updateButton`()

    update slot for test source

  `updateComboBox`()

    abstract updateComboBox

  `updateMetaData`(**kargs)

    update source input parameters

    Parameters

      kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `widgetnames`

    (`list` <`str`>) subwidget object names

  `widgets`

    (`list` <`PyQt5.QtGui.QWidget`>) subwidget objects

class `lavuelib.sourceWidget.` `TangoAttrSourceWidget`(sourceid=0, parent=None)

  Bases: `lavuelib.sourceWidget.SourceBaseWidget`

  test source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `alias` = 'tangoattr'

    (`str`) source alias

  `configuration`()

    provides configuration for the current image source

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectWidget`()

    connects widget

  `datasource` = 'TangoAttrSource'

    (`str`) datasource class name

  `disconnectWidget`()

    disconnects widget

  `eventFilter`(obj, event)

    event filter

    Parameters

      - obj – qt object

      - event – qt event

    Returns

      status flag

    Return type

      `bool`

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `name` = 'Tango Attribute'

    (`str`) source name

  `requires` = ('TANGO',)

    (`tuple` <`str`>) capitalized required packages

  `updateButton`()

    update slot for Tango attribute source

  `updateComboBox`()

    updates ComboBox

  `updateMetaData`(tangoattrs=None, **kargs)

    update source input parameters

    Parameters

      - tangoattrs (`str`) – json dictionary with (label, tango attribute) items

      - kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `widgetnames`

    (`list` <`str`>) subwidget object names

class `lavuelib.sourceWidget.` `TangoEventsSourceWidget`(sourceid=0, parent=None)

  Bases: `lavuelib.sourceWidget.SourceBaseWidget`

  test source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `alias` = 'tangoevents'

    (`str`) source alias

  `configuration`()

    provides configuration for the current image source

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectWidget`()

    connects widget

  `datasource` = 'TangoEventsSource'

    (`str`) datasource class name

  `disconnectWidget`()

    disconnects widget

  `eventFilter`(obj, event)

    event filter

    Parameters

      - obj – qt object

      - event – qt event

    Returns

      status flag

    Return type

      `bool`

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `name` = 'Tango Events'

    (`str`) source name

  `requires` = ('TANGO',)

    (`tuple` <`str`>) capitalized required packages

  `updateButton`()

    update slot for Tango attribute source

  `updateComboBox`()

    updates ComboBox

  `updateMetaData`(tangoevattrs=None, **kargs)

    update source input parameters

    Parameters

      - tangoevattrs (`str`) – json dictionary with (label, tango attribute) items

      - kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `widgetnames`

    (`list` <`str`>) subwidget object names

class `lavuelib.sourceWidget.` `TangoFileSourceWidget`(sourceid=0, parent=None)

  Bases: `lavuelib.sourceWidget.SourceBaseWidget`

  test source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `alias` = 'tangofile'

    (`str`) source alias

  `configuration`()

    provides configuration for the current image source

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectWidget`()

    connects widget

  `datasource` = 'TangoFileSource'

    (`str`) datasource class name

  `disconnectWidget`()

    disconnects widget

  `eventFilter`(obj, event)

    event filter

    Parameters

      - obj – qt object

      - event – qt event

    Returns

      status flag

    Return type

      `bool`

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `name` = 'Tango File'

    (`str`) source name

  `requires` = ('TANGO',)

    (`tuple` <`str`>) capitalized required packages

  `updateButton`()

    update slot for Tango file source

  `updateComboBox`()

    updates ComboBox

  `updateMetaData`(tangofileattrs=None, tangodirattrs=None, dirtrans=None, nxsopen=None, nxslast=None, **kargs)

    update source input parameters

    Parameters

      - tangofileattrs (`str`) – json dictionary with (label, file tango attribute) items

      - tangodirattrs (`str`) – json dictionary with (label, dir tango attribute) items

      - dirtrans (`str`) – json dictionary with directory and file name translation

      - nxsopen (`bool`) – nexus file source keeps the file open

      - nxslast (`bool`) – nexus file source starts from the last image

      - kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `widgetnames`

    (`list` <`str`>) subwidget object names

class `lavuelib.sourceWidget.` `TestSourceWidget`(sourceid=0, parent=None)

  Bases: `lavuelib.sourceWidget.SourceBaseWidget`

  test source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

class `lavuelib.sourceWidget.` `TinePropSourceWidget`(sourceid=0, parent=None)

  Bases: `lavuelib.sourceWidget.SourceBaseWidget`

  test source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `alias` = 'tineprop'

    (`str`) source alias

  `configuration`()

    provides configuration for the current image source

    Returns

      configuration string

    Return type

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectWidget`()

    connects widget

  `datasource` = 'TinePropSource'

    (`str`) datasource class name

  `disconnectWidget`()

    disconnects widget

  `eventFilter`(obj, event)

    event filter

    Parameters

      - obj – qt object

      - event – qt event

    Returns

      status flag

    Return type

      `bool`

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `name` = 'Tine Property'

    (`str`) source name

  `requires` = ('PYTINE',)

    (`tuple` <`str`>) capitalized required packages

  `updateButton`()

    update slot for Tine property source

  `updateComboBox`()

    updates ComboBox

  `updateMetaData`(tineprops=None, **kargs)

    update source input parameters

    Parameters

      - tineprops (`str`) – json dictionary with (label, tine property) items

      - kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `widgetnames`

    (`list` <`str`>) subwidget object names

class `lavuelib.sourceWidget.` `ZMQSourceWidget`(sourceid=0, parent=None)

  Bases: `lavuelib.sourceWidget.SourceBaseWidget`

  test source widget

  constructor

  Parameters

    - sourceid (`int`) – source id

    - parent (`pyqtgraph.QtCore.QObject`) – parent object

  `alias` = 'zmq'

    (`str`) source alias

  `configuration`()

    provides configuration for the current image source

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current image source

    Parameters

      configuration (`str`) – configuration string

  `connectWidget`()

    connects widget

  `datasource` = 'ZMQSource'

    (`str`) datasource class name

  `disconnectWidget`()

    disconnects widget

  `eventFilter`(obj, event)

    event filter

    Parameters

      - obj – qt object

      - event – qt event

    Returns

      status flag

    Return type

      `bool`

  `label`()

    return a label of the current detector

    Returns

      label of the current detector

    Return type

      `str`

  `name` = 'ZMQ Stream'

    (`str`) source name

  `updateButton`(disconnect=True)

    update slot for ZMQ source

  `updateComboBox`()

    updates ComboBox

  `updateMetaData`(zmqtopics=None, autozmqtopics=None, datasources=None, disconnect=True, zmqservers=None, **kargs)

    update source input parameters

    Parameters

      - zmqtopics (`list` <`str`> >) – zmq source topics

      - autozmqtopics (`bool`) – automatic zmq topics enabled

      - datasources (`list` <`str`> >) – automatic zmq source topics

      - disconnect (`bool`) – disconnect on update

      - zmqservers (`str`) – json dictionary with (label, zmq servers) items

      - kargs (`dict` < `str`, `any`>) – source widget input parameter dictionary

  `widgetnames`

    (`list` <`str`>) subwidget object names

`lavuelib.sourceWidget.` `swproperties` = [{'alias': 'hidra', 'name': 'Hidra', 'widget': 'HidraSourceWidget', 'requires': ('HIDRA',)}, {'alias': 'http', 'name': 'HTTP response', 'widget': 'HTTPSourceWidget', 'requires': ('REQUESTS',)}, {'alias': 'tangoattr', 'name': 'Tango Attribute', 'widget': 'TangoAttrSourceWidget', 'requires': ('TANGO',)}, {'alias': 'tangoevents', 'name': 'Tango Events', 'widget': 'TangoEventsSourceWidget', 'requires': ('TANGO',)}, {'alias': 'tangofile', 'name': 'Tango File', 'widget': 'TangoFileSourceWidget', 'requires': ('TANGO',)}, {'alias': 'doocsprop', 'name': 'DOOCS Property', 'widget': 'DOOCSPropSourceWidget', 'requires': ('PYDOOCS',)}, {'alias': 'zmq', 'name': 'ZMQ Stream', 'widget': 'ZMQSourceWidget', 'requires': ()}, {'alias': 'nxsfile', 'name': 'NeXus File', 'widget': 'NXSFileSourceWidget', 'requires': ()}, {'alias': 'tineprop', 'name': 'Tine Property', 'widget': 'TinePropSourceWidget', 'requires': ('PYTINE',)}, {'alias': 'epicspv', 'name': 'Epics PV', 'widget': 'EpicsPVSourceWidget', 'requires': ('PYEPICS',)}, {'alias': 'asapo', 'name': 'ASAPO', 'widget': 'ASAPOSourceWidget', 'requires': ('ASAPO',)}, {'alias': 'test', 'name': 'Test', 'widget': 'TestSourceWidget', 'requires': ()}]

  ( `dict` < `str`, any > ) source widget properties

## lavuelib.statisticsGroupBox module

statistics widget

class `lavuelib.statisticsGroupBox.` `StatisticsGroupBox`(parent=None)

  Bases: `PyQt5.QtWidgets.QGroupBox`

  Display some general image statistics.

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `changeView`(showstats=False, showvariance=False)

    shows or hides the histogram widget

    Parameters

      showhistogram (`bool`) – if histogram should be shown

  `updateStatistics`(mean, maximum, variance, scaling)

    update image statistic values

    Parameters

      meanparent – parent object

## lavuelib.takeMotorsDialog module

motor device widget

`lavuelib.takeMotorsDialog.` `TANGO` = True

  (`bool`) tango imported

class `lavuelib.takeMotorsDialog.` `TakeMotorsDialog`(parent=None)

  Bases: `PyQt5.QtWidgets.QDialog`

  detector geometry widget class

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `accept`()

    updates class variables with the form content

  `createGUI`()

    create GUI

  `motortips`

    (`list`<:obj:`str`>) motortips list

  `title`

    (`str`) group title

  `xmotordevice`

    (`tango.DeviceProxy`) x motor device

  `xmotorname`

    (`str`) x motor name

  `ymotordevice`

    (`tango.DeviceProxy`) y motor device

  `ymotorname`

    (`str`) y motor name

## lavuelib.toolWidget module

image widget

class `lavuelib.toolWidget.` `AngleQToolWidget`(parent=None)

  Bases: `lavuelib.toolWidget.ToolBaseWidget`

  angle/q tool widget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `activate`()

    activates tool widget

  `alias` = 'angle/q'

    (`str`) tool name alias

  `beforeplot`(array, rawarray)

    command before plot

    Parameters

      - array (`numpy.ndarray`) – 2d image array

      - rawarray (`numpy.ndarray`) – 2d raw image array

    Returns

      2d image array and raw image

    Return type

      (`numpy.ndarray`, `numpy.ndarray`)

  `configuration`()

    provides configuration for the current tool

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current tool

    Parameters

      configuration (`str`) – configuration string

  `deactivate`()

    deactivates tool widget

  `name` = 'Angle/Q'

    (`str`) tool name

  `requires` = ()

    (`tuple` <`str`>) capitalized required packages

  `signal2slot`

    (`list` < [`pyqtgraph.QtCore.pyqtSignal`, `str`] >) list of [signal, slot] object to connect

  `updateGeometryTip`()

    update geometry tips

  `updateRangeTip`()

    update geometry tips

class `lavuelib.toolWidget.` `DiffractogramToolWidget`(parent=None)

  Bases: `lavuelib.toolWidget.ToolBaseWidget`

  diffractogram tool widget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `activate`()

    activates tool widget

  `afterplot`()

    command after plot

  `alias` = 'diffractogram'

    (`str`) tool name alias

  `beforeplot`(array, rawarray)

    command before plot

    Parameters

      - array (`numpy.ndarray`) – 2d image array

      - rawarray (`numpy.ndarray`) – 2d raw image array

    Returns

      2d image array and raw image

    Return type

      (`numpy.ndarray`, `numpy.ndarray`)

  `configuration`()

    provides configuration for the current tool

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current tool

    Parameters

      configuration (`str`) – configuration string

  `deactivate`()

    deactivates tool widget

  `findregions`()

    find regions lists

  `name` = 'Diffractogram'

    (`str`) tool name

  `requires` = ('PYFAI',)

    (`tuple` <`str`>) capitalized required packages

  `runProgress`(commands, onclose='_closeReset', text='Updating diffractogram ranges ...')

    starts progress thread with the given commands

    Parameters

      - commands (`list` <`str`>) – list of commands

      - onclose (`str`) – close command name

      - text (`str`) – text to display

  `setColors`(colors=None, force=False)

    sets colors

    Parameters

      colors (`str`) – json list of roi colors

    Returns

      change status

    Return type

      `bool`

  `signal2slot`

    (`list` < [`pyqtgraph.QtCore.pyqtSignal`, `str`] >) list of [signal, slot] object to connect

  `updateGeometryTip`()

    update geometry tips

  `updateRangeTip`()

    update geometry tips

  `waitForThread`()

    waits for running thread

class `lavuelib.toolWidget.` `IntensityToolWidget`(parent=None)

  Bases: `lavuelib.toolWidget.ToolBaseWidget`

  intensity tool widget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `afterplot`()

    command after plot

  `alias` = 'intensity'

    (`str`) tool name alias

  `configuration`()

    provides configuration for the current tool

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current tool

    Parameters

      configuration (`str`) – configuration string

  `name` = 'Intensity'

    (`str`) tool name

  `requires` = ()

    (`tuple` <`str`>) capitalized required packages

  `signal2slot`

    (`list` < [`pyqtgraph.QtCore.pyqtSignal`, `str`] >) list of [signal, slot] object to connect

class `lavuelib.toolWidget.` `LineCutToolWidget`(parent=None)

  Bases: `lavuelib.toolWidget.ToolBaseWidget`

  line-cut tool widget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `activate`()

    activates tool widget

  `afterplot`()

    command after plot

  `alias` = 'linecut'

    (`str`) tool name alias

  `configuration`()

    provides configuration for the current tool

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current tool

    Parameters

      configuration (`str`) – configuration string

  `deactivate`()

    activates tool widget

  `name` = 'LineCut'

    (`str`) tool name

  `requires` = ()

    (`tuple` <`str`>) capitalized required packages

  `signal2slot`

    (`list` < [`pyqtgraph.QtCore.pyqtSignal`, `str`] >) list of [signal, slot] object to connect

class `lavuelib.toolWidget.` `MaximaToolWidget`(parent=None)

  Bases: `lavuelib.toolWidget.ToolBaseWidget`

  maxima tool widget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `activate`()

    activates tool widget

  `alias` = 'maxima'

    (`str`) tool name alias

  `beforeplot`(array, rawarray)

    command before plot

    Parameters

      - array (`numpy.ndarray`) – 2d image array

      - rawarray (`numpy.ndarray`) – 2d raw image array

    Returns

      2d image array and raw image

    Return type

      (`numpy.ndarray`, `numpy.ndarray`)

  `configuration`()

    provides configuration for the current tool

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current tool

    Parameters

      configuration (`str`) – configuration string

  `deactivate`()

    deactivates tool widget

  `name` = 'Maxima'

    (`str`) tool name

  `requires` = ()

    (`tuple` <`str`>) capitalized required packages

  `signal2slot`

    (`list` < [`pyqtgraph.QtCore.pyqtSignal`, `str`] >) list of [signal, slot] object to connect

  `updateGeometryTip`()

    update geometry tips

class `lavuelib.toolWidget.` `MeshToolWidget`(parent=None)

  Bases: `lavuelib.toolWidget.ToolBaseWidget`

  mesh tool widget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `activate`()

    activates tool widget

  `alias` = 'meshscan'

    (`str`) tool name alias

  `configuration`()

    provides configuration for the current tool

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current tool

    Parameters

      configuration (`str`) – configuration string

  `deactivate`()

    deactivates tool widget

  `name` = 'MeshScan'

    (`str`) tool name

  `requires` = ('TANGO',)

    (`tuple` <`str`>) capitalized required packages

  `roiInfoChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) roi info Changed signal

  `signal2slot`

    (`list` < [`pyqtgraph.QtCore.pyqtSignal`, `str`] >) list of [signal, slot] object to connect

  `updateROIDisplayText`(text, currentroi, roiVal)

    updates ROI display text

    Parameters

      - text (`str`) – standard display text

      - currentroi (`str`) – current roi label

      - text – roi sum value

class `lavuelib.toolWidget.` `MotorsToolWidget`(parent=None)

  Bases: `lavuelib.toolWidget.ToolBaseWidget`

  motors tool widget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `activate`()

    activates tool widget

  `alias` = 'movemotors'

    (`str`) tool name alias

  `configuration`()

    provides configuration for the current tool

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current tool

    Parameters

      configuration (`str`) – configuration string

  `name` = 'MoveMotors'

    (`str`) tool name

  `requires` = ('TANGO',)

    (`tuple` <`str`>) capitalized required packages

  `signal2slot`

    (`list` < [`pyqtgraph.QtCore.pyqtSignal`, `str`] >) list of [signal, slot] object to connect

class `lavuelib.toolWidget.` `OneDToolWidget`(parent=None)

  Bases: `lavuelib.toolWidget.ToolBaseWidget`

  1d plot tool widget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `activate`()

    activates tool widget

  `afterplot`()

    command after plot

  `alias` = '1d-plot'

    (`str`) tool name alias

  `beforeplot`(array, rawarray)

    command before plot

    Parameters

      - array (`numpy.ndarray`) – 2d image array

      - rawarray (`numpy.ndarray`) – 2d raw image array

    Returns

      2d image array and raw image

    Return type

      (`numpy.ndarray`, `numpy.ndarray`)

  `configuration`()

    provides configuration for the current tool

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current tool

    Parameters

      configuration (`str`) – configuration string

  `deactivate`()

    activates tool widget

  `name` = '1d-Plot'

    (`str`) tool name

  `requires` = ()

    (`tuple` <`str`>) capitalized required packages

  `signal2slot`

    (`list` < [`pyqtgraph.QtCore.pyqtSignal`, `str`] >) list of [signal, slot] object to connect

class `lavuelib.toolWidget.` `ParametersToolWidget`(parent=None)

  Bases: `lavuelib.toolWidget.ToolBaseWidget`

  motors tool widget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `activate`()

    activates tool widget

  `alias` = 'parameters'

    (`str`) tool name alias

  `configuration`()

    provides configuration for the current tool

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current tool

    Parameters

      configuration (`str`) – configuration string

  `convert` = {'bool': <bound method Converters.toBool of <class 'lavuelib.toolWidget.Converters'>>, 'float': <class 'float'>, 'float16': <class 'float'>, 'float32': <class 'float'>, 'float64': <class 'float'>, 'int': <class 'int'>, 'int16': <class 'int'>, 'int32': <class 'int'>, 'int64': <class 'int'>, 'int8': <class 'int'>, 'str': <class 'str'>, 'string': <class 'str'>, 'uint': <class 'int'>, 'uint16': <class 'int'>, 'uint32': <class 'int'>, 'uint64': <class 'int'>, 'uint8': <class 'int'>}

    (`dict` <`str` , `type` or `types.MethodType` >) map of type : converting function

  `deactivate`()

    activates tool widget

  `name` = 'Parameters'

    (`str`) tool name

  `requires` = ('TANGO',)

    (`tuple` <`str`>) capitalized required packages

  `signal2slot`

    (`list` < [`pyqtgraph.QtCore.pyqtSignal`, `str`] >) list of [signal, slot] object to connect

class `lavuelib.toolWidget.` `ProjectionToolWidget`(parent=None)

  Bases: `lavuelib.toolWidget.ToolBaseWidget`

  Projections tool widget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `activate`()

    activates tool widget

  `afterplot`()

    command after plot

  `alias` = 'projections'

    (`str`) tool name alias

  `configuration`()

    provides configuration for the current tool

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current tool

    Parameters

      configuration (`str`) – configuration string

  `deactivate`()

    activates tool widget

  `name` = 'Projections'

    (`str`) tool name

  `requires` = ()

    (`tuple` <`str`>) capitalized required packages

  `signal2slot`

    (`list` < [`pyqtgraph.QtCore.pyqtSignal`, `str`] >) list of [signal, slot] object to connect

class `lavuelib.toolWidget.` `QROIProjToolWidget`(parent=None)

  Bases: `lavuelib.toolWidget.ToolBaseWidget`

  angle/q +roi + projections tool widget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `activate`()

    activates tool widget

  `afterplot`()

    command after plot

  `alias` = 'q+roi+proj'

    (`str`) tool name alias

  `applyROIPressed`

    (`pyqtgraph.QtCore.pyqtSignal`) apply ROI pressed signal

  `configuration`()

    provides configuration for the current tool

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current tool

    Parameters

      configuration (`str`) – configuration string

  `deactivate`()

    deactivates tool widget

  `fetchROIPressed`

    (`pyqtgraph.QtCore.pyqtSignal`) fetch ROI pressed signal

  `name` = 'Q+ROI+Proj'

    (`str`) tool name

  `requires` = ()

    (`tuple` <`str`>) capitalized required packages

  `roiInfoChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) roi info Changed signal

  `setROIsNumber`(rid)

    sets a number of rois

    Parameters

      rid (`int`) – number of rois

  `signal2slot`

    (`list` < [`pyqtgraph.QtCore.pyqtSignal`, `str`] >) list of [signal, slot] object to connect

  `updateApplyTips`(rid)

    updates apply tips

    Parameters

      rid (`int`) – current roi id

  `updateGeometryTip`()

    update geometry tips

  `updateROIButton`(enabled)

    enables/disables ROI buttons

    Parameters

      enable (`bool`) – buttons enabled

  `updateROIDisplayText`(text, currentroi, roiVal)

    updates ROI display text

    Parameters

      - text (`str`) – standard display text

      - currentroi (`str`) – current roi label

      - text – roi sum value

  `updateROILineEdit`(text)

    updates ROI line edit text

    Parameters

      text (`str`) – text to update

class `lavuelib.toolWidget.` `ROIToolWidget`(parent=None)

  Bases: `lavuelib.toolWidget.ToolBaseWidget`

  roi tool widget

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `activate`()

    activates tool widget

  `alias` = 'roi'

    (`str`) tool name alias

  `applyROIPressed`

    (`pyqtgraph.QtCore.pyqtSignal`) apply ROI pressed signal

  `configuration`()

    provides configuration for the current tool

    Returns configuration

      configuration string

    Rtype configuration

      `str`

  `configure`(configuration)

    set configuration for the current tool

    Parameters

      configuration (`str`) – configuration string

  `deactivate`()

    deactivates tool widget

  `fetchROIPressed`

    (`pyqtgraph.QtCore.pyqtSignal`) fetch ROI pressed signal

  `name` = 'ROI'

    (`str`) tool name

  `requires` = ()

    (`tuple` <`str`>) capitalized required packages

  `roiInfoChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) roi info Changed signal

  `setROIsNumber`(rid)

    sets a number of rois

    Parameters

      rid (`int`) – number of rois

  `signal2slot`

    (`list` < [`pyqtgraph.QtCore.pyqtSignal`, `str`] >) list of [signal, slot] object to connect

  `updateApplyTips`(rid)

    updates apply tips

    Parameters

      rid (`int`) – current roi id

  `updateROIButton`(enabled)

    enables/disables ROI buttons

    Parameters

      enable (`bool`) – buttons enabled

  `updateROIDisplayText`(text, currentroi, roiVal)

    updates ROI display text

    Parameters

      - text (`str`) – standard display text

      - currentroi (`str`) – current roi label

      - text – roi sum value

  `updateROILineEdit`(text)

    updates ROI line edit text

    Parameters

      text (`str`) – text to update

`lavuelib.toolWidget.` `twproperties` = [{'alias': 'intensity', 'name': 'Intensity', 'widget': 'IntensityToolWidget', 'requires': ()}, {'alias': 'roi', 'name': 'ROI', 'widget': 'ROIToolWidget', 'requires': ()}, {'alias': 'linecut', 'name': 'LineCut', 'widget': 'LineCutToolWidget', 'requires': ()}, {'alias': 'angle/q', 'name': 'Angle/Q', 'widget': 'AngleQToolWidget', 'requires': ()}, {'alias': 'movemotors', 'name': 'MoveMotors', 'widget': 'MotorsToolWidget', 'requires': ('TANGO',)}, {'alias': 'meshscan', 'name': 'MeshScan', 'widget': 'MeshToolWidget', 'requires': ('TANGO',)}, {'alias': '1d-plot', 'name': '1d-Plot', 'widget': 'OneDToolWidget', 'requires': ()}, {'alias': 'projections', 'name': 'Projections', 'widget': 'ProjectionToolWidget', 'requires': ()}, {'alias': 'maxima', 'name': 'Maxima', 'widget': 'MaximaToolWidget', 'requires': ()}, {'alias': 'parameters', 'name': 'Parameters', 'widget': 'ParametersToolWidget', 'requires': ('TANGO',)}, {'alias': 'diffractogram', 'name': 'Diffractogram', 'widget': 'DiffractogramToolWidget', 'requires': ('PYFAI',)}, {'alias': 'q+roi+proj', 'name': 'Q+ROI+Proj', 'widget': 'QROIProjToolWidget', 'requires': ()}]

  ( `dict` < `str`, any > ) tool widget properties

## lavuelib.transformationsWidget module

transformation widget

class `lavuelib.transformationsWidget.` `TransformationsWidget`(parent=None)

  Bases: `PyQt5.QtWidgets.QWidget`

  Select how an image should be transformed.

  constructor

  Parameters

    parent (`pyqtgraph.QtCore.QObject`) – parent object

  `setEnable`(flag)

    disables or enables the combobox

    Parameters

      flag (`bool`) – combobox to be enabled

  `setKeepCoordsLabel`(flag, transpose=False)

    sets keep original coordinates label according to flag

    Parameters

      flag (`bool`) – keep original coordinates flag

  `setTransformation`(tname)

    sets transformation from the string

    Parameters

      tname (`str`) – transfromation name

  `transformation`()

    provides transformation name

    Returns

      transfromation name

    Return type

      `str`

  `transformationChanged`

    (`pyqtgraph.QtCore.pyqtSignal`) transformation changed signal

## Module contents

Live Viewer widgets