Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::Crystal::PeakStatisticsTools::UniqueReflection Class Reference

This class is a small helper for SortHKL to hold Peak-objects that belong to the same family of reflections. More...

#include <PeakStatisticsTools.h>

Public Member Functions

void addPeak (const DataObjects::Peak &peak)
 
size_t count () const
 
const Kernel::V3DgetHKL () const
 
std::vector< double > getIntensities () const
 Returns a vector with the intensities of the Peaks stored in this reflection. More...
 
const std::vector< DataObjects::Peak > & getPeaks () const
 
std::vector< double > getSigmas () const
 Returns a vector with the intensity sigmas of the Peaks stored in this reflection. More...
 
std::vector< double > getWavelengths () const
 Returns a vector with the wavelengths of the Peaks stored in this reflection. More...
 
UniqueReflection removeOutliers (double sigmaCritical=3.0, bool weightedZ=false) const
 Removes peaks whose intensity deviates more than sigmaCritical from the intensities' mean. More...
 
void setPeaksIntensityAndSigma (double intensity, double sigma)
 Sets the intensities and sigmas of all stored peaks to the supplied values. More...
 
 UniqueReflection (const Kernel::V3D &hkl)
 

Private Attributes

Kernel::V3D m_hkl
 
std::vector< DataObjects::Peakm_peaks
 

Detailed Description

This class is a small helper for SortHKL to hold Peak-objects that belong to the same family of reflections.

It has methods to return the intensities and sigmas of the contained Peak-objects as vectors. Furthermore there is a function that removes outliers based on the intensities/sigmas.

Definition at line 33 of file PeakStatisticsTools.h.

Constructor & Destructor Documentation

◆ UniqueReflection()

Mantid::Crystal::PeakStatisticsTools::UniqueReflection::UniqueReflection ( const Kernel::V3D hkl)
inline

Definition at line 35 of file PeakStatisticsTools.h.

Member Function Documentation

◆ addPeak()

void Mantid::Crystal::PeakStatisticsTools::UniqueReflection::addPeak ( const DataObjects::Peak peak)
inline

Definition at line 39 of file PeakStatisticsTools.h.

Referenced by removeOutliers().

◆ count()

size_t Mantid::Crystal::PeakStatisticsTools::UniqueReflection::count ( ) const
inline

Definition at line 41 of file PeakStatisticsTools.h.

◆ getHKL()

const Kernel::V3D & Mantid::Crystal::PeakStatisticsTools::UniqueReflection::getHKL ( ) const
inline

Definition at line 37 of file PeakStatisticsTools.h.

◆ getIntensities()

std::vector< double > Mantid::Crystal::PeakStatisticsTools::UniqueReflection::getIntensities ( ) const

Returns a vector with the intensities of the Peaks stored in this reflection.

Definition at line 38 of file PeakStatisticsTools.cpp.

References m_peaks.

Referenced by removeOutliers().

◆ getPeaks()

const std::vector< DataObjects::Peak > & Mantid::Crystal::PeakStatisticsTools::UniqueReflection::getPeaks ( ) const
inline

Definition at line 40 of file PeakStatisticsTools.h.

◆ getSigmas()

std::vector< double > Mantid::Crystal::PeakStatisticsTools::UniqueReflection::getSigmas ( ) const

Returns a vector with the intensity sigmas of the Peaks stored in this reflection.

Definition at line 50 of file PeakStatisticsTools.cpp.

References m_peaks.

Referenced by removeOutliers().

◆ getWavelengths()

std::vector< double > Mantid::Crystal::PeakStatisticsTools::UniqueReflection::getWavelengths ( ) const

Returns a vector with the wavelengths of the Peaks stored in this reflection.

Definition at line 26 of file PeakStatisticsTools.cpp.

References m_peaks.

◆ removeOutliers()

UniqueReflection Mantid::Crystal::PeakStatisticsTools::UniqueReflection::removeOutliers ( double  sigmaCritical = 3.0,
bool  weightedZ = false 
) const

Removes peaks whose intensity deviates more than sigmaCritical from the intensities' mean.

Definition at line 62 of file PeakStatisticsTools.cpp.

References addPeak(), getIntensities(), getSigmas(), Mantid::Kernel::getWeightedZscore(), Mantid::Kernel::getZscore(), m_hkl, and m_peaks.

◆ setPeaksIntensityAndSigma()

void Mantid::Crystal::PeakStatisticsTools::UniqueReflection::setPeaksIntensityAndSigma ( double  intensity,
double  sigma 
)

Sets the intensities and sigmas of all stored peaks to the supplied values.

Definition at line 94 of file PeakStatisticsTools.cpp.

References m_peaks, and sigma.

Member Data Documentation

◆ m_hkl

Kernel::V3D Mantid::Crystal::PeakStatisticsTools::UniqueReflection::m_hkl
private

Definition at line 51 of file PeakStatisticsTools.h.

Referenced by removeOutliers().

◆ m_peaks

std::vector<DataObjects::Peak> Mantid::Crystal::PeakStatisticsTools::UniqueReflection::m_peaks
private

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