Mantid
|
This is a low-level class to construct a map with lists of events near each peak Q-vector, shifted to be centered at (0,0,0). More...
#include <Integrate3DEvents.h>
Public Member Functions | |
void | addEvents (std::vector< std::pair< std::pair< double, double >, Mantid::Kernel::V3D > > const &event_qs, bool hkl_integ) |
Add event Q's to lists of events near peaks. More... | |
std::shared_ptr< const Mantid::Geometry::PeakShape > | ellipseIntegrateEvents (const std::vector< Kernel::V3D > &E1Vec, Mantid::Kernel::V3D const &peak_q, bool specify_size, double peak_radius, double back_inner_radius, double back_outer_radius, std::vector< double > &axes_radii, double &inti, double &sigi) |
Find the net integrated intensity of a peak, using ellipsoidal volumes. More... | |
std::shared_ptr< const Mantid::Geometry::PeakShape > | ellipseIntegrateModEvents (const std::vector< Kernel::V3D > &E1Vec, Mantid::Kernel::V3D const &peak_q, Mantid::Kernel::V3D const &hkl, Mantid::Kernel::V3D const &mnp, bool specify_size, double peak_radius, double back_inner_radius, double back_outer_radius, std::vector< double > &axes_radii, double &inti, double &sigi) |
Find the net integrated intensity of a modulated peak, using ellipsoidal volumes. More... | |
double | estimateSignalToNoiseRatio (const IntegrationParameters ¶ms, const Mantid::Kernel::V3D ¢er, bool forceSpherical=false, double sphericityTol=0.02) |
Integrate3DEvents (const std::vector< std::pair< std::pair< double, double >, Mantid::Kernel::V3D > > &peak_q_list, Kernel::DblMatrix UBinv, double radius, const bool useOnePercentBackgroundCorrection=true) | |
Construct object to store events around peaks and integrate peaks. More... | |
Integrate3DEvents (const std::vector< std::pair< std::pair< double, double >, Mantid::Kernel::V3D > > &peak_q_list, std::vector< Mantid::Kernel::V3D > const &hkl_list, std::vector< Mantid::Kernel::V3D > const &mnp_list, Kernel::DblMatrix UBinv, Kernel::DblMatrix ModHKL, double radius_m, double radius_s, int MaxO, const bool CrossT, const bool useOnePercentBackgroundCorrection=true) | |
With modulation vectors, construct an object to store events that correspond to a peak and are within the specified radius of the specified peak centers, and to integrate the peaks. More... | |
std::pair< std::shared_ptr< const Mantid::Geometry::PeakShape >, std::tuple< double, double, double > > | integrateStrongPeak (const IntegrationParameters ¶ms, const Kernel::V3D &peak_q, double &inti, double &sigi) |
Find the net integrated intensity of a peak, using ellipsoidal volumes. More... | |
std::shared_ptr< const Geometry::PeakShape > | integrateWeakPeak (const IntegrationParameters ¶ms, Mantid::DataObjects::PeakShapeEllipsoid_const_sptr shape, const std::tuple< double, double, double > &libPeak, const Mantid::Kernel::V3D &peak_q, double &inti, double &sigi) |
Private Member Functions | |
void | addEvent (std::pair< std::pair< double, double >, Mantid::Kernel::V3D > event_Q, bool hkl_integ) |
Add an event to the vector of events for the closest h,k,l. More... | |
void | addModEvent (std::pair< std::pair< double, double >, Mantid::Kernel::V3D > event_Q, bool hkl_integ) |
Add an event to the appropriate vector of events for the closest h,k,l, if it is within the required radius of the corresponding peak in the PeakQMap. More... | |
std::tuple< double, double, double > | calculateRadiusFactors (const IntegrationParameters ¶ms, double max_sigma) const |
Calculate the radius to use for each axis of the ellipsoid from the parameters provided. More... | |
bool | correctForDetectorEdges (std::tuple< double, double, double > &radii, const std::vector< Mantid::Kernel::V3D > &E1Vecs, const Mantid::Kernel::V3D &peak_q, const std::vector< double > &axesRadii, const std::vector< double > &bkgInnerRadii, const std::vector< double > &bkgOuterRadii) |
double | detectorQ (const std::vector< Kernel::V3D > &E1Vec, const Mantid::Kernel::V3D &QLabFrame, const std::vector< double > &r) |
Compute if a particular Q falls on the edge of a detector. More... | |
std::shared_ptr< const Mantid::DataObjects::PeakShapeEllipsoid > | ellipseIntegrateEvents (const std::vector< Kernel::V3D > &E1Vec, Kernel::V3D const &peak_q, std::vector< std::pair< std::pair< double, double >, Mantid::Kernel::V3D > > const &ev_list, std::vector< Mantid::Kernel::V3D > const &directions, std::vector< double > const &sigmas, bool specify_size, double peak_radius, double back_inner_radius, double back_outer_radius, std::vector< double > &axes_radii, double &inti, double &sigi) |
Find the net integrated intensity of a list of Q's using ellipsoids. More... | |
const std::vector< std::pair< std::pair< double, double >, Mantid::Kernel::V3D > > * | getEvents (const Mantid::Kernel::V3D &peak_q) |
Get a list of events for a given Q. More... | |
int64_t | getHklKey (Mantid::Kernel::V3D const &q_vector) |
Form a map key for the specified q_vector. More... | |
int64_t | getHklKey2 (Mantid::Kernel::V3D const &hkl) |
Form a map key for the specified q_vector. More... | |
int64_t | getHklMnpKey (Mantid::Kernel::V3D const &q_vector) |
Form a map key for the specified q_vector of satellite peaks. More... | |
int64_t | getHklMnpKey2 (Mantid::Kernel::V3D const &hkl) |
Form a map key for the specified q_vector. More... | |
Static Private Member Functions | |
static void | getEigenVectors (Kernel::DblMatrix const &cov_matrix, std::vector< Mantid::Kernel::V3D > &eigen_vectors, std::vector< double > &eigen_values) |
Calculate the eigen vectors of a 3x3 real symmetric matrix. More... | |
static int64_t | getHklKey (int h, int k, int l) |
Form a map key as 10^12*h + 10^6*k + l from the integers h, k, l. More... | |
static int64_t | getHklMnpKey (int h, int k, int l, int m, int n, int p) |
Form a map key as 10^12*h + 10^6*k + l from the integers h,k,l. More... | |
static void | makeCovarianceMatrix (std::vector< std::pair< std::pair< double, double >, Mantid::Kernel::V3D > > const &events, Kernel::DblMatrix &matrix, double radius) |
Calculate the 3x3 covariance matrix of a list of Q-vectors at 0,0,0. More... | |
static std::pair< double, double > | numInEllipsoid (std::vector< std::pair< std::pair< double, double >, Mantid::Kernel::V3D > > const &events, std::vector< Mantid::Kernel::V3D > const &directions, std::vector< double > const &sizes) |
Calculate the number of events in an ellipsoid centered at 0,0,0. More... | |
static std::pair< double, double > | numInEllipsoidBkg (std::vector< std::pair< std::pair< double, double >, Mantid::Kernel::V3D > > const &events, std::vector< Mantid::Kernel::V3D > const &directions, std::vector< double > const &sizes, std::vector< double > const &sizesIn, const bool useOnePercentBackgroundCorrection) |
Calculate the number of events in an ellipsoid centered at 0,0,0. More... | |
Private Attributes | |
const bool | crossterm |
EventListMap | m_event_lists |
Kernel::DblMatrix | m_ModHKL |
PeakQMap | m_peak_qs |
double | m_radius |
Kernel::DblMatrix | m_UBinv |
const bool | m_useOnePercentBackgroundCorrection |
int | maxOrder |
double | s_radius |
This is a low-level class to construct a map with lists of events near each peak Q-vector, shifted to be centered at (0,0,0).
A method is also provided to find the principal axes of such a list of events, and to find the net integrated counts, using ellipsoids with axis lengths determined from the standard deviations in the directions of the principal axes.
Definition at line 58 of file Integrate3DEvents.h.
Mantid::MDAlgorithms::Integrate3DEvents::Integrate3DEvents | ( | const std::vector< std::pair< std::pair< double, double >, Mantid::Kernel::V3D > > & | peak_q_list, |
Kernel::DblMatrix | UBinv, | ||
double | radius, | ||
const bool | useOnePercentBackgroundCorrection = true |
||
) |
Construct object to store events around peaks and integrate peaks.
Construct an object to store events that correspond to a peak and are within the specified radius of the specified peak centers, and to integrate the peaks.
peak_q_list | List of Q-vectors for peak centers. |
UBinv | The matrix that maps Q-vectors to h,k,l |
radius | The maximum distance from a peak's Q-vector, for an event to be stored in the list associated with that peak. |
useOnePercentBackgroundCorrection | flag if one percent background correction should be used. |
Definition at line 48 of file Integrate3DEvents.cpp.
References getHklKey(), and m_peak_qs.
Mantid::MDAlgorithms::Integrate3DEvents::Integrate3DEvents | ( | const std::vector< std::pair< std::pair< double, double >, Mantid::Kernel::V3D > > & | peak_q_list, |
std::vector< Mantid::Kernel::V3D > const & | hkl_list, | ||
std::vector< Mantid::Kernel::V3D > const & | mnp_list, | ||
Kernel::DblMatrix | UBinv, | ||
Kernel::DblMatrix | ModHKL, | ||
double | radius_m, | ||
double | radius_s, | ||
int | MaxO, | ||
const bool | CrossT, | ||
const bool | useOnePercentBackgroundCorrection = true |
||
) |
With modulation vectors, construct an object to store events that correspond to a peak and are within the specified radius of the specified peak centers, and to integrate the peaks.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
peak_q_list | List of Q-vectors for peak centers. |
hkl_list | The list of h,k,l |
mnp_list | The list of satellite m,n,p |
UBinv | The matrix that maps Q-vectors to h,k,l |
ModHKL | The Modulation vectors |
radius_m | The maximum distance from a peak's Q-vector, for an event to be stored in the list associated with that peak. |
radius_s | The maximum distance from a peak's Q-vector, for an event to be stored in the list associated with that satellite peak. |
MaxO | The maximum order of satellite peaks. |
CrossT | Switch for cross terms of satellites. |
useOnePercentBackgroundCorrection | flag if one percent background correction should be used. |
Definition at line 82 of file Integrate3DEvents.cpp.
References getHklMnpKey(), and m_peak_qs.
|
private |
Add an event to the vector of events for the closest h,k,l.
Add an event to the appropriate vector of events for the closest h,k,l, if it is within the required radius of the corresponding peak in the PeakQMap.
NOTE: The event passed in may be modified by this method. In particular, if it corresponds to one of the specified peak_qs, the corresponding peak q will be subtracted from the event and the event will be added to that peak's vector in the event_lists map.
event_Q | The Q-vector for the event that may be added to the event_lists map, if it is close enough to some peak |
hkl_integ |
Definition at line 947 of file Integrate3DEvents.cpp.
References getHklKey(), getHklKey2(), m_event_lists, m_peak_qs, m_radius, and m_UBinv.
Referenced by addEvents().
void Mantid::MDAlgorithms::Integrate3DEvents::addEvents | ( | std::vector< std::pair< std::pair< double, double >, Mantid::Kernel::V3D > > const & | event_qs, |
bool | hkl_integ | ||
) |
Add event Q's to lists of events near peaks.
Add the specified event Q's to lists of events near peaks.
An event is added to at most one list. First the nearest h,k,l for that event Q vector is calculated. If a peak with that h,k,l was specified when this object was constructed and if the distance from the specified event Q to that peak is less than the radius that was specified at construction time, then the event Q vector is added to the list of event Q vectors for that peak. NOTE: The Q-vectors passed in to this method will be shifted by the center Q for it's associated peak, so that the list of Q-vectors for a peak are centered around 0,0,0 and represent offsets in Q from the peak center.
event_qs | List of event Q vectors to add to lists of Q's associated with peaks. |
hkl_integ |
Definition at line 116 of file Integrate3DEvents.cpp.
References addEvent(), addModEvent(), and maxOrder.
Referenced by Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::qListFromEventWS(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::qListFromEventWS(), Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::qListFromHistoWS(), and Mantid::MDAlgorithms::IntegrateEllipsoidsV1::qListFromHistoWS().
|
private |
Add an event to the appropriate vector of events for the closest h,k,l, if it is within the required radius of the corresponding peak in the PeakQMap.
NOTE: The event passed in may be modified by this method. In particular, if it corresponds to one of the specified peak_qs, the corresponding peak q will be subtracted from the event and the event will be added to that peak's vector in the event_lists map.
event_Q | The Q-vector for the event that may be added to the event_lists map, if it is close enough to some peak |
hkl_integ |
Definition at line 985 of file Integrate3DEvents.cpp.
References getHklMnpKey(), getHklMnpKey2(), m_event_lists, m_peak_qs, m_radius, m_UBinv, and s_radius.
Referenced by addEvents().
|
private |
Calculate the radius to use for each axis of the ellipsoid from the parameters provided.
params | :: the integration parameters |
max_sigma | :: the largest sigma of all axes |
Definition at line 1167 of file Integrate3DEvents.cpp.
References Mantid::MDAlgorithms::IntegrationParameters::backgroundInnerRadius, Mantid::MDAlgorithms::IntegrationParameters::backgroundOuterRadius, Mantid::MDAlgorithms::IntegrationParameters::peakRadius, Mantid::MDAlgorithms::IntegrationParameters::regionRadius, and Mantid::MDAlgorithms::IntegrationParameters::specifySize.
Referenced by estimateSignalToNoiseRatio(), integrateStrongPeak(), and integrateWeakPeak().
|
private |
Definition at line 345 of file Integrate3DEvents.cpp.
References detectorQ().
Referenced by integrateStrongPeak(), and integrateWeakPeak().
|
private |
Compute if a particular Q falls on the edge of a detector.
Calculate if this Q is on a detector The distance from C to OE is given by dv=C-E*(C.scalar_prod(E)) If dv.norm<integration_radius, one of the detector trajectories on the edge is too close to the peak This method is applied to all masked pixels.
If there are masked pixels trajectories inside an integration volume, the peak must be rejected.
E1Vec | Vector of values for calculating edge of detectors |
QLabFrame | The Peak center. |
r | Peak radius. |
Definition at line 1148 of file Integrate3DEvents.cpp.
References Mantid::API::E1(), Mantid::Kernel::V3D::norm(), and Mantid::Kernel::V3D::scalar_prod().
Referenced by correctForDetectorEdges(), and ellipseIntegrateEvents().
|
private |
Find the net integrated intensity of a list of Q's using ellipsoids.
Integrate a list of events, centered about (0,0,0) given the principal axes for the events and the standard deviations in the the directions of the principal axes.
E1Vec | Vector of values for calculating edge of detectors |
peak_q | The Q-vector for the peak center. |
ev_list | List of events centered at (0,0,0) for a particular peak. |
directions | The three principal axes of the list of events |
sigmas | The standard deviations of the events in the directions of the three principal axes. |
specify_size | If true the integration will be done using the ellipsoids with major axes determined by the peak, back_inner and back_outer radii parameters. If false, the integration will be done using a peak region with major axis chosen so that it covers +- three standard deviations of the data in each direction. In this case, the background ellipsoidal shell is chosen to have the same VOLUME as the peak ellipsoid, and to use the peak ellipsoid for the inner radius. |
peak_radius | Size of half the major axis of the ellipsoidal peak region. |
back_inner_radius | Size of half the major axis of the INNER ellipsoidal boundary of the background region |
back_outer_radius | Size of half the major axis of the OUTER ellipsoidal boundary of the background region |
axes_radii | The radii used for integration in the directions of the three principal axes. |
inti | Returns the net integrated intensity |
sigi | Returns an estimate of the standard deviation of the net integrated intensity |
Definition at line 1051 of file Integrate3DEvents.cpp.
References detectorQ(), m_radius, m_useOnePercentBackgroundCorrection, numInEllipsoid(), numInEllipsoidBkg(), and Mantid::Kernel::QLab.
Mantid::Geometry::PeakShape_const_sptr Mantid::MDAlgorithms::Integrate3DEvents::ellipseIntegrateEvents | ( | const std::vector< Kernel::V3D > & | E1Vec, |
Mantid::Kernel::V3D const & | peak_q, | ||
bool | specify_size, | ||
double | peak_radius, | ||
double | back_inner_radius, | ||
double | back_outer_radius, | ||
std::vector< double > & | axes_radii, | ||
double & | inti, | ||
double & | sigi | ||
) |
Find the net integrated intensity of a peak, using ellipsoidal volumes.
Integrate the events around the specified peak Q-vector.
The principal axes of the events near this Q-vector and the standard deviations in the directions of these principal axes determine ellipsoidal regions for integrating the peak and estimating the background. Alternatively, if peak and background radii are specified, then those will be used for half the major axis length of the ellipsoids, and the other axes of the ellipsoids will be set proportionally, based on the standard deviations.
E1Vec | Vector of values for calculating edge of detectors |
peak_q | The Q-vector for the peak center. |
specify_size | If true the integration will be done using the ellipsoids with major axes determined by the peak, back_inner and back_outer radii parameters. If false, the integration will be done using a peak region with major axis chosen so that it covers +- three standard deviations of the data in each direction. In this case, the background ellipsoidal shell is chosen to have the same VOLUME as the peak ellipsoid, and to use the peak ellipsoid for the inner radius. |
peak_radius | Size of half the major axis of the ellipsoidal peak region. |
back_inner_radius | Size of half the major axis of the INNER ellipsoidal boundary of the background region |
back_outer_radius | Size of half the major axis of the OUTER ellipsoidal boundary of the background region |
axes_radii | The radii used for integration in the directions of the three principal axes. |
inti | Returns the net integrated intensity |
sigi | Returns an estimate of the standard deviation of the net integrated intensity |
Definition at line 413 of file Integrate3DEvents.cpp.
References ellipseIntegrateEvents(), getEigenVectors(), getHklKey(), m_event_lists, m_radius, makeCovarianceMatrix(), and sigma.
Referenced by ellipseIntegrateEvents(), and ellipseIntegrateModEvents().
Mantid::Geometry::PeakShape_const_sptr Mantid::MDAlgorithms::Integrate3DEvents::ellipseIntegrateModEvents | ( | const std::vector< Kernel::V3D > & | E1Vec, |
Mantid::Kernel::V3D const & | peak_q, | ||
Mantid::Kernel::V3D const & | hkl, | ||
Mantid::Kernel::V3D const & | mnp, | ||
bool | specify_size, | ||
double | peak_radius, | ||
double | back_inner_radius, | ||
double | back_outer_radius, | ||
std::vector< double > & | axes_radii, | ||
double & | inti, | ||
double & | sigi | ||
) |
Find the net integrated intensity of a modulated peak, using ellipsoidal volumes.
Definition at line 462 of file Integrate3DEvents.cpp.
References ellipseIntegrateEvents(), getEigenVectors(), getHklMnpKey(), m_event_lists, m_radius, makeCovarianceMatrix(), s_radius, and sigma.
Referenced by Mantid::MDAlgorithms::IntegrateEllipsoidsV1::exec().
double Mantid::MDAlgorithms::Integrate3DEvents::estimateSignalToNoiseRatio | ( | const IntegrationParameters & | params, |
const Mantid::Kernel::V3D & | center, | ||
bool | forceSpherical = false , |
||
double | sphericityTol = 0.02 |
||
) |
Definition at line 264 of file Integrate3DEvents.cpp.
References calculateRadiusFactors(), getEigenVectors(), getEvents(), m_useOnePercentBackgroundCorrection, makeCovarianceMatrix(), numInEllipsoid(), numInEllipsoidBkg(), and Mantid::MDAlgorithms::IntegrationParameters::regionRadius.
Referenced by Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::exec().
|
staticprivate |
Calculate the eigen vectors of a 3x3 real symmetric matrix.
Calculate the eigen vectors of a 3x3 real symmetric matrix using the GSL.
cov_matrix | 3x3 real symmetric matrix. |
eigen_vectors | The eigen vectors for the matrix are returned in this list. |
eigen_values | 3 eigenvalues of matrix |
Definition at line 654 of file Integrate3DEvents.cpp.
Referenced by ellipseIntegrateEvents(), ellipseIntegrateModEvents(), estimateSignalToNoiseRatio(), and integrateStrongPeak().
|
private |
Get a list of events for a given Q.
Definition at line 326 of file Integrate3DEvents.cpp.
References getHklKey(), getHklMnpKey(), m_event_lists, and maxOrder.
Referenced by estimateSignalToNoiseRatio(), integrateStrongPeak(), and integrateWeakPeak().
|
staticprivate |
Form a map key as 10^12*h + 10^6*k + l from the integers h, k, l.
Form a map key as 10^12*h + 10^6*k + l from the integers h,k,l.
h | The first Miller index |
k | The second Miller index |
l | The third Miller index |
Definition at line 692 of file Integrate3DEvents.cpp.
Referenced by addEvent(), ellipseIntegrateEvents(), getEvents(), getHklKey(), getHklKey2(), and Integrate3DEvents().
|
private |
Form a map key for the specified q_vector.
The q_vector is mapped to h,k,l by UBinv and the map key is then formed from those rounded h,k,l values.
q_vector | The q_vector to be mapped to h,k,l |
Definition at line 830 of file Integrate3DEvents.cpp.
References getHklKey(), and m_UBinv.
|
private |
Form a map key for the specified q_vector.
The q_vector is mapped to h,k,l by UBinv and the map key is then formed from those rounded h,k,l values.
hkl | The q_vector to be mapped to h,k,l |
Definition at line 726 of file Integrate3DEvents.cpp.
References getHklKey().
Referenced by addEvent().
|
staticprivate |
Form a map key as 10^12*h + 10^6*k + l from the integers h,k,l.
h | The first Miller index |
k | The second Miller index |
l | The third Miller index |
m | The first modulation index |
n | The second modulation index |
p | The third modulation index |
Definition at line 711 of file Integrate3DEvents.cpp.
References Mantid::Geometry::m, and n.
Referenced by addModEvent(), ellipseIntegrateModEvents(), getEvents(), getHklMnpKey(), getHklMnpKey2(), and Integrate3DEvents().
|
private |
Form a map key for the specified q_vector of satellite peaks.
The q_vector is mapped to h,k,l by UBinv and the map key is then formed from those rounded h+-0.5,k+-0.5,l+-0.5 or h,k,l depending on the offset of satellite peak from main peak.
q_vector | The q_vector to be mapped to h,k,l |
Definition at line 846 of file Integrate3DEvents.cpp.
References crossterm, getHklMnpKey(), Mantid::Geometry::m, m_ModHKL, m_radius, m_UBinv, maxOrder, n, s_radius, and Mantid::Geometry::IndexingUtils::ValidIndex().
|
private |
Form a map key for the specified q_vector.
The q_vector is mapped to h,k,l by UBinv and the map key is then formed from those rounded h,k,l values.
hkl | The q_vector to be mapped to h,k,l |
Definition at line 739 of file Integrate3DEvents.cpp.
References crossterm, getHklMnpKey(), Mantid::Geometry::m, m_ModHKL, m_radius, maxOrder, n, s_radius, and Mantid::Geometry::IndexingUtils::ValidIndex().
Referenced by addModEvent().
std::pair< std::shared_ptr< const Geometry::PeakShape >, std::tuple< double, double, double > > Mantid::MDAlgorithms::Integrate3DEvents::integrateStrongPeak | ( | const IntegrationParameters & | params, |
const Kernel::V3D & | peak_q, | ||
double & | inti, | ||
double & | sigi | ||
) |
Find the net integrated intensity of a peak, using ellipsoidal volumes.
Definition at line 127 of file Integrate3DEvents.cpp.
References calculateRadiusFactors(), correctForDetectorEdges(), Mantid::MDAlgorithms::IntegrationParameters::E1Vectors, getEigenVectors(), getEvents(), m_useOnePercentBackgroundCorrection, makeCovarianceMatrix(), numInEllipsoid(), numInEllipsoidBkg(), Mantid::Kernel::QLab, Mantid::MDAlgorithms::IntegrationParameters::regionRadius, and sigma.
Referenced by Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::exec().
std::shared_ptr< const Geometry::PeakShape > Mantid::MDAlgorithms::Integrate3DEvents::integrateWeakPeak | ( | const IntegrationParameters & | params, |
Mantid::DataObjects::PeakShapeEllipsoid_const_sptr | shape, | ||
const std::tuple< double, double, double > & | libPeak, | ||
const Mantid::Kernel::V3D & | peak_q, | ||
double & | inti, | ||
double & | sigi | ||
) |
Definition at line 205 of file Integrate3DEvents.cpp.
References calculateRadiusFactors(), correctForDetectorEdges(), Mantid::MDAlgorithms::IntegrationParameters::E1Vectors, getEvents(), m_useOnePercentBackgroundCorrection, numInEllipsoid(), numInEllipsoidBkg(), and Mantid::Kernel::QLab.
Referenced by Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::exec().
|
staticprivate |
Calculate the 3x3 covariance matrix of a list of Q-vectors at 0,0,0.
Given a list of events, associated with a particular peak and already SHIFTED to be centered at (0,0,0), calculate the 3x3 covariance matrix for finding the principal axes of that local event data.
Only events within the specified radius of (0,0,0) will be used.
The covariance matrix can be easily constructed. X, Y, Z of each peak position are the variables we wish to determine the covariance. The mean position in each dimension has already been calculated on subtracted, since this corresponds to the centre position of each peak, which we knew aprori. The expected values of each correlation test X,X X,Y X,Z e.t.c form the elements of this 3 by 3 matrix, but since the probabilities are equal, we can remove them from the sums of the expected values, and simply divide by the number of events for each matrix element. Note that the diagonal elements form the variance X,X, Y,Y, Z,Z
events | Vector of V3D objects containing the Q vectors for a peak, with mean at (0,0,0). |
matrix | A 3x3 matrix that will be filled out with the covariance matrix for the list of events. |
radius | Only events within this radius of the peak center (0,0,0) will be used for calculating the covariance matrix. |
Definition at line 625 of file Integrate3DEvents.cpp.
References radius.
Referenced by ellipseIntegrateEvents(), ellipseIntegrateModEvents(), estimateSignalToNoiseRatio(), and integrateStrongPeak().
|
staticprivate |
Calculate the number of events in an ellipsoid centered at 0,0,0.
Calculate the number of events in an ellipsoid centered at 0,0,0 with the three specified axes and the three specified sizes in the direction of those axes.
NOTE: The three axes must be mutually orthogonal unit vectors.
events | List of 3D events centered at 0,0,0 |
directions | List of 3 orthonormal directions for the axes of the ellipsoid. |
sizes | List of three values a,b,c giving half the length of the three axes of the ellisoid. |
Definition at line 528 of file Integrate3DEvents.cpp.
References count.
Referenced by ellipseIntegrateEvents(), estimateSignalToNoiseRatio(), integrateStrongPeak(), and integrateWeakPeak().
|
staticprivate |
Calculate the number of events in an ellipsoid centered at 0,0,0.
Calculate the number of events in an ellipsoid centered at 0,0,0 with the three specified axes and the three specified sizes in the direction of those axes.
NOTE: The three axes must be mutually orthogonal unit vectors.
events | List of 3D events centered at 0,0,0 |
directions | List of 3 orthonormal directions for the axes of the ellipsoid. |
sizes | List of three values a,b,c giving half the length of the three axes of the ellisoid. |
sizesIn | List of three values a,b,c giving half the length of the three inner axes of the ellisoid. |
useOnePercentBackgroundCorrection | flag if one percent background correction should be used. |
Definition at line 564 of file Integrate3DEvents.cpp.
References count.
Referenced by ellipseIntegrateEvents(), estimateSignalToNoiseRatio(), integrateStrongPeak(), and integrateWeakPeak().
|
private |
Definition at line 168 of file Integrate3DEvents.h.
Referenced by getHklMnpKey(), and getHklMnpKey2().
|
private |
Definition at line 162 of file Integrate3DEvents.h.
Referenced by addEvent(), addModEvent(), ellipseIntegrateEvents(), ellipseIntegrateModEvents(), and getEvents().
|
private |
Definition at line 164 of file Integrate3DEvents.h.
Referenced by getHklMnpKey(), and getHklMnpKey2().
|
private |
Definition at line 161 of file Integrate3DEvents.h.
Referenced by addEvent(), addModEvent(), and Integrate3DEvents().
|
private |
Definition at line 165 of file Integrate3DEvents.h.
Referenced by addEvent(), addModEvent(), ellipseIntegrateEvents(), ellipseIntegrateModEvents(), getHklMnpKey(), and getHklMnpKey2().
|
private |
Definition at line 163 of file Integrate3DEvents.h.
Referenced by addEvent(), addModEvent(), getHklKey(), and getHklMnpKey().
|
private |
Definition at line 169 of file Integrate3DEvents.h.
Referenced by ellipseIntegrateEvents(), estimateSignalToNoiseRatio(), integrateStrongPeak(), and integrateWeakPeak().
|
private |
Definition at line 167 of file Integrate3DEvents.h.
Referenced by addEvents(), getEvents(), getHklMnpKey(), and getHklMnpKey2().
|
private |
Definition at line 166 of file Integrate3DEvents.h.
Referenced by addModEvent(), ellipseIntegrateModEvents(), getHklMnpKey(), and getHklMnpKey2().