BGlib.be.translators.be_odf_relaxation.BEodfRelaxationTranslator

class BGlib.be.translators.be_odf_relaxation.BEodfRelaxationTranslator(max_mem_mb=1024)[source]

Bases: Translator

Translates old Relaxation data into the new H5 format. This is for the files generated from the old BEPSDAQ program utilizing two cards simultaneously. At present, this version of the translator only works for Out of field measurements It will not work for in-field. This should be fixed at a later date.

Return type:

Translator object

Methods

is_valid_file

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

translate

Basic method that translates .dat data file(s) to a single .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(file_path, show_plots=True, save_plots=True, do_histogram=False)[source]

Basic method that translates .dat data file(s) to a single .h5 file

Inputs:

file_path – Absolute file path for one of the data files. It is assumed that this file is of the OLD data format.

Outputs:

Nothing