IntegrateFlux v1

../_images/IntegrateFlux-v1_dlg.png

IntegrateFlux dialog.

Summary

Interates spectra in a matrix workspace at a set of points.

Properties

Name Direction Type Default Description
InputWorkspace Input MatrixWorkspace Mandatory An input workspace. Must have units of Momentum
NPoints Input number 1000 Number of points per output spectrum.
OutputWorkspace Output Workspace Mandatory An output workspace.

Description

If a spectrum in the input workspace contains function f(x) then the corresponding spectrum in the output workspace has its indefinite integral:

\int_{x_0}^x f(\xi)d\xi.

Usage

Example - IntegrateFlux

# Create an event workspace
ws = CreateSampleWorkspace(WorkspaceType="Event", XUnit="Momentum")
# Integrate all spectra.
wsOut = IntegrateFlux( ws )

# Print the result
print("The input workspace has {} spectra".format(ws.getNumberHistograms()))
print("The output workspace has {} spectra".format(wsOut.getNumberHistograms()))

Output:

The input workspace has 200 spectra
The output workspace has 200 spectra

Categories: AlgorithmIndex | MDAlgorithms\Normalisation

Source

C++ source: IntegrateFlux.cpp (last modified: 2019-06-04)

C++ header: IntegrateFlux.h (last modified: 2018-10-05)