14#include "MantidAlgorithms/DllConfig.h"
58 const std::string
name()
const override {
return "Q1DWeighted"; }
60 const std::string
summary()
const override {
61 return "Performs azimuthal averaging on a 2D SANS data to produce I(Q).";
65 int version()
const override {
return (1); }
66 const std::vector<std::string>
seeAlso()
const override {
return {
"Q1D"}; }
68 const std::string
category()
const override {
return "SANS"; }
73 const std::vector<double> &,
const size_t);
82 Wedge(
double innerRadius,
double outerRadius,
double centerX,
double centerY,
double angleMiddle,
double angleRange)
84 angleMiddle(angleMiddle), angleRange(angleRange) {}
99 double diffAngle = std::fabs(std::fmod(this->angleMiddle - other.angleMiddle, M_PI));
101 double epsilon = 1e-3;
102 bool hasSameRadii = this->innerRadius == other.innerRadius && this->outerRadius == other.outerRadius;
104 bool hasSameCenter = this->centerX == other.centerX && this->centerY == other.centerY;
106 bool hasSameAngleRange = std::fabs(this->angleRange - other.angleRange) < epsilon;
108 bool hasSymmetricalAngle = std::fabs(diffAngle - M_PI) < epsilon || diffAngle < epsilon;
110 return (hasSameRadii && hasSameCenter && hasSameAngleRange && hasSymmetricalAngle);
114 void getTableShapes();
115 void getViewportParams(
const std::string &, std::map<std::string, std::vector<double>> &);
116 void getWedgeParams(
const std::vector<std::string> &,
const std::map<std::string, std::vector<double>> &);
117 bool checkIfSymetricalWedge(Wedge &Wedge);
118 void checkIfSuperposedWedges();
121 std::vector<std::vector<std::vector<double>>>
m_errors;
140 void init()
override;
142 void exec()
override;
Base class from which all concrete algorithm classes should be derived.
Part of data reduction for SANS.
std::vector< Wedge > m_wedgesParameters
std::vector< std::vector< std::vector< double > > > m_intensities
int version() const override
Algorithm's version.
std::vector< std::vector< std::vector< double > > > m_errors
const std::string category() const override
Algorithm's category for identification.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
const std::string name() const override
Algorithm's name.
std::vector< double > m_qBinEdges
std::vector< std::vector< std::vector< double > > > m_normalisation
const std::string summary() const override
Summary of algorithms purpose.
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.
bool isSymmetric(const Wedge &other)
isSymmetric determines if the two wedges have a center symmetry with one another.
Wedge(double innerRadius, double outerRadius, double centerX, double centerY, double angleMiddle, double angleRange)