BGlib.be.translators.beps_ndf.BEPSndfTranslator

class BGlib.be.translators.beps_ndf.BEPSndfTranslator(*args, **kwargs)[source]

Bases: Translator

Translates Band Excitation Polarization Switching (BEPS) datasets from .dat 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

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(data_filepath, show_plots=True, save_plots=True, do_histogram=False, verbose=False)[source]

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

Parameters:
  • data_filepath (String / unicode) – Absolute path of the data file (.dat)

  • show_plots (Boolean (Optional. Default is True)) – Whether or not to show plots

  • save_plots (Boolean (Optional. Default is True)) – Whether or not to save the generated plots

  • do_histogram (Boolean (Optional. Default is False)) – Whether or not to generate and save 2D histograms of the raw data

  • verbose (Boolean (Optional. default is false)) – Whether or not to print log statements

Returns:

h5_path – Absolute path of the generated .h5 file

Return type:

String / unicode