\(\renewcommand\AA{\unicode{x212B}}\)
LoadEventAsWorkspace2D v1¶
Summary¶
Load event data, integrating the events during loading. Also set the X-axis based on log data.
See Also¶
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
Filename |
Input |
string |
Mandatory |
The name of the Event NeXus file to read, including its full or relative path. Allowed extensions: [‘.nxs.h5’, ‘.nxs’, ‘_event.nxs’] |
FilterByTofMin |
Input |
number |
Optional |
To exclude events that do not fall within a range of times-of-flight. This is the minimum accepted value in microseconds. Keep blank to load all events. |
FilterByTofMax |
Input |
number |
Optional |
To exclude events that do not fall within a range of times-of-flight. This is the maximum accepted value in microseconds. Keep blank to load all events. |
FilterByTimeStart |
Input |
number |
Optional |
Optional: To only include events after the provided start time, in seconds (relative to the start of the run). If left empty, it will take start time as default. |
FilterByTimeStop |
Input |
number |
Optional |
Optional: To only include events before the provided stop time, in seconds (relative to the start of the run). if left empty, it will take run end time or last pulse time as default. |
LogAllowList |
Input |
str list |
If specified, only these logs will be loaded from the file (each separated by a space). |
|
LogBlockList |
Input |
str list |
If specified, these logs will NOT be loaded from the file (each separated by a space). |
|
XCenterLog |
Input |
string |
wavelength |
Name of log to take to use as the X-bin center |
XWidthLog |
Input |
string |
wavelength_spread |
Name of log to take to use as the X-bin width |
XCenter |
Input |
number |
Optional |
Value to set X-bin center to which overrides XCenterLog |
XWidth |
Input |
number |
Optional |
Value to set X-bin width to which overrides XWidthLog |
Units |
Input |
string |
Wavelength |
The name of the units to convert to (must be one of those registered in the Unit Factory). Allowed values: [‘DeltaE’, ‘DeltaE_inFrequency’, ‘DeltaE_inWavenumber’, ‘dSpacing’, ‘dSpacingPerpendicular’, ‘Energy’, ‘Energy_inWavenumber’, ‘Momentum’, ‘MomentumTransfer’, ‘QSquared’, ‘SpinEchoLength’, ‘SpinEchoTime’, ‘TOF’, ‘Wavelength’] |
OutputWorkspace |
Output |
Mandatory |
An output workspace. |
|
LoadNexusInstrumentXML |
Input |
boolean |
True |
If true, load the instrument definition file (IDF) from the input NeXus file. If false, Mantid will load the most appropriate IDF from the instrument repository. |
Description¶
This algorithm loads event data, integrating the events during loading. It will also set the X-axis based on log data. This will be mostly used by contant wavelength instruments that collect event data but are not performing event filtering. It will be faster than running LoadEventNexus then doing Integration.
An example usage is instead of running LoadEventNexus then HFIRSANS2Wavelength, you can just use LoadEventAsWorkspace2D
.
The X-axis is set based on the either the provided parameters XCenter
and XWidth
of the mean of the log values defined by XCenterLog
and XWidthLog
. The X-axis bin will be centered on XCenter
with a width of XCenter*XWidth
.
Usage¶
Example - LoadEventAsWorkspace2D compared to LoadEventNexus+HFIRSANS2Wavelength
ws = LoadEventAsWorkspace2D("CG3_16931")
ws2 = LoadEventNexus("CG3_16931")
ws2 = HFIRSANS2Wavelength(ws2)
CompareWorkspaces(Workspace1=ws, Workspace2=ws2)
Categories: AlgorithmIndex | DataHandling\Nexus
Source¶
C++ header: LoadEventAsWorkspace2D.h
C++ source: LoadEventAsWorkspace2D.cpp