Mantid
Loading...
Searching...
No Matches
RingProfile.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2013 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 "MantidAPI/ISpectrum.h"
11#include "MantidAlgorithms/DllConfig.h"
13#include <vector>
14
15namespace Mantid {
16namespace Algorithms {
17
23class MANTID_ALGORITHMS_DLL RingProfile final : public API::Algorithm {
24public:
26
27 const std::string name() const override { return "RingProfile"; };
29 const std::string summary() const override { return "Calculates the sum of the counts against a circular ring."; }
30
31 int version() const override { return 1; };
32 const std::vector<std::string> seeAlso() const override { return {"LineProfile"}; }
33 const std::string category() const override { return "Transforms\\Grouping"; };
34
35protected:
36 std::shared_ptr<API::Progress> m_progress;
37
38private:
39 void init() override;
40 void exec() override;
42 int fromAngleToBin(double angle, bool degree = true);
44 void checkInputsForSpectraWorkspace(const API::MatrixWorkspace_sptr &);
46 void checkInputsForNumericWorkspace(const API::MatrixWorkspace_sptr &);
48 void processInstrumentRingProfile(const API::MatrixWorkspace_sptr &inputWS, std::vector<double> &output_bins);
50 void processNumericImageRingProfile(const API::MatrixWorkspace_sptr &inputWS, std::vector<double> &output_bins);
52 void getBinForPixel(const API::MatrixWorkspace_sptr &, int, std::vector<int> &);
54 int getBinForPixel(const Kernel::V3D &position);
56 double min_radius;
58 double max_radius;
66 double centre_x;
68 double centre_y;
70 double centre_z;
72 double bin_size;
73};
74
75} // namespace Algorithms
76} // namespace Mantid
double position
Definition: GetAllEi.cpp:154
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Calculates the sum of the counts against a circular ring.
Definition: RingProfile.h:23
double centre_x
copy of centre for axis(0)
Definition: RingProfile.h:66
bool clockwise
flag that indicate if Sense input was configure to clockwise
Definition: RingProfile.h:62
double centre_y
copy of centre for axis(1)
Definition: RingProfile.h:68
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
Definition: RingProfile.h:32
double min_radius
copy of the minRadius input
Definition: RingProfile.h:56
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
Definition: RingProfile.h:27
double bin_size
The size of the bins in angle that is equal to 360 / NumBins.
Definition: RingProfile.h:72
double max_radius
copy of the maxRadius input
Definition: RingProfile.h:58
const std::string category() const override
function to return a category of the algorithm.
Definition: RingProfile.h:33
int version() const override
function to return a version of the algorithm, must be overridden in all algorithms
Definition: RingProfile.h:31
const std::string summary() const override
Summary of algorithms purpose.
Definition: RingProfile.h:29
double start_angle
copy of the StartAngle input
Definition: RingProfile.h:60
std::shared_ptr< API::Progress > m_progress
Definition: RingProfile.h:36
double centre_z
copy of centre for axis(2)
Definition: RingProfile.h:70
int num_bins
copy of NumBins input
Definition: RingProfile.h:64
Class for 3D vectors.
Definition: V3D.h:34
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.