You're reading the documentation for a development version. For the latest released version, please have a look at v0.5.

cwepr.io.magnettech module

Importer for the Magnettech XML format.

Magnettech spectrometers can write data to either XML or CSV files. Currently, only the XML file format is supported. Generally each individual scan gets saved into its own file, but the averaged data stored in an additional file with _result suffixed to its base name.

Two-dimensional datasets, be it from modifying microwave power (power sweep), modulation amplitude, or goniometer angle, are stored as well in individual files per second parameter. Additionally, if you perform multiple averages per parameter value (microwave power, modulation amplitude, goniometer angle, …) you will end up with directories for each of these and again additionally a file with the averaged data.

A slight complication with the way Magnettech spectrometers obtain their data is the rather high magnetic field sampling frequency (typically 10^4 points) and the non-equidistant field axis. The latter is unique for each individual measurement in terms of the number of points, grid, and start and end value. Despite the field range set in the software, the spectrometer typically records the spectra slightly broader.

For two-dimensional datasets, all this means that the data for the individual traces have to be interpolated to a common axis before a two-dimensional matrix can be constructed. As the microwave frequency is recorded for each individual trace, a frequency correction can be applied beforehand.

Currently, one-dimensional datasets, angular-dependent measurements (goniometer sweeps) as well as amplitude sweeps can be imported. Implementing importers for other types of two-dimensional datasets is planned for the future.

class cwepr.io.magnettech.MagnettechXMLImporter(source='')

Bases: aspecd.io.DatasetImporter

Import cw-EPR raw data from the Magnettech benchtop spectrometer.

Magnettech provides an XML-file with the results. Specialities of this format are existing and will be briefly explained: The data is encoded in hex numbers, and the y axis consists of 10 times more points than the y axis. Therefore, an interpolation is needed to expand the axis to the necessary amount of points.

root

path of the root directory

Type

str

full_filename

Filename with file extension

Type

str

load_infofile

Skips import of infofile if set to False.

Type

bool

xml_metadata

Metadata from xml file, eventually imported to metadata.

Type

dict

class cwepr.io.magnettech.GoniometerSweepImporter(source='')

Bases: aspecd.io.DatasetImporter

Import-angular dependent data from Magnettech benchtop spectrometer.

Note

Metadata are only taken from the infofile, ignoring the (much likely more accurate) xml-file metadata.

load_infofile

Skips import of infofile if set to False.

Type

bool

class cwepr.io.magnettech.AmplitudeSweepImporter(source='')

Bases: aspecd.io.DatasetImporter

Import modulation amplitude sweep data from a Magnettech Spectrometer.

The provided XML raw files are read and brought to an unified axis;

Note

Different to the GoniometerSweepImporter, metadata is only taken from the XML source file, ignoring the additional information from the infofile.

filenames

Filenames of raw XML-files for an amplitude sweep. Is normally created automatically from the parameters['source'] directory.

Type

list

Examples

The amplitude sweep is read in simply with:

datasets:
 - source: amplitude-sweep-data
   id: amplitude-sweep

New in version 0.4.

class cwepr.io.magnettech.PowerSweepImporter(source='')

Bases: aspecd.io.DatasetImporter

Import power sweep data from a Magnettech Spectrometer.

The provided XML raw files are read and brought to an unified axis;

Note

Different to the GoniometerSweepImporter, metadata is only taken from the XML source file, ignoring the additional information from the infofile.

filenames

Filenames of raw XML-files for an amplitude sweep. Is normally created automatically from the parameters['source'] directory.

Type

list

Examples

The power sweep is read in simply with:

datasets:
 - source: power-sweep-data
   id: power-sweep

New in version 0.4.