Saving datas

Datas saved using PyMoDAQ, either the DAQ_Scan or the DAQ_Viewer modules, use a binary format known as hdf5. This format was originally developped to save big volume of datas from large instruments. Its structure is hierarchical (a bit as folder trees) and one can add metadata to all entries in the tree. For instance, the data type, shape but also some more complex info such as all the settings related to a module or a plugin. This gives a unique file containing both datas and metadata.

From DAQ_Viewer

Single Datas

Datas saved directly from a DAQ_Viewer (for instance the one on Fig. 12) will be recorded in a h5file whose structure will be represented like Fig. 23 using PyMoDAQ’s h5 browser (see H5Browser). The various type of data exported by the viewer are saved in a dedicated entry (Data0D, …) and all channels are recorded within as subentries. Metadata from the detector settings, the measurement module and the activated ROIs are also recorded.

single_data

Fig. 23 h5 file content containing saved data from a DAQ_Viewer detector (see Fig. 12)

Continuous Saving

When the continuous saving parameter is set, new parameters are appearing on the DAQ_Viewer panel (see Fig. 24).

  • Base path: indicates where the data will be saved. If it doesn’t exist the module will try to create it

  • Base name: indicates the base name from which the save file will derive

  • Current Path: readonly, complete path of the saved file

  • Do Save: Initialize the file and logging can start. A new file is created if clicked again.

  • Compression options: data can be compressed before saving, using one of the proposed library and the given value of compression [0-9], see pytables documentation.

continuous

Fig. 24 Continuous Saving options

The saved file will follow this general structure:

D:\Data\2018\20181220\Data_20181220_16_58_48.h5

With a base path (D:\Data in this case) followed by a subfolder year, a subfolder day and a filename formed from a base name followed by the date of the day and the time at which you started to log data. Fig. 25 displays the tree structure of such a file, with

continuous

Fig. 25 Continuous Saving options

From DAQ_Scan

Exploring datas

h5file saved using PyMoDAQ can be explored using the H5Browser utility module. Both datas and metadatas can be explored.