BGlib.be.translators.forc_iv.ForcIVTranslator

class BGlib.be.translators.forc_iv.ForcIVTranslator(*args, **kwargs)[source]

Bases: Translator

Translates FORC 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(raw_data_path)[source]

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

Parameters:

raw_data_path (string / unicode) – Absolute file path of the data .mat file.

Returns:

h5_path – Absolute path of the translated h5 file

Return type:

string / unicode