BGlib.misc.translators.tr_kpfm.TRKPFMTranslator

class BGlib.misc.translators.tr_kpfm.TRKPFMTranslator(*args, **kwargs)[source]

Bases: Translator

Translates trKPFM datasets from .mat and .dat files to .h5

Return type:

Translator object

Methods

is_valid_file

Checks whether the provided file can be read by this translator :param data_path: Path to folder or any data / parameter file within the folder :type data_path: str

read_file

translate

The main function that translates the provided file into a .h5 file :param parm_path: Absolute file path of the parameters .mat file.

static is_valid_file(data_path)[source]

Checks whether the provided file can be read by this translator :param data_path: Path to folder or any data / parameter file within the folder :type data_path: str

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(parm_path)[source]

The main function that translates the provided file into a .h5 file :param parm_path: Absolute file path of the parameters .mat file. :type parm_path: string / unicode

Returns:

h5_path – Absolute path of the translated h5 file

Return type:

string / unicode