Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Algorithms::GaussianWeightingnD Class Reference

#include <WeightingStrategy.h>

Inheritance diagram for Mantid::Algorithms::GaussianWeightingnD:
Mantid::Algorithms::WeightingStrategy

Public Member Functions

 GaussianWeightingnD (double cutOff, double sigma)
 Constructor. More...
 
double weightAt (const double &, const double &, const double &, const double &) override
 Calculate the weight for rectangular detectors. More...
 
double weightAt (const Mantid::Kernel::V3D &) override
 Calculate the weight at distance from epicenter. More...
 
- Public Member Functions inherited from Mantid::Algorithms::WeightingStrategy
virtual double weightAt (const double &adjX, const double &ix, const double &adjY, const double &iy)=0
 Calculate the weight at distance from epicenter. More...
 
virtual double weightAt (const Mantid::Kernel::V3D &distance)=0
 Calculate the weight at distance from epicenter. More...
 
 WeightingStrategy ()
 Constructor. More...
 
 WeightingStrategy (const double cutOff)
 Constructor. More...
 
virtual ~WeightingStrategy ()=default
 Destructor. More...
 

Private Member Functions

double calculateGaussian (const double normalisedDistanceSq)
 calculateGaussian method so that same gaussian calculation can be run by different consuming methods. More...
 

Private Attributes

double m_twiceSigmaSquared
 

Additional Inherited Members

- Protected Attributes inherited from Mantid::Algorithms::WeightingStrategy
double m_cutOff
 Cutoff member. More...
 

Detailed Description

Definition at line 96 of file WeightingStrategy.h.

Constructor & Destructor Documentation

◆ GaussianWeightingnD()

Mantid::Algorithms::GaussianWeightingnD::GaussianWeightingnD ( double  cutOff,
double  sigma 
)

Constructor.

Parameters
cutOff: radius cut-off.
sigma: gaussian sigma value.

Definition at line 137 of file WeightingStrategy.cpp.

References m_twiceSigmaSquared, and sigma.

Member Function Documentation

◆ calculateGaussian()

double Mantid::Algorithms::GaussianWeightingnD::calculateGaussian ( const double  normalisedDistanceSq)
inlineprivate

calculateGaussian method so that same gaussian calculation can be run by different consuming methods.

Parameters
normalisedDistanceSq: r^2/cutOff^2
Returns
exp(-(r^2/cutOff^2)/(2*sigma^2))

Definition at line 183 of file WeightingStrategy.cpp.

References m_twiceSigmaSquared.

Referenced by weightAt().

◆ weightAt() [1/2]

double Mantid::Algorithms::GaussianWeightingnD::weightAt ( const double &  adjX,
const double &  ix,
const double &  adjY,
const double &  iy 
)
overridevirtual

Calculate the weight for rectangular detectors.

Parameters
adjX: The number of Y (vertical) adjacent pixels to average together
ix: current index x
adjY: The number of X (vertical) adjacent pixels to average together
iy: current index y
Returns
weight calculated

Implements Mantid::Algorithms::WeightingStrategy.

Definition at line 172 of file WeightingStrategy.cpp.

References calculateGaussian().

◆ weightAt() [2/2]

double Mantid::Algorithms::GaussianWeightingnD::weightAt ( const Mantid::Kernel::V3D distance)
overridevirtual

Calculate the weight at distance from epicenter.

Uses linear scaling based on distance from epicenter.

Parameters
distance: absolute distance from epicenter
Returns
weighting

Implements Mantid::Algorithms::WeightingStrategy.

Definition at line 154 of file WeightingStrategy.cpp.

References calculateGaussian(), Mantid::Algorithms::WeightingStrategy::m_cutOff, and Mantid::Kernel::V3D::norm().

Member Data Documentation

◆ m_twiceSigmaSquared

double Mantid::Algorithms::GaussianWeightingnD::m_twiceSigmaSquared
private

Definition at line 104 of file WeightingStrategy.h.

Referenced by calculateGaussian(), and GaussianWeightingnD().


The documentation for this class was generated from the following files: