file_header

Documentation for methods in the file_header script that are for data translation.

slap2_utils.utils.file_header.load_file_header_v2(obj, rawUint32)

A function that does several sanity checks to the integrity and validity of the file. It also translates the raw data that are inputted as raw uint32 array.

Return type:

Translated header and number of cycles (num_cycles)

slap2_utils.utils.file_header.translate_field_value_pairs(field_value_pairs)

A function that maps field IDs to names. The input is field value pairs, which are to be translated into a dictionary format. :param field_value_pairs: :type field_value_pairs: numpy array :param pairs of field names and values from the file header:

Return type:

Dictionary that contains the field value pairs

slap2_utils.utils.file_header.translate_channel_mask(header)

A function that translates the channel mask from the header as the input. It then has various checks that validate the number of channels specified. :param header: :type header: memap :param Header of SLAP2 binary file read as Uint32:

Return type:

It returns the header itself if it indeed passed all checks.

slap2_utils.utils.file_header.translate_reference_timestamp(header)

A function that function combines the lower and upper parts of the reference timestamp if it does exist. :param header: :type header: memap :param Header of SLAP2 binary file read as Uint32:

Return type:

It returns the header that has the combined reference timestamp in it.