BGlib.gmode.translators.gmode_line.GLineTranslator

class BGlib.gmode.translators.gmode_line.GLineTranslator(*args, **kwargs)[source]

Bases: Translator

Translated G-mode line (bigtimedata.dat) files from actual BE line experiments to HDF5

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

Checks whether the provided file can be read by this translator

Parameters:

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

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

Parameters:

file_path (String / unicode) – Absolute path of any file in the directory

Returns:

h5_path – Absolute path of the h5 file

Return type:

String / unicode