MantidSQw
Readers for dynamic data
- class MDMC.readers.observables.MantidSQw.MantidSQw(file_name)[source]
A class for reading SQw files from Mantid
- Mantid’s ascii output uses two files:
A file containing the SQw data and error for the range of energy values measured at each detector (or group of detectors) ID with
file_name
A file giving the momentum value associated with each detector (or group of detectors) ID, with the name given by
file_name + '_detectors'
- file_variables
File containing the variables for each detector (group) ID
- Type
file
- file_detectors
File containing the errors on the dependent variables
- Type
file
- parse(**settings)[source]
Parse into SQw format
E is the energy transfer (in meV) Q is wavevector transfer (in Ang^-1)
- parse_detectors(file)[source]
Parses the detector momenta values.
- Parameters
file (file) – Open file containing detector IDs and momenta
- Returns
A 1D array of momenta values
- Return type
- parse_variables(file)[source]
Parses the values for energy, SQw and its error for each detector, but not the momentum of that detector.
- Parameters
file (file) – Open file containing the variables
- Returns
(X, Y, E) where X is the independent variable (energy), Y is the dependent variable (SQw) and E is the errors of Y
- Return type