\(\renewcommand\AA{\unicode{x212B}}\)
SumRowColumn v1¶
Summary¶
SANS-specific algorithm which gives a single spectrum containing the total counts in either each row or each column of pixels in a square LOQ or SANS2D detector bank.
See Also¶
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
InputWorkspace |
Input |
Mandatory |
The input workspace, which must contain all the spectra from the bank of interest - no more and no less (so 128x128 or 192x192). |
|
OutputWorkspace |
Output |
Mandatory |
The name of the workspace in which to store the result. |
|
Orientation |
Input |
string |
Mandatory |
Whether to sum rows (D_H) or columns (D_V). Allowed values: [‘D_H’, ‘D_V’] |
XMin |
Input |
number |
Optional |
The starting X value for each spectrum to include in the summation. |
XMax |
Input |
number |
Optional |
The ending X value for each spectrum to include in the summation. |
HOverVMin |
Input |
number |
Optional |
The first row to include in the summation when summing by columns, or vice versa. |
HOverVMax |
Input |
number |
Optional |
The last row to include in the summation when summing by columns, or vice versa. |
Description¶
This algorithm is the equivalent of the COLETTE “DISPLAY H/V” command. It firsts integrates the input workspace, which must contain all the spectra from the detector of interest - no more and no less (so 128x128 or 192x192), between the X values given. Then each row or column is summed between the H/V_Min/Max values, if given, and the result is a single spectrum of row or column number against total counts.
ChildAlgorithms used¶
The Integration v1 algorithm is used to sum up each spectrum between XMin & XMax.
Usage¶
Example - Sum rows of a 128*128 workspace
# Create a workspace with 128*128 spectra each with 5 values (only 128*128 or 192*192 are valid)
ws = CreateSampleWorkspace("Histogram", NumBanks=1, BankPixelWidth=128, BinWidth=10, Xmax=50)
# Run algorithm with Horizontal orientation
OutputWorkspace = SumRowColumn( ws, "D_H")
print("Input workspace has {} points.".format(ws.getNPoints()))
print("Output workspace has {} points.".format(OutputWorkspace.getNPoints()))
Output:
Input workspace has 81920 points.
Output workspace has 128 points.
Categories: AlgorithmIndex | SANS | Transforms\Grouping
Source¶
C++ header: SumRowColumn.h
C++ source: SumRowColumn.cpp