5.3.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

5.3.1.1. Introduction

This module has a main control window (see Fig. 5.9). 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.

5.3.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.

daq_scan_main

Fig. 5.9 Main DAQ_Scan user interface.

5.3.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.

  • quit: 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.
  • start: will start the currently set scan (first it will set it then start it)
  • stop: stop the currently running scan (in case of a batch of scans, it will skips the current one).

5.3.1.2.3. Settings

The settings tree as shown on Fig. 5.9 is actually divided in a few subtrees that contain everything needed to define a given scan, save data and plot live information.

5.3.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. 5.10). This interface is also used for the DAQ_Logger extension.

list_modules

Fig. 5.10 List of declared modules from a preset

5.3.1.2.3.2. General Settings

The General Settings are comprised of (see Fig. 5.11):

  • 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
list_modules

Fig. 5.11 General settings for the DAQ_Scan module

5.3.1.2.3.3. Save Settings

The Save Settings (see Fig. 5.12) 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):

list_modules

Fig. 5.12 Save settings for the DAQ_Scan extension

5.3.1.2.4. Scanner

Finally all specifics of the upcoming scan are configured using the Scanner module interface as seen on Fig. 5.13 in the case of an adaptive Scan2D scan configuration.

scanner_fig

Fig. 5.13 The Scanner user interface set on a Scan2D scan type and an adaptive scan subtype and its particular settings.

5.3.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).

1Ddetector

Fig. 5.14 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. 5.14. 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. 5.15.
    • exported 1D datas will be displayed on the 2D Plot tab as color levels as a function of the actuator position, see Fig. 5.16.
scan1D_0D

Fig. 5.15 An example of a detector exporting 0D live data plotted as a function of the actuator position

scan1D_1D

Fig. 5.16 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. 5.17 for a spiral 2D scan.
scan2D_0D

Fig. 5.17 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)

5.3.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. 5.19) 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).

scanbatch

Fig. 5.19 An example of a Scan Batch configuration displaying several scans to perform

A new start button startbatch will also appear on the main window to start the currently loaded scan batch.