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

ElasticWindow v1

Summary

This algorithm performs an integration over an energy range, with the option to subtract a background over a second range, then transposes the result into a single-spectrum workspace with units in Q and Q^2.

See Also

Integration

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

The input workspace.

OutputInQ

Output

MatrixWorkspace

Mandatory

The name for output workspace with the X axis in units of Q

OutputInQSquared

Output

MatrixWorkspace

Mandatory

The name for output workspace with the X axis in units of Q^2.

IntegrationRangeStart

Input

number

Mandatory

Start Point of Range 1

IntegrationRangeEnd

Input

number

Mandatory

End Point of Range 1

BackgroundRangeStart

Input

number

Optional

Start Point of Range 2

BackgroundRangeEnd

Input

number

Optional

End Point of Range 2.

Description

This algorithm Integrates over the range specified, converts the spectrum axis into units of Q and Q^{2} and transposes the result workspaces.

There are two output workspaces.

Workflow

../_images/ElasticWindow-v1_wkflw.svg

Usage

# Prepare a workspace that has all necessary settings to work with ElasticWindow
ws = CreateSampleWorkspace(Function='User Defined',
                           UserDefinedFunction='name=Lorentzian,Amplitude=100,PeakCentre=27500,FWHM=20',
                           XMin=27000,
                           XMax=28000,
                           BinWidth=10,
                           NumBanks=1)

ws = ConvertUnits(ws, 'DeltaE',
                  EMode='Indirect',
                  EFixed=1.555)

ws = Rebin(ws, [-0.2,0.004,0.2])

SetInstrumentParameter(ws, 'Efixed',
                       DetectorList=range(100,200),
                       ParameterType='Number',
                       Value='1.555')

# Run the algorithm
q, q2 = ElasticWindow(ws, -0.1, 0.1)

print(q.getAxis(0).getUnit().caption())
print(q2.getAxis(0).getUnit().caption())
q
Q2

Categories: AlgorithmIndex | Inelastic\Indirect

Source

C++ header: ElasticWindow.h

C++ source: ElasticWindow.cpp