Below follows an overview of the developed graphical interface to be used in the data treatment.

Viewer3D

Quick visualization tool designed to deal with the difficulties of handling 3D data. Through simple keybord inputs one can look through the data along the principal axis.

class Viewer3D.Viewer3D(Data, bins, axis=2, log=False, ax=None, grid=False, adjustable=True, outputFunction=<built-in function print>, cmap=None, CurratAxeBraggList=None, plotCurratAxe=False, Ei=None, EfLimits=None, dataset=None, cut1DFunctionRectangle=None, cut1DFunctionCircle=None, cut1DFunctionRectanglePerp=None, cut1DFunctionRectangleHorizontal=None, cut1DFunctionRectangleVertical=None, backgroundSubtraction=False, **kwargs)[source]

3 dimensional viewing object generating interactive Matplotlib figure. Keeps track of all the different plotting functions and variables in order to allow the user to change between different slicing modes and to scroll through the data in an interactive way.

Parameters
  • Data (-) – Intensity array in three dimensions. Assumed to have Qx, Qy, and E along the first, second, and third directions respectively.

  • bins (-) – Coordinates of the three directions as returned by the BinData3D functionality of DataSet.

Kwargs:

  • axis (int): Axis along which the interactive plot slices the data (default 2).

  • log (bool): If true, the log 10 of the intensity is plotted (default False).

  • ax (matplotlib axis): Matplotlib axis into which one plots data (Default None).

  • grid (bool/int): If int, grid will be plotted with zorder=int, if True, grid is plotted at zorder=-10 (Default False).

  • adjustable (bool): If set true, 2 sliders will be present allowing to fine tune the c-axis (Default True)

  • outputFunction (function): Function called on output string (default print)

  • CurratAxeBraggList (list): List of Bragg peaks for which Currat-Axe spurions are to be calculated, [[H1,K1,L1],[H2,K2,L2],..] (default None)

  • plotCurratAxe (bool): Flag to determine whether or not to plot the Currat-Axe spurions

  • Ei (list): List of incoming energies (default None)

  • EfLimits (float,float): Minimal and maximal Ef for current instrument (default None)

  • dataset (DataSet): Reference to data set used - needed for interactive cutting with (default None)

  • cut1DFunctionRectangle (function): Function to be called when performing an interactive rectangle (default None)

  • cut1DFunctionCircle (function): Function to be called when performing an interactive circle (default None)

  • backgroundSubtraction (bool): Signify if a subtraction has been performed such that interactive cuts work (default False)

For an example, see the quick plotting tutorial under scripting tutorials.

__init__(Data, bins, axis=2, log=False, ax=None, grid=False, adjustable=True, outputFunction=<built-in function print>, cmap=None, CurratAxeBraggList=None, plotCurratAxe=False, Ei=None, EfLimits=None, dataset=None, cut1DFunctionRectangle=None, cut1DFunctionCircle=None, cut1DFunctionRectanglePerp=None, cut1DFunctionRectangleHorizontal=None, cut1DFunctionRectangleVertical=None, backgroundSubtraction=False, **kwargs)[source]

3 dimensional viewing object generating interactive Matplotlib figure. Keeps track of all the different plotting functions and variables in order to allow the user to change between different slicing modes and to scroll through the data in an interactive way.

Parameters
  • Data (-) – Intensity array in three dimensions. Assumed to have Qx, Qy, and E along the first, second, and third directions respectively.

  • bins (-) – Coordinates of the three directions as returned by the BinData3D functionality of DataSet.

Kwargs:

  • axis (int): Axis along which the interactive plot slices the data (default 2).

  • log (bool): If true, the log 10 of the intensity is plotted (default False).

  • ax (matplotlib axis): Matplotlib axis into which one plots data (Default None).

  • grid (bool/int): If int, grid will be plotted with zorder=int, if True, grid is plotted at zorder=-10 (Default False).

  • adjustable (bool): If set true, 2 sliders will be present allowing to fine tune the c-axis (Default True)

  • outputFunction (function): Function called on output string (default print)

  • CurratAxeBraggList (list): List of Bragg peaks for which Currat-Axe spurions are to be calculated, [[H1,K1,L1],[H2,K2,L2],..] (default None)

  • plotCurratAxe (bool): Flag to determine whether or not to plot the Currat-Axe spurions

  • Ei (list): List of incoming energies (default None)

  • EfLimits (float,float): Minimal and maximal Ef for current instrument (default None)

  • dataset (DataSet): Reference to data set used - needed for interactive cutting with (default None)

  • cut1DFunctionRectangle (function): Function to be called when performing an interactive rectangle (default None)

  • cut1DFunctionCircle (function): Function to be called when performing an interactive circle (default None)

  • backgroundSubtraction (bool): Signify if a subtraction has been performed such that interactive cuts work (default False)

For an example, see the quick plotting tutorial under scripting tutorials.

saveToFile(folder, extension, gui=None)[source]

Save all planes to files

Parameters
  • folder (-) – Folder in which to save files

  • extension (-) – name of wanted extension. Must be accepted by matplotlib

Kwargs:

  • gui (PyQt5 MainApplication): Used for MJOLNIR Gui

setPlane(value)[source]

Change plotting plane to new along same axis

setProjection(value)[source]

Change projection between Qx,Qy, and E, or along principal, orthogonal Q direction, or E if plotting in RLU.