This algorithm sums the Y values of histograms given by *InputWorkspaceIndexSet* into a single single histogram. The summation is done using the method proposed by Cubitt et al. [#CUBITT]_ This involves a projection to an
arbitrary reference angle, :math:`2\theta_R`, with a "virtual" wavelength,
:math:`\lambda_v`. This is the wavelength the neutron would have had if it had
arrived at :math:`2\theta_R` with the same momentum transfer (:math:`Q`).
Counts are considered to be spread evenly over the input pixel, and the
top-left and bottom-right corner of the pixel are projected onto
:math:`2\theta_R` giving a range in :math:`\lambda_v` to project onto. Counts
are shared out proportionally into the output bins that overlap this range, and
the projected counts from all pixels are summed into the appropriate output
bins.
The input workspace should have wavelength as the X units as well as an instrument.
To produce a reflectivity, the input workspace has to be the reflected beam workspace where each histogram is individually divided by the summed (in lambda) direct beam data.
Usage
-----
**Example - basic usage with reflectometry-like data**
.. plot::
:include-source:
import numpy as np
from mantid.simpleapi import *
import matplotlib.pyplot as plt
# Direct beam
noBackground = 'name=LinearBackground, A0=0'
direct = CreateSampleWorkspace(
Function='User Defined',
UserDefinedFunction=noBackground,
NumBanks=1,
XUnit='Wavelength',
XMin=0., XMax=20., BinWidth=1.)
# Move the detector such that the beam is right at its center.
MoveInstrumentComponent(
Workspace=direct,
ComponentName='bank1',
X=-0.008 * 4.5, Y= -0.008 * 4.5, Z=0.)
# Fill intensity for pixels in the beam
for i in [44, 45, 54, 55]:
direct.dataY(i).fill(1.)
direct.dataE(i).fill(0.1)
# Group detectors to form a 'line detector'. The line is vertical in this case.