9#include "MantidCrystal/DllConfig.h"
20namespace PeakStatisticsTools {
40 const std::vector<DataObjects::Peak> &
getPeaks()
const {
return m_peaks; }
41 size_t count()
const {
return m_peaks.size(); }
43 std::vector<double> getWavelengths()
const;
44 std::vector<double> getIntensities()
const;
45 std::vector<double> getSigmas()
const;
47 UniqueReflection removeOutliers(
double sigmaCritical = 3.0,
bool weightedZ =
false)
const;
48 void setPeaksIntensityAndSigma(
double intensity,
double sigma);
77 void addObservations(
const std::vector<DataObjects::Peak> &peaks);
80 size_t getUniqueReflectionCount()
const;
81 size_t getObservedUniqueReflectionCount(
size_t moreThan = 0)
const;
82 std::vector<Kernel::V3D> getUnobservedUniqueReflections()
const;
84 size_t getObservedReflectionCount()
const;
86 const std::map<Kernel::V3D, UniqueReflection> &getReflections()
const;
92 : m_reflections(reflections), m_pointgroup(pointGroup) {}
112 : m_measuredReflections(0), m_uniqueReflections(0), m_completeness(0.0), m_redundancy(0.0), m_rMerge(0.0),
113 m_rPim(0.0), m_meanIOverSigma(0.0), m_dspacingMin(0.0), m_dspacingMax(0.0), m_chiSquared(0.0), m_peaks() {
115 std::string equivalentIntensities =
"Mean";
116 double sigmaCritical = 3.0;
117 bool weightedZ =
false;
118 calculatePeaksStatistics(reflections.
getReflections(), equivalentIntensities, sigmaCritical, weightedZ);
121 double &sigmaCritical,
bool &weightedZ)
122 : m_measuredReflections(0), m_uniqueReflections(0), m_completeness(0.0), m_redundancy(0.0), m_rMerge(0.0),
123 m_rPim(0.0), m_meanIOverSigma(0.0), m_dspacingMin(0.0), m_dspacingMax(0.0), m_chiSquared(0.0), m_peaks() {
125 calculatePeaksStatistics(reflections.
getReflections(), equivalentIntensities, sigmaCritical, weightedZ);
167 void calculatePeaksStatistics(
const std::map<Kernel::V3D, UniqueReflection> &uniqueReflections,
168 std::string &equivalentIntensities,
double &sigmaCritical,
bool &weightedZ);
170 double getIOverSigmaSum(
const std::vector<double> &sigmas,
const std::vector<double> &intensities)
const;
171 double getRMS(
const std::vector<double> &data)
const;
173 std::pair<double, double> getDSpacingLimits(
const std::vector<DataObjects::Peak> &peaks)
const;
Structure describing a single-crystal peak.
Class to implement unit cell of crystals.
std::shared_ptr< ReflectionCondition > ReflectionCondition_sptr
Shared pointer to a ReflectionCondition.
std::shared_ptr< PointGroup > PointGroup_sptr
Shared pointer to a PointGroup.
Helper class which provides the Collimation Length for SANS instruments.