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

TOFTOFCropWorkspace v1

../_images/TOFTOFCropWorkspace-v1_dlg.png

TOFTOFCropWorkspace dialog.

Summary

Crop empty time channels.

Properties

Name Direction Type Default Description
InputWorkspace Input Workspace Mandatory Input workspace.
OutputWorkspace Output Workspace 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