2.5.1. DAQ Scan¶
This module is an extension of the DashBoard but is the heart of PyMoDAQ, it will:
setup automatic data acquisition of detectors as a function of one or more actuators
save datas in hierarchical hdf5 binary files (compatible with the H5Browser used to display/explore data)
The flow of this module is as follow:
at startup you have to define/load a preset (see Preset manager) in the Dashboard
Select DAQ_Scan in the actions menu
A dataset will be declared the first time you set a scan. A dataset is equivalent to a single saved file containing multiple scans. One can see a dataset as a series of scans related to single subject/sample to be characterized.
Metadata can be saved for each dataset and then for each scan and be later retrieved from the saved file (see Saving datas and H5Browser)
Performs multiple scans exploring all the parameters needed for your experiment
2.5.1.1. Introduction¶
This module has a main control window (see Fig. 2.13). The dashboard gives you full control for manual adjustments of each actuator, checking their impact on live data from the detectors. Once all is set, one can move to an automated scan using the main control window.
2.5.1.2. Main Control Window¶
The main control window is comprised of a left panel to set all parameters while the right panel will display live data taken during a scan.
Fig. 2.13 Main DAQ_Scan user interface.¶
2.5.1.2.1. Scan Flow¶
The top of the settings panel is comprised of buttons to set, start and stop a scan as well as quit the application.
: will shut down all modules and quit the application (redundant with: File/Quit menu)
Set Scan: take into account the selected scanner settings and valid them or not.
Init. Positions: will move all selected actuators to their initial positions as defined by the currently set scan.
: will start the currently set scan (first it will set it then start it)
: stop the currently running scan (in case of a batch of scans, it will skips the current one).
2.5.1.2.3. Settings¶
The settings tree as shown on Fig. 2.13 is actually divided in a few subtrees that contain everything needed to define a given scan, save data and plot live information.
2.5.1.2.3.1. Module Manager¶
The leftmost tree is the user interface of the module manager (see Module Manager for details). It allows the user to select the actuators and detectors for the next scan (see Fig. 2.14). This interface is also used for the DAQ_Logger extension.
Fig. 2.14 List of declared modules from a preset¶
2.5.1.2.3.2. General Settings¶
The General Settings are comprised of (see Fig. 2.15):
Time Flow
Wait time: extra time the application wait before moving on to the next scan step. Enable rough cadencing if needed
timeout: raise a timeout if one of the scan step (moving or detecting) is taking a longer time than timeout to respond
Scan options :
N average: Select how many set scans to perform. Save all individual scans and its average
Plot From: select the detector from which data will be taken in order to plot live data
Fig. 2.15 General settings for the DAQ_Scan module¶
2.5.1.2.3.3. Save Settings¶
The Save Settings (see Fig. 2.16) is the user interface of the H5Saver, it is a general interface to save the scans in hierarchical hdf5 file (it is also used in the DAQ_Logger extension):
Fig. 2.16 Save settings for the DAQ_Scan extension¶
2.5.1.2.4. Scanner¶
Finally all specifics of the upcoming scan are configured using the Scanner module interface as seen on Fig. 2.17 in the case of an adaptive Scan2D scan configuration.
Fig. 2.17 The Scanner user interface set on a Scan2D scan type and an adaptive scan subtype and its particular settings.¶
2.5.1.2.5. Live data¶
For a data acquisition system to be efficient, live data must be plotted in order to follow the experiment behaviour and check if something is wrong or successfull without the need to perform full data analysis. For this PyMoDAQ live data display will show all datas exported by the setting plot from (defining which DAQ_Viewer module exports data). The total dimensionality of the datas + the scan dimensions (1 for scan1D and 2 for Scan2D) should not exceed 2 (this means one cannot plot more complex plots than 2D intensity plots).
Fig. 2.18 An example of a 1D detector having 2 channels. 0D data are generated as well from the integration of channel CH0 within the cyan region of interest (ROI_00).¶
For instance, if the chosen detector is a 1D one, see Fig. 2.18. Such a detector can generate various type of live data. It will export the raw 1D data and integrated 0D data within the declared ROI, then:
if the scan is 1D:
exported 0D datas will be displayed on the 1D Plot tab as a line as a function of the actuator position, see Fig. 2.19.
exported 1D datas will be displayed on the 2D Plot tab as color levels as a function of the actuator position, see Fig. 2.20.
Fig. 2.19 An example of a detector exporting 0D live data plotted as a function of the actuator position¶
Fig. 2.20 An example of a detector exporting 1D live data plotted as a function of the actuator position. Channel CH0 is plotted in red while channel CH1 is plotted in green.¶
if the scan is 2D:
exported 0D datas will be displayed on the 2D Plot tab as a pixel map where each pixel coordinates represents a scan coordinate. The color and intensity of the pixels refer to channels and data values, see Fig. 2.21 for a spiral 2D scan.
Fig. 2.21 An example of a detector exporting 0D live data plotted as a function of the 2 actuators’s position. Integrated region of channel CH0 is plotted in red.¶
So at maximum, 2D dimensionality can be represented. In order to see live data from 2D detectors, one should therefore export lineouts from ROIs or integrate data. All these operations are extremely simple to perform using the ROI features of the data viewers (see Data Viewers)
2.5.1.4. Scan Batch Manager¶
If the Scan Batch Manager is activated, a new menu entry will appear: Batch Configs, that let the user define, modify or load scan batch configurations. When loaded, a particular configuration will be displayed in the batch window. This window (see Fig. 2.23) displays (in a tree) a list of scans to perform. Each scan is defined by a set of actuators/detectors to use and scan settings (Scan1D, Linear… just as described in Settings).

Fig. 2.23 An example of a Scan Batch configuration displaying several scans to perform¶
A new start button will also appear on the main window to start the currently loaded
scan batch.