\(\renewcommand\AA{\unicode{x212B}}\)
TOFTOFCropWorkspace v1¶
Summary¶
Crop empty time channels.
See Also¶
Properties¶
| Name | Direction | Type | Default | Description | 
|---|---|---|---|---|
| InputWorkspace | Input | Mandatory | Input workspace. | |
| OutputWorkspace | Output | Mandatory | Name of the workspace that will contain the results | 
Description¶
Applies algorithm CropWorkspace v1 to an input workspace or a group of workspaces to crop the empty time channels. Boundaries are calculated as follows:
\(X_{min} = 0\)
\(X_{max} = N_{fc}\times\Delta t\)
where \(N_{fc}\) is the number of full time channels defined in the full_channels sample log and \(\Delta t\) is the channel width defined in the channel_width sample log.
Restrictions on the input workspace¶
- The unit of the X-axis must be Time-of-flight. 
- Workspace must contain channel_width, full_channels and TOF1 sample logs. 
Usage¶
Example
# Load data
ws=Load(Filename='TOFTOFTestdata.nxs')
print("Input workspace")
print("Total number of time channels: {}".format(len(ws.readX(0))))
print ("Number of filled time channels: {}".format(ws.getRun().getLogData('full_channels').value))
wscropped = TOFTOFCropWorkspace(ws)
print("Output workspace")
print("Total number of time channels: {}".format(len(wscropped.readX(0))))
Output:
Input workspace
Total number of time channels: 1025
Number of filled time channels: 1020.0
Output workspace
Total number of time channels: 1020
Categories: AlgorithmIndex | Workflow\MLZ\TOFTOF | Transforms\Splitting
Source¶
Python: TOFTOFCropWorkspace.py