Mantid
Loading...
Searching...
No Matches
GenerateFlatCellWorkspaceLOQ.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2026 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
11#include "MantidAlgorithms/DllConfig.h"
12
13#include <span>
14
15namespace Mantid {
16
17namespace Algorithms {
19class MANTID_ALGORITHMS_DLL GenerateFlatCellWorkspaceLOQ : public API::Algorithm {
20public:
22 const std::string name() const override { return "GenerateFlatCellWorkspaceLOQ"; }
24 const std::string summary() const override {
25 return "Generates the FlatCell workspace for ISIS SANS reduction of LOQ.";
26 }
27
29 int version() const override { return (1); }
30
32 const std::string category() const override { return "SANS"; }
33 std::map<std::string, std::string> validateInputs() override;
34
35private:
37 double normStdLAB{0.0};
38 double normStdHAB{0.0};
39 };
40
42 void init() override;
44 void exec() override;
45 void execEvent();
46 double mean(std::span<const double> values) const;
47 double stddev(std::span<double> values) const;
48 void scale(std::span<double> values, double factor) const;
49 void createAndSaveMaskWorkspace(const API::MatrixWorkspace_sptr &ws, double normStdLAB, double normStdHAB);
50 API::MatrixWorkspace_sptr integrateInput(const API::Workspace_sptr &ws);
51 std::vector<double> extractIntegratedValues(const API::MatrixWorkspace_sptr &ws) const;
52 FlatCellStats normalizeBanks(std::span<double> values) const;
53};
54
55} // namespace Algorithms
56} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Generates the FlatCell workspace for ISIS SANS reduction of LOQ.
const std::string category() const override
Algorithm's category for identification.
const std::string summary() const override
Summary of algorithms purpose.
const std::string name() const override
Algorithm's name.
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.