BGlib.be.translators.labview_h5_patcher.LabViewH5Patcher

class BGlib.be.translators.labview_h5_patcher.LabViewH5Patcher[source]

Bases: Translator

Patches the hdf5 files from the LabView V3 data aquisition software to meet the standards of the Pycroscopy data format.

Return type:

Translator object

Methods

is_valid_file

Checks whether the provided file can be read by this translator

translate

Add the needed references and attributes to the h5 file that are not created by the LabView data aquisition program.

static is_valid_file(file_path)[source]

Checks whether the provided file can be read by this translator

Parameters:

file_path (str) – Path to raw data file

Returns:

obj – Path to file that will be accepted by the translate() function if this translator is indeed capable of translating the provided file. Otherwise, None will be returned

Return type:

str

translate(h5_path, force_patch=False, **kwargs)[source]

Add the needed references and attributes to the h5 file that are not created by the LabView data aquisition program.

Parameters:
  • h5_path (str) – path to the h5 file

  • force_patch (bool, optional) – Should the check to see if the file has already been patched be ignored. Default False.

Returns:

h5_file – path to the patched dataset

Return type:

str