Mantid
|
The PeaksStatistics class is a small helper class that is used in SortHKL. More...
#include <PeakStatisticsTools.h>
Public Member Functions | |
PeaksStatistics (const UniqueReflectionCollection &reflections) | |
PeaksStatistics (const UniqueReflectionCollection &reflections, std::string &equivalentIntensities, double &sigmaCritical, bool &weightedZ) | |
Public Attributes | |
double | m_chiSquared |
double | m_completeness |
Fraction of observed unique reflections in the resolution range defined by d_min and d_max. More... | |
double | m_dspacingMax |
Upper d-spacing limit in the data set. More... | |
double | m_dspacingMin |
Lower d-spacing limit in the data set, sometimes referred to as upper resolution limit. More... | |
double | m_meanIOverSigma |
Average signal to noise ratio in the reflections. More... | |
int | m_measuredReflections |
Total number of observed reflections - no symmetry is taken into account for this. More... | |
std::vector< DataObjects::Peak > | m_peaks |
double | m_redundancy |
Average number of observations for a unique reflection. More... | |
double | m_rMerge |
Merging R-factor, R_merge, sometimes also called R_sym. More... | |
double | m_rPim |
Precision indicating R-factor (R_{p.i.m}). More... | |
int | m_uniqueReflections |
Number of unique reflections. More... | |
Private Member Functions | |
void | calculatePeaksStatistics (const std::map< Kernel::V3D, UniqueReflection > &uniqueReflections, std::string &equivalentIntensities, double &sigmaCritical, bool &weightedZ) |
PeaksStatistics::calculatePeaksStatistics. More... | |
std::pair< double, double > | getDSpacingLimits (const std::vector< DataObjects::Peak > &peaks) const |
Returns the lowest and hights wavelength in the peak list. More... | |
double | getIOverSigmaSum (const std::vector< double > &sigmas, const std::vector< double > &intensities) const |
Returns the sum of all I/sigma-ratios defined by the two vectors using std::inner_product. More... | |
double | getRMS (const std::vector< double > &data) const |
Returns the Root mean square of the supplied vector. More... | |
The PeaksStatistics class is a small helper class that is used in SortHKL.
It takes a UniqueReflectionCollection and calculates a few data set quality indicators such as Rmerge and Rpim.
Do not rely on this class to exist forever, parts of it may change or the entire class may disappear over time.
Definition at line 109 of file PeakStatisticsTools.h.
|
inlineexplicit |
|
inlineexplicit |
|
private |
PeaksStatistics::calculatePeaksStatistics.
This function iterates through the unique reflections map and computes statistics for the reflections/peaks. It calls UniqueReflection::removeOutliers, so outliers are removed before the statistical quantities are calculated.
Furthermore it sets the intensities of each peak to the mean of the group of equivalent reflections.
uniqueReflections | :: Map of unique reflections and peaks. |
equivalentIntensities | :: Mean or median for statistics of equivalent peaks. |
sigmaCritical | :: Number of standard deviations for outliers. |
weightedZ | :: True for weighted Zscore |
Definition at line 206 of file PeakStatisticsTools.cpp.
References getDSpacingLimits(), getIOverSigmaSum(), Mantid::Kernel::getStatistics(), m_chiSquared, m_completeness, m_dspacingMax, m_dspacingMin, m_meanIOverSigma, m_measuredReflections, m_peaks, m_redundancy, m_rMerge, m_rPim, m_uniqueReflections, Mantid::Kernel::StatOptions::Mean, Mantid::Kernel::StatOptions::Median, and Mantid::Kernel::StatOptions::UncorrectedStdDev.
|
private |
Returns the lowest and hights wavelength in the peak list.
Definition at line 307 of file PeakStatisticsTools.cpp.
References rhs.
Referenced by calculatePeaksStatistics().
|
private |
Returns the sum of all I/sigma-ratios defined by the two vectors using std::inner_product.
Definition at line 293 of file PeakStatisticsTools.cpp.
Referenced by calculatePeaksStatistics().
|
private |
Returns the Root mean square of the supplied vector.
Definition at line 300 of file PeakStatisticsTools.cpp.
double Mantid::Crystal::PeakStatisticsTools::PeaksStatistics::m_chiSquared |
Definition at line 163 of file PeakStatisticsTools.h.
Referenced by calculatePeaksStatistics(), and Mantid::Crystal::SortHKL::exec().
double Mantid::Crystal::PeakStatisticsTools::PeaksStatistics::m_completeness |
Fraction of observed unique reflections in the resolution range defined by d_min and d_max.
Definition at line 138 of file PeakStatisticsTools.h.
Referenced by calculatePeaksStatistics(), and Mantid::Crystal::SortHKL::insertStatisticsIntoTable().
double Mantid::Crystal::PeakStatisticsTools::PeaksStatistics::m_dspacingMax |
Upper d-spacing limit in the data set.
Definition at line 161 of file PeakStatisticsTools.h.
Referenced by calculatePeaksStatistics(), and Mantid::Crystal::SortHKL::insertStatisticsIntoTable().
double Mantid::Crystal::PeakStatisticsTools::PeaksStatistics::m_dspacingMin |
Lower d-spacing limit in the data set, sometimes referred to as upper resolution limit.
Definition at line 158 of file PeakStatisticsTools.h.
Referenced by calculatePeaksStatistics(), and Mantid::Crystal::SortHKL::insertStatisticsIntoTable().
double Mantid::Crystal::PeakStatisticsTools::PeaksStatistics::m_meanIOverSigma |
Average signal to noise ratio in the reflections.
Definition at line 154 of file PeakStatisticsTools.h.
Referenced by calculatePeaksStatistics(), and Mantid::Crystal::SortHKL::insertStatisticsIntoTable().
int Mantid::Crystal::PeakStatisticsTools::PeaksStatistics::m_measuredReflections |
Total number of observed reflections - no symmetry is taken into account for this.
Definition at line 130 of file PeakStatisticsTools.h.
Referenced by calculatePeaksStatistics().
std::vector<DataObjects::Peak> Mantid::Crystal::PeakStatisticsTools::PeaksStatistics::m_peaks |
Definition at line 164 of file PeakStatisticsTools.h.
Referenced by calculatePeaksStatistics(), and Mantid::Crystal::SortHKL::exec().
double Mantid::Crystal::PeakStatisticsTools::PeaksStatistics::m_redundancy |
Average number of observations for a unique reflection.
Definition at line 141 of file PeakStatisticsTools.h.
Referenced by calculatePeaksStatistics(), and Mantid::Crystal::SortHKL::insertStatisticsIntoTable().
double Mantid::Crystal::PeakStatisticsTools::PeaksStatistics::m_rMerge |
Merging R-factor, R_merge, sometimes also called R_sym.
This is a basic measure for how well the intensities of symmetry equivalent reflections agree with each other.
Definition at line 146 of file PeakStatisticsTools.h.
Referenced by calculatePeaksStatistics(), and Mantid::Crystal::SortHKL::insertStatisticsIntoTable().
double Mantid::Crystal::PeakStatisticsTools::PeaksStatistics::m_rPim |
Precision indicating R-factor (R_{p.i.m}).
Also a measurement of agreement between equivalent reflections, but without some of the weeknesses of R_merge.
Definition at line 151 of file PeakStatisticsTools.h.
Referenced by calculatePeaksStatistics(), and Mantid::Crystal::SortHKL::insertStatisticsIntoTable().
int Mantid::Crystal::PeakStatisticsTools::PeaksStatistics::m_uniqueReflections |
Number of unique reflections.
This counts each reflection family once, according to the point group.
Definition at line 134 of file PeakStatisticsTools.h.
Referenced by calculatePeaksStatistics(), and Mantid::Crystal::SortHKL::insertStatisticsIntoTable().