Mantid
|
WorkspaceNearestNeighbourInfo provides easy access to nearest-neighbour information for a workspace. More...
#include <WorkspaceNearestNeighbourInfo.h>
Public Member Functions | |
std::map< specnum_t, Kernel::V3D > | getNeighbours (const Geometry::IDetector *comp, const double radius=0.0) const |
Queries the WorkspaceNearestNeighbours object for the selected detector. More... | |
std::map< specnum_t, Kernel::V3D > | getNeighbours (specnum_t spec, const double radius) const |
Queries the WorkspaceNearestNeighbours object for the selected spectrum number. More... | |
std::map< specnum_t, Kernel::V3D > | getNeighboursExact (specnum_t spec) const |
Queries the WorkspaceNearestNeighbours object for the selected spectrum number. More... | |
WorkspaceNearestNeighbourInfo (const MatrixWorkspace &workspace, const bool ignoreMaskedDetectors, const int nNeighbours=8) | |
Creates WorkspaceNearestNeighbourInfo. More... | |
~WorkspaceNearestNeighbourInfo () | |
Private Attributes | |
std::unique_ptr< WorkspaceNearestNeighbours > | m_nearestNeighbours |
const MatrixWorkspace & | m_workspace |
WorkspaceNearestNeighbourInfo provides easy access to nearest-neighbour information for a workspace.
Definition at line 28 of file WorkspaceNearestNeighbourInfo.h.
Mantid::API::WorkspaceNearestNeighbourInfo::WorkspaceNearestNeighbourInfo | ( | const MatrixWorkspace & | workspace, |
const bool | ignoreMaskedDetectors, | ||
const int | nNeighbours = 8 |
||
) |
Creates WorkspaceNearestNeighbourInfo.
workspace | :: Reference to workspace providing instrument and spectrum-detector mapping |
ignoreMaskedDetectors | :: if true, masked detectors are ignored |
nNeighbours | :: number of neighbours to include |
Definition at line 21 of file WorkspaceNearestNeighbourInfo.cpp.
References Mantid::API::MatrixWorkspace::getNumberHistograms(), Mantid::API::MatrixWorkspace::getSpectrum(), Mantid::API::ISpectrum::getSpectrumNo(), m_nearestNeighbours, m_workspace, and workspace.
|
default |
std::map< specnum_t, Kernel::V3D > Mantid::API::WorkspaceNearestNeighbourInfo::getNeighbours | ( | const Geometry::IDetector * | comp, |
const double | radius = 0.0 |
||
) | const |
Queries the WorkspaceNearestNeighbours object for the selected detector.
NOTE! getNeighbours(spectrumNumber, radius) is MUCH faster.
comp | :: pointer to the querying detector |
radius | :: distance from detector on which to filter results |
Definition at line 44 of file WorkspaceNearestNeighbourInfo.cpp.
References Mantid::Geometry::IDetector::getID(), Mantid::API::MatrixWorkspace::getSpectraFromDetectorIDs(), m_nearestNeighbours, m_workspace, and radius.
std::map< specnum_t, Kernel::V3D > Mantid::API::WorkspaceNearestNeighbourInfo::getNeighbours | ( | specnum_t | spec, |
const double | radius | ||
) | const |
Queries the WorkspaceNearestNeighbours object for the selected spectrum number.
spec | :: spectrum number of the detector you are looking at |
radius | :: distance from detector on which to filter results |
Definition at line 64 of file WorkspaceNearestNeighbourInfo.cpp.
References m_nearestNeighbours, and radius.
std::map< specnum_t, Kernel::V3D > Mantid::API::WorkspaceNearestNeighbourInfo::getNeighboursExact | ( | specnum_t | spec | ) | const |
Queries the WorkspaceNearestNeighbours object for the selected spectrum number.
spec | :: spectrum number of the detector you are looking at |
Definition at line 75 of file WorkspaceNearestNeighbourInfo.cpp.
References m_nearestNeighbours.
Referenced by Mantid::Algorithms::SmoothNeighbours::findNeighboursUbiquitous(), and Mantid::Algorithms::SofQWNormalisedPolygon::initAngularCachesPSD().
|
private |
Definition at line 40 of file WorkspaceNearestNeighbourInfo.h.
Referenced by getNeighbours(), getNeighboursExact(), and WorkspaceNearestNeighbourInfo().
|
private |
Definition at line 39 of file WorkspaceNearestNeighbourInfo.h.
Referenced by getNeighbours(), and WorkspaceNearestNeighbourInfo().