Saver subpackage

Performing an experiment is one thing, but the data obtained need to be stored in a persistent manner for later processing and analysis. This is what savers are designed for. An experiment can have one or more savers, i.e., store the data in different formats in one go. The base class for saver is eprcontrol.saver.Saver. Every saver should inherit from this class.

There are currently a number of derived classes designed to save data from an experiment to different file formats, for the time being dedicated to time-resolved EPR:

Classes

class eprcontrol.saver.MatSaver

Bases: eprcontrol.saver.Saver

Saver for persisting data and metadata in MATLAB® format

This saver is a pretty generic way of storing the data, simply saving data, parameters, and settings to a MATLAB® mat file.

class eprcontrol.saver.Saver

Bases: handle

Base class for saver persisting data and metadata of experiments

filename

Name of the file the data should be stored to

Any extension will be replaced by the extension specific to the actual file format, using the property extension (see below).

Type

string

extension

File extension specific for the actual file format

Will be set in the respective subclass and shall usually never be modified by the user.

Type

string

save(data, parameters, settings)

Save data to file

If no filename is present, i.e. the filename property of the eprcontrol.saver.Saver object is empty, a default filename will be created using

[datestr(now, 'yyyymmddHHMMSS') '-TREPR']

Otherwise, the correct extension will be added to the filename (corresponding to the format the saver writes), regardless of the actual extension given, and the data saved.

Parameters
  • data (numeric) – numeric data obtained by the experiment

  • parameters (struct) – parameters of the experiment

  • settings (struct) – settings of the setup used for the experiment

Note

The actual saving is done in the protected method :meth:perform_saving, as the :meth:save method is sealed.

class eprcontrol.saver.TezSaver

Bases: eprcontrol.saver.Saver

Saver for persisting data and metadata in trEPR toolbox format

This saver writes datasets in .tez file format, relying on and using the trEPR toolbox.