Mantid
Loading...
Searching...
No Matches
Stitch.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2021 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
10#include "MantidAlgorithms/DllConfig.h"
11
12namespace Mantid {
13namespace Algorithms {
14
17class MANTID_ALGORITHMS_DLL Stitch final : public API::Algorithm {
18public:
19 const std::string name() const override;
20 int version() const override;
21 const std::string category() const override;
22 const std::string summary() const override;
23 std::map<std::string, std::string> validateInputs() override;
24
25private:
26 void init() override;
27 void exec() override;
28 void scale(const API::MatrixWorkspace_sptr &wsToMatch, const API::MatrixWorkspace_sptr &wsToScale,
29 API::MatrixWorkspace_sptr scaleFactorsWorkspace, const std::vector<std::string> &inputs);
30 API::MatrixWorkspace_sptr merge(const std::vector<std::string> &workspaces);
31 void scaleManual(const std::vector<std::string> &inputs, const std::vector<double> &scaleFactors,
32 const API::MatrixWorkspace_sptr &scaleFactorsWorkspace);
33 void scaleWithMedianRatios(const std::vector<std::string> &clones, const std::string &referenceName,
34 API::MatrixWorkspace_sptr &scaleFactorsWorkspace);
35 void recordScaleFactor(const API::MatrixWorkspace_sptr &scaleFactorWorkspace,
36 const API::MatrixWorkspace_sptr &medianWorkspace,
37 const API::MatrixWorkspace_sptr &scaledWorkspace, const std::vector<std::string> &inputs);
38 void cloneWorkspaces(const std::vector<std::string> &inputs);
39 size_t getReferenceIndex(const std::vector<API::MatrixWorkspace_sptr> &workspaces, const std::string &referenceName);
40};
41
42} // namespace Algorithms
43} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Stitches overlapping spectra from multiple 2D workspaces.
Definition: Stitch.h:17
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.