HDF5 I/O#

The datalab.gui.h5io module provides the HDF5 file open/save into/from DataLab data model/main window.

class datalab.gui.h5io.H5InputOutput(mainwindow: DLMainWindow)[source]#

Object handling HDF5 file open/save into/from DataLab data model/main window

Parameters:

mainwindow – Main window

save_file(filename: str) None[source]#

Save all signals and images from DataLab model into a HDF5 file

open_file_headless(filename: str, reset_all: bool) bool[source]#

Open native DataLab HDF5 file without any GUI elements.

This method can be safely called from any thread (e.g., the console thread) as it does not create any Qt widgets or dialogs.

Parameters:
  • filename – HDF5 filename

  • reset_all – Reset all application data before importing

Returns:

True if file was successfully opened as a native DataLab file, False if the file format is not compatible (KeyError was raised)

open_file(filename: str, import_all: bool, reset_all: bool) None[source]#

Open HDF5 file

import_files(filenames: list[str], import_all: bool, reset_all: bool) None[source]#

Import HDF5 files

import_dataset_from_file(filename: str, dsetname: str) None[source]#

Import dataset from HDF5 file