Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | The workspace which is to be converted to wavelength |
WavelengthLow | Input | number | Optional | The low value of the wavelength binning. |
WavelengthHigh | Input | number | Optional | The high value of the wavelength binning. |
WavelengthStep | Input | number | Optional | The step size of the wavelength binning. |
WavelengthStepType | Input | string | Lin | The step type for rebinning. Allowed values: [‘Log’, ‘Lin’] |
RebinMode | Input | string | Rebin | The method which is to be applied to the rebinning. Allowed values: [‘Rebin’, ‘InterpolatingRebin’] |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | The output workspace. |
This algorithm converts the input workspace into a workspace with wavelength units. Subsequently it rebins the wavelength-valued workspace. Either Rebin v1 or InterpolatingRebin v1 is used for rebinning. This algorithm is geared towards SANS workspaces.
Note
To run these usage examples please first download the usage data, and add these to your path. In MantidPlot this is done using Manage User Directories.
Example - Convert sample workspace to wavelength and rebin:
ws = CreateSampleWorkspace(NumBanks=1, BankPixelWidth=1)
converted = SANSConvertToWavelengthAndRebin(InputWorkspace=ws, WavelengthLow=1, WavelengthHigh=4, WavelengthStep=1, WavelengthStepType="Lin", RebinMode="Rebin")
print("There should be 4 values and got {}.".format(len(converted.dataX(0))))
Output:
There should be 4 values and got 4.
Categories: Algorithms | SANS\Wavelength
Python: SANSConvertToWavelengthAndRebin.py (last modified: 2017-12-21)