10#include "MantidAlgorithms/DllConfig.h"
42 const std::string
name()
const override {
return "SumSpectra"; }
44 const std::string
summary()
const override {
45 return "The SumSpectra algorithm adds the data values in each time bin "
46 "across a range of spectra; the output workspace has a single "
47 "spectrum. If the input is an EventWorkspace, the output is also an "
48 "EventWorkspace; otherwise it will be a Workspace2D.";
52 int version()
const override {
return (1); }
53 const std::vector<std::string>
seeAlso()
const override {
return {
"SumNeighbours"}; }
55 const std::string
category()
const override {
return "Transforms\\Grouping"; }
57 std::map<std::string, std::string> validateInputs()
override;
62 size_t &numMasked,
size_t &numZeros);
65 size_t &numMasked,
size_t &numZeros);
71 size_t &numMasked,
size_t &numZeros);
75 void determineIndices(
const size_t numberOfSpectra);
80 bool m_keepMonitors{
false};
82 bool m_replaceSpecialValues{
false};
84 size_t m_numberOfSpectra{0};
92 bool m_calculateWeightedSum{
false};
93 bool m_multiplyByNumSpec{
true};
Base class for algorithms that can run in parallel on all MPI ranks but not in a distributed fashion.
Helper class for reporting progress from algorithms.
Takes a workspace as input and sums all of the spectra within it maintaining the existing bin structu...
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
const std::string summary() const override
Summary of algorithms purpose.
int version() const override
Algorithm's version for identification overriding a virtual method.
std::set< size_t > m_indices
Set of indices to sum.
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.
int32_t specnum_t
Typedef for a spectrum Number.