\(\renewcommand\AA{\unicode{x212B}}\)

LoadSPE v1

../_images/LoadSPE-v1_dlg.png

LoadSPE dialog.

Summary

Loads a file written in the spe format.

See Also

SaveSPE

Properties

Name

Direction

Type

Default

Description

Filename

Input

string

Mandatory

The name of the SPE file to load. Allowed extensions: [‘.spe’]

OutputWorkspace

Output

MatrixWorkspace

Mandatory

The name to use for the output workspace

Description

Loads the file given into a Workspace2D with the given name. The file should be in the SPE format, which is described here. The workspace will have X units of Energy transfer. The other axis will be binned and have units of either Momentum transfer / Q or degrees, depending on the label in the input file. The workspace will be flagged as a distribution.

File Format

The expected file format is detailed on the SaveSPE v1 page.

Usage

Example - Load an SPE file:

#run the loader by pointing it at the appropriate file.
#If it's in your managed user directories there's no need for an absolute path
ws1 = LoadSPE("Example.spe")

print("Number of Spectra: {}".format(ws1.getNumberHistograms()))
print("Number of Bins: {}".format(ws1.blocksize()))

Output:

Number of Spectra: 32
Number of Bins: 195

Categories: AlgorithmIndex | DataHandling\SPE | Inelastic\DataHandling

Source

C++ header: LoadSPE.h

C++ source: LoadSPE.cpp