2.4.2.2. DAQ Viewer

This module is to be used to interface any detector. It will display hardware settings and display data as exported by the hardware plugins (see Emission of data). The default detector is a Mock ones (a kind of software based detector generating data and useful to test the program development). Other detectors may be loaded as plugins, see Instrument Plugins.

2.4.2.2.1. Introduction

This module has a generic interface comprised of a dockable panel related to the settings and one or more viewers specific of the type of data to be acquired (see Data Viewers. For instance, Fig. 2.11 displays a typical DAQ_Viewer GUI with a settings dockable panel (left) and a 2D viewer on the right panel.

Viewer panel

Fig. 2.11 Typical DAQ_Viewer GUI with a dockable panel for settings (left) and a 2D viewer on the right panel.

2.4.2.2.2. Settings

The settings panel is comprised of 2 sections, the top one displays buttons to select a given hardware (DAQ type and Detector), initialize it, grab and save data. The bottom one, Fig. 2.12, is a Tree type parameter list displaying the viewer main settings (Main settings) and specific settings of the chosen hardware (see Hardware Settings).

2.4.2.2.2.1. Hardware initialization

  • DAQ_type: either DAQ0D, DAQ1D, DAQ2D or DAQND respectively for scalar detectors (powermeter for instance), vector detectors (spectrometer for instance), image like detectors and rare hyperdimensional detectors.

  • Detector: list of available hardware plugins of the DAQ_type type.

  • Ini. Det: Initialize the hardware with the given settings (see Instrument Plugins for details on how to set hardware settings.)

  • Quit: De-initialize the hardware and quit the application

2.4.2.2.2.2. Data Acquisition

  • grab: Start a continuous grabing of data. Detector must be initialized.

  • snap: Start a single grab (snap). Mandatory for the first time data is acquired after initialization.

  • save: Save current data

  • snap&save: Do a new snap and then save the data

  • open: Load data previously saved with the save button

  • showsettings: Display or hide some settings

  • refresh: try to refresh the hardware, for instance the list of COM ports

  • take_bkg: do a specific snap where the data will be saved as a background

  • do_bkg: use the background previously saved to correct the displayed (only displayed, saved data are still raw data) datas.

  • save_sett: Save in a file the current settings in a file for later recall

  • load_sett: Recall from a file the settings

The last two options are useful only in stand alone mode. When used with the Dashboard module, all settings are preset using the preset manager (see Preset manager).

2.4.2.2.2.3. Main settings

The first tree section in the settings refers to the acquisition options. The first two items are just a reminder of the type of detector currently activated.

settings

Fig. 2.12 Typical DAQ_Viewer Main settings.

  • DAQ type: readonly string recalling the DAQ type used

  • Detector type: readonly string recalling the selected plugin

  • Nviewers: readonly integer displaying the number of data viewers

  • Controller ID: integer used to deal with a controller controlling multiple hardware, see Multiple hardware from one controller

  • Naverage: integer to set in order to do data averaging, see Hardware averaging.

  • Show averaging: in the case of software averaging (see Hardware averaging), if this is set to True, intermediate averaging data will be displayed

  • Live averaging: show averaging must be set to False. If set to True, a live grab will perform non-stop averaging (current averaging value will be displayed just below). Could be used to check how much one should average, then set Naverage to this value

  • Wait time (ms): Extra waiting time before sending data to viewer, can be used to cadence DAQ_Scan execution, or data logging

  • Continuous saving: useful for data logging. Will display new options below in order to set a h5 file to log live data, see Continuous Saving.

  • Overshoot options: useful to protect the experiment. If this is activated, then as soon as any value of the datas exported by this detector reaches the overshoot value, the module will throw a overshoot_signal (boolean PyQtSignal). The overshoot manager of the Dashboard generalize this feature (see Overshoot manager) by triggering actions on actuators if overshoot signals are detected. Other features related will soon be added (action triggered on a DAQ_Move, for instance a shutter on a laser beam)

  • Axis options: only valid for 2D detector. You can add labels, units, scaling and offset (with respect to pixels) to both x and y axis of the detector. Redundant with the plugin data export feature (see Emission of data)

2.4.2.2.3. Data Viewers

Data Viewers presented in section Data Viewers are the one used to display data from detectors controlled from the DAQ_Viewer. By default, one viewer will be set with its type (0D, 1D, 2D, ND) depending on the detector main dimensionality (DAQ_type: DAQ0D, DAQ1D, DAQ2D…) but in fact the data viewers are set depending on the data exported from the detector plugin using the data_grabed_signal or data_grabed_signal_temp signals.

These two signal emit a list of DataFromPlugins objects. The length of this list will set the number of dedicated data viewers. In general one, but think about data from a Lockin amplifier generating an amplitude in volt and a phase in degrees. They are unrelated physical values better displayed in separated axes or viewers. The DataFromPlugins’s attribute dim (a string either equal to Data0D, Data1D, Data2D, DataND) will determine the data viewer type to set.

This code in a plugin .. code-block:: python

self.data_grabed_signal.emit([

DataFromPlugins(name=’Mock1’, data=data1, dim=’Data0D’), DataFromPlugins(name=’Mock2’, data=data2, dim=’Data2D’)])

will trigger two separated viewers displaying respectively 0D data and 2D data.

2.4.2.2.4. Other utilities

There are other functionalities that can be triggered in specific conditions. Among those, you’ll find:

  • The LCD screen to display 0D Data

  • The ROI_select button and ROI on a Viewer2D