Integration

From MantidProject

Jump to: navigation, search

Contents

Summary

Integration takes a 2D workspace as input and sums the data values. Optionally, the range summed can be restricted in either dimension.

Properties

Order Name Direction Type Default Description
1 InputWorkspace Input Workspace Mandatory The name of the input workspace.
2 OutputWorkspace Output Workspace Mandatory The name with which to store the output workspace in the Analysis Data Service
3 RangeLower Input double 0 The X (frame) value to integrate from
4 RangeUpper Input double workspace max The X (frame) value to integrate to
5 StartWorkspaceIndex Input integer 0 Only integrate spectra with indices greater than or equal to this, and less than EndWorkspaceIndex
6 EndWorkspaceIndex Input integer workspace max The highest workspace index of the spectra that will be integrated

Description

Integration (known as SimpleIntegration in the source code) sums up spectra in a Workspace and outputs a Workspace that contains only 1 value per spectrum (i.e. the sum). The associated errors are added in quadrature. The two X values per spectrum are set to the limits of the range over which the spectrum has been integrated. By default, the entire range is integrated and all spectra are included.

Optional properties

If only a portion of the workspace should be integrated then the optional parameters may be used to restrict the range. StartWorkspaceIndex & EndWorkspaceIndex may be used to select a contiguous range of spectra in the workspace (note that these parameters refer to the workspace index value rather than spectrum numbers as taken from the raw file). If only a certain range of each spectrum should be summed (which must be the same for all spectra being integrated) then the Range_lower and Range_upper properties should be used. No rebinning takes place as part of this algorithm: if the values given do not coincide with a bin boundary then the first bin boundary within the range is used. If a value is given that is beyond the limit covered by the spectrum then it will be integrated up to its limit. The data that falls outside any values set will not contribute to the output workspace.

Source Code

Header SimpleIntegration.h

Source SimpleIntegration.cpp

Personal tools
Create a book