trspectrometer.ufsfile module

Support for reading and writing Ultrafast Systems .ufs files.

class trspectrometer.ufsfile.UFSData(ufsdata=None, ufsfile=None)[source]

Bases: object

read_data(ufsdata)[source]

Read the byte stream given by ufsdata and store decoded data.

Parameters:

ufsdata – Bytes-like object from which to decode UFS data.

read_file(filename)[source]

Read a .ufs file.

Parameters:

filename – Filename to read.

write_data(destination)[source]

Write the raw UFS data out to a stream.

Parameters:

destination – Stream to write UFS data to.

write_file(filename)[source]

Write the raw UFS data out to a file.

Parameters:

filename – Filename to write UFS data to.

axis1_data

Values for the data points on the first axis.

axis1_label

Label string for the first axis.

axis1_units

Unit string for the first axis.

axis2_data

Values for the data points on the second axis.

axis2_label

Label string for the second axis.

axis2_units

Unit string for the second axis.

data_matrix

Data matrix as a 2D array.

data_units

Unit string for the matrix data points.

metadata

String containing metadata information.

version

Version string for the UFS file format.