BGlib.gmode.translators.gmode_iv.GIVTranslator

class BGlib.gmode.translators.gmode_iv.GIVTranslator(*args, **kwargs)[source]

Bases: Translator

Translates G-mode Fast IV datasets from .mat files to .h5

Return type:

Translator object

Methods

is_valid_file

Checks whether the provided file can be read by this translator.

translate

The main function that translates the provided file into a .h5 file

static is_valid_file(file_path, *args, **kwargs)

Checks whether the provided file can be read by this translator.

This basic function compares the file extension against the “extension” keyword argument. If the extension matches, this function returns True

Parameters:

file_path (str) – Path to raw data file

Returns:

file_path – Path to the file that needs to be provided to translate() if the provided file was indeed a valid file Else, None

Return type:

str

translate(parm_path)[source]

The main function that translates the provided file into a .h5 file

Parameters:

parm_path (string / unicode) – Absolute file path of the parameters .mat file.

Returns:

h5_path – Absolute path of the translated h5 file

Return type:

string / unicode