Mantid
|
API::SpectrumInfo is an intermediate step towards a SpectrumInfo that is part of Instrument-2.0. More...
#include <SpectrumInfo.h>
Public Member Functions | |
double | azimuthal (const size_t index) const |
Returns the out-of-plane angle in radians (angle w.r.t. More... | |
SpectrumInfoIterator< SpectrumInfo > | begin () |
const SpectrumInfoIterator< const SpectrumInfo > | cbegin () const |
const SpectrumInfoIterator< const SpectrumInfo > | cend () const |
void | createDetectorIdLogMessages (const std::vector< detid_t > &detids, int64_t wsIndex) const |
const Geometry::IDetector & | detector (const size_t index) const |
Return a const reference to the detector or detector group of the spectrum with given index. More... | |
size_t | detectorCount () const |
double | difcUncalibrated (const size_t index) const |
Calculate average uncalibrated DIFC value of detectors associated with this spectrum. More... | |
Kernel::UnitParametersMap | diffractometerConstants (const size_t index) const |
Calculate average diffractometer constants (DIFA, DIFC, TZERO) of detectors associated with this spectrum. More... | |
Kernel::UnitParametersMap | diffractometerConstants (const size_t index, std::vector< detid_t > &uncalibratedDets) const |
Calculate average diffractometer constants (DIFA, DIFC, TZERO) of detectors associated with this spectrum. More... | |
SpectrumInfoIterator< SpectrumInfo > | end () |
std::pair< double, double > | geographicalAngles (const size_t index) const |
Calculate latitude and longitude for given spectrum index. More... | |
void | getDetectorValues (const Kernel::Unit &inputUnit, const Kernel::Unit &outputUnit, const Kernel::DeltaEMode::Type emode, const bool signedTheta, int64_t wsIndex, Kernel::UnitParametersMap &pmap) const |
Get the detector values relevant to unit conversion for a workspace index. More... | |
bool | hasDetectors (const size_t index) const |
Returns true if the spectrum is associated with detectors in the instrument. More... | |
bool | hasUniqueDetector (const size_t index) const |
Returns true if the spectrum is associated with exactly one detector. More... | |
bool | isMasked (const size_t index) const |
Returns true if the detector(s) associated with the spectrum are masked. More... | |
bool | isMonitor (const size_t index) const |
Returns true if the detector(s) associated with the spectrum are monitors. More... | |
double | l1 () const |
Returns L1 (distance from source to sample). More... | |
double | l2 (const size_t index) const |
Returns L2 (distance from sample to spectrum). More... | |
Kernel::V3D | position (const size_t index) const |
Returns the position of the spectrum with given index. More... | |
Kernel::V3D | samplePosition () const |
Returns the sample position. More... | |
void | setMasked (const size_t index, bool masked) |
Set the mask flag of the spectrum with given index. More... | |
const Kernel::cow_ptr< std::vector< SpectrumDefinition > > & | sharedSpectrumDefinitions () const |
double | signedTwoTheta (const size_t index) const |
Returns the signed scattering angle 2 theta in radians (angle w.r.t. More... | |
size_t | size () const |
Returns the size of the SpectrumInfo, i.e., the number of spectra. More... | |
Kernel::V3D | sourcePosition () const |
Returns the source position. More... | |
const SpectrumDefinition & | spectrumDefinition (const size_t index) const |
Returns a const reference to the SpectrumDefinition of the spectrum. More... | |
SpectrumInfo (const Beamline::SpectrumInfo &spectrumInfo, const ExperimentInfo &experimentInfo, Geometry::DetectorInfo &detectorInfo) | |
double | twoTheta (const size_t index) const |
Returns the scattering angle 2 theta in radians (angle w.r.t. More... | |
~SpectrumInfo () | |
Private Member Functions | |
const SpectrumDefinition & | checkAndGetSpectrumDefinition (const size_t index) const |
const Geometry::IDetector & | getDetector (const size_t index) const |
Private Attributes | |
Geometry::DetectorInfo & | m_detectorInfo |
const ExperimentInfo & | m_experimentInfo |
std::vector< std::shared_ptr< const Geometry::IDetector > > | m_lastDetector |
std::vector< size_t > | m_lastIndex |
const Beamline::SpectrumInfo & | m_spectrumInfo |
Friends | |
class | ExperimentInfo |
API::SpectrumInfo is an intermediate step towards a SpectrumInfo that is part of Instrument-2.0.
The aim is to provide a nearly identical interface such that we can start refactoring existing code before the full-blown implementation of Instrument-2.0 is available.
SpectrumInfo provides easy access to commonly used parameters of individual spectra (which may correspond to one or more detectors), such as mask and monitor flags, L1, L2, and 2-theta.
This class is thread safe for read operations (const access) with OpenMP BUT NOT WITH ANY OTHER THREADING LIBRARY such as Poco threads or Intel TBB. There are no thread-safety guarantees for write operations (non-const access). Reads concurrent with writes or concurrent writes are not allowed.
Definition at line 53 of file SpectrumInfo.h.
Mantid::API::SpectrumInfo::SpectrumInfo | ( | const Beamline::SpectrumInfo & | spectrumInfo, |
const ExperimentInfo & | experimentInfo, | ||
Geometry::DetectorInfo & | detectorInfo | ||
) |
Definition at line 29 of file SpectrumInfo.cpp.
|
default |
References Mantid::Kernel::l2, and Mantid::Kernel::twoTheta.
double Mantid::API::SpectrumInfo::azimuthal | ( | const size_t | index | ) | const |
Returns the out-of-plane angle in radians (angle w.r.t.
to vecPointingHorizontal direction).
Throws an exception if the spectrum is a monitor.
Definition at line 113 of file SpectrumInfo.cpp.
References checkAndGetSpectrumDefinition(), index, spectrumDefinition(), and Mantid::Geometry::x.
Referenced by export_SpectrumInfo(), and MantidQt::MantidWidgets::ImageInfoModelMatrixWS::info().
SpectrumInfoIt Mantid::API::SpectrumInfo::begin | ( | ) |
Definition at line 368 of file SpectrumInfo.cpp.
const SpectrumInfoConstIt Mantid::API::SpectrumInfo::cbegin | ( | ) | const |
Definition at line 373 of file SpectrumInfo.cpp.
const SpectrumInfoConstIt Mantid::API::SpectrumInfo::cend | ( | ) | const |
Definition at line 376 of file SpectrumInfo.cpp.
References size().
|
private |
Definition at line 360 of file SpectrumInfo.cpp.
References index, size(), spectrumDefinition(), and std::to_string().
Referenced by azimuthal(), diffractometerConstants(), geographicalAngles(), isMasked(), isMonitor(), l2(), position(), setMasked(), signedTwoTheta(), and twoTheta().
void Mantid::API::SpectrumInfo::createDetectorIdLogMessages | ( | const std::vector< detid_t > & | detids, |
int64_t | wsIndex | ||
) | const |
Definition at line 276 of file SpectrumInfo.cpp.
References Mantid::API::g_log, std::to_string(), and Mantid::Kernel::Logger::warning().
Referenced by getDetectorValues().
const Geometry::IDetector & Mantid::API::SpectrumInfo::detector | ( | const size_t | index | ) | const |
Return a const reference to the detector or detector group of the spectrum with given index.
Definition at line 317 of file SpectrumInfo.cpp.
References getDetector(), and index.
Referenced by Mantid::API::WorkspaceNearestNeighbours::build(), Mantid::Algorithms::TimeAtSampleStrategyIndirect::calculate(), Mantid::Crystal::FindSXPeaksHelper::PeakFindingStrategy::calculatePhi(), Mantid::Algorithms::ModeratorTzeroLinear::calculateTfLi(), Mantid::Algorithms::He3TubeEfficiency::correctForEfficiency(), getDetectorValues(), Mantid::Algorithms::GetEi2::getDistanceFromSource(), Mantid::Algorithms::CorrectKiKf::getEfixedFromParameterMap(), Mantid::Algorithms::DetectorDiagnostic::makeMap(), Mantid::Algorithms::populateTable(), and Mantid::Crystal::FindSXPeaksHelper::SXPeak::SXPeak().
size_t Mantid::API::SpectrumInfo::detectorCount | ( | ) | const |
Definition at line 40 of file SpectrumInfo.cpp.
References m_spectrumInfo.
Referenced by export_SpectrumInfo().
double Mantid::API::SpectrumInfo::difcUncalibrated | ( | const size_t | index | ) | const |
Calculate average uncalibrated DIFC value of detectors associated with this spectrum.
index | Index of the spectrum that DIFC is required for |
Definition at line 203 of file SpectrumInfo.cpp.
References index, l1(), Mantid::Kernel::l2, Mantid::Kernel::Units::tofToDSpacingFactor(), and Mantid::Kernel::twoTheta.
Referenced by Mantid::Algorithms::RemoveLowResTOF::calcTofMin(), diffractometerConstants(), export_SpectrumInfo(), getDetectorValues(), and Mantid::Algorithms::populateTable().
UnitParametersMap Mantid::API::SpectrumInfo::diffractometerConstants | ( | const size_t | index | ) | const |
Calculate average diffractometer constants (DIFA, DIFC, TZERO) of detectors associated with this spectrum.
Use calibrated values where possible, filling in with uncalibrated values where they're missing
index | Index of the spectrum that constants are required for |
Definition at line 193 of file SpectrumInfo.cpp.
References diffractometerConstants(), and index.
UnitParametersMap Mantid::API::SpectrumInfo::diffractometerConstants | ( | const size_t | index, |
std::vector< detid_t > & | warningDets | ||
) | const |
Calculate average diffractometer constants (DIFA, DIFC, TZERO) of detectors associated with this spectrum.
Use calibrated values where possible, filling in with uncalibrated values where they're missing
index | Index of the spectrum that constants are required for |
warningDets | A vector containing the det ids where an uncalibrated value was used in the situation where some dets have calibrated values and some don't |
Definition at line 155 of file SpectrumInfo.cpp.
References checkAndGetSpectrumDefinition(), Mantid::Kernel::difa, Mantid::Kernel::difc, difcUncalibrated(), Mantid::Geometry::DetectorInfo::diffractometerConstants(), index, Mantid::Geometry::DetectorInfo::isScanning(), m_detectorInfo, spectrumDefinition(), and Mantid::Kernel::tzero.
Referenced by diffractometerConstants(), export_SpectrumInfo(), Mantid::DataHandling::SaveGSS::generateBankHeader(), getDetectorValues(), and Mantid::Algorithms::populateTable().
SpectrumInfoIt Mantid::API::SpectrumInfo::end | ( | ) |
Definition at line 371 of file SpectrumInfo.cpp.
References size().
std::pair< double, double > Mantid::API::SpectrumInfo::geographicalAngles | ( | const size_t | index | ) | const |
Calculate latitude and longitude for given spectrum index.
index | Index of the spectrum that lat/long are required for |
Definition at line 125 of file SpectrumInfo.cpp.
References checkAndGetSpectrumDefinition(), Mantid::Geometry::DetectorInfo::geographicalAngles(), index, m_detectorInfo, size(), and spectrumDefinition().
Referenced by Mantid::Algorithms::SparseWorkspace::bilinearInterpolateFromDetectorGrid(), Mantid::Algorithms::SparseWorkspace::extremeAngles(), geographicalAngles(), and Mantid::Algorithms::SparseWorkspace::interpolateFromDetectorGrid().
|
private |
Definition at line 328 of file SpectrumInfo.cpp.
References Mantid::Geometry::DetectorInfo::getDetectorPtr(), index, m_detectorInfo, m_lastDetector, m_lastIndex, PARALLEL_THREAD_NUMBER, spectrumDefinition(), and std::to_string().
Referenced by detector().
void Mantid::API::SpectrumInfo::getDetectorValues | ( | const Kernel::Unit & | inputUnit, |
const Kernel::Unit & | outputUnit, | ||
const Kernel::DeltaEMode::Type | emode, | ||
const bool | signedTheta, | ||
int64_t | wsIndex, | ||
Kernel::UnitParametersMap & | pmap | ||
) | const |
Get the detector values relevant to unit conversion for a workspace index.
inputUnit | :: The input unit (Empty implies "all") |
outputUnit | :: The output unit (Empty implies "all") |
emode | :: The energy mode |
signedTheta | :: Return twotheta with sign or without |
wsIndex | :: The workspace index |
pmap | :: a map containing values for conversion parameters that are required by unit classes to perform their conversions eg efixed. It can contain values on the way in if a look up isn't desired here eg if value supplied in parameters to the calling algorithm |
Definition at line 222 of file SpectrumInfo.cpp.
References createDetectorIdLogMessages(), Mantid::Kernel::Logger::debug(), detector(), difcUncalibrated(), diffractometerConstants(), Mantid::Kernel::DeltaEMode::Elastic, Mantid::API::g_log, Mantid::API::ExperimentInfo::getEFixedGivenEMode(), hasDetectors(), isMonitor(), Mantid::Kernel::l2, m_experimentInfo, signedTwoTheta(), Mantid::Kernel::twoTheta, Mantid::Kernel::Unit::unitID(), and Mantid::Kernel::Logger::warning().
Referenced by Mantid::Crystal::FindSXPeaksHelper::PeakFindingStrategy::convertToTOF(), Mantid::Algorithms::CalculatePlaczek::exec(), Mantid::Algorithms::BackgroundHelper::removeBackground(), MantidQt::MantidWidgets::ImageInfoModelMatrixWS::setUnitsInfo(), Mantid::Crystal::FindSXPeaksHelper::SXPeak::SXPeak(), and Mantid::Algorithms::RemoveBins::transformRangeUnit().
bool Mantid::API::SpectrumInfo::hasDetectors | ( | const size_t | index | ) | const |
Returns true if the spectrum is associated with detectors in the instrument.
Definition at line 294 of file SpectrumInfo.cpp.
References index, and spectrumDefinition().
Referenced by Mantid::Algorithms::ModeratorTzeroLinear::calculateTfLi(), Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::convertEventList(), Mantid::Algorithms::DetectorEfficiencyCor::correctForEfficiency(), export_SpectrumInfo(), Mantid::Algorithms::SparseWorkspace::extremeAngles(), getDetectorValues(), Mantid::Algorithms::GetEi2::getDistanceFromSource(), Mantid::API::MatrixWorkspaceMDIterator::getIsMasked(), MantidQt::MantidWidgets::ImageInfoModelMatrixWS::info(), Mantid::Algorithms::WorkspaceBoundingBox::isValidWs(), Mantid::Algorithms::populateTable(), Mantid::Algorithms::LorentzCorrection::processTOF_PD(), Mantid::Algorithms::LorentzCorrection::processTOF_SCD(), Mantid::Algorithms::BinaryOperation::propagateSpectraMask(), and Mantid::Crystal::FindSXPeaksHelper::SXPeak::SXPeak().
bool Mantid::API::SpectrumInfo::hasUniqueDetector | ( | const size_t | index | ) | const |
Returns true if the spectrum is associated with exactly one detector.
Definition at line 301 of file SpectrumInfo.cpp.
References index, and spectrumDefinition().
Referenced by export_SpectrumInfo().
bool Mantid::API::SpectrumInfo::isMasked | ( | const size_t | index | ) | const |
Returns true if the detector(s) associated with the spectrum are masked.
Definition at line 62 of file SpectrumInfo.cpp.
References checkAndGetSpectrumDefinition(), index, and spectrumDefinition().
Referenced by Mantid::Algorithms::CorrectTOFAxis::averageL2(), Mantid::Algorithms::CorrectTOFAxis::averageL2AndEPP(), Mantid::Algorithms::DetectorEfficiencyCor::correctForEfficiency(), Mantid::Algorithms::He3TubeEfficiency::correctForEfficiency(), export_SpectrumInfo(), Mantid::API::MatrixWorkspaceMDIterator::getIsMasked(), Mantid::API::WorkspaceNearestNeighbours::getSpectraDetectors(), and Mantid::Algorithms::BinaryOperation::propagateSpectraMask().
bool Mantid::API::SpectrumInfo::isMonitor | ( | const size_t | index | ) | const |
Returns true if the detector(s) associated with the spectrum are monitors.
Definition at line 55 of file SpectrumInfo.cpp.
References checkAndGetSpectrumDefinition(), index, and spectrumDefinition().
Referenced by Mantid::Algorithms::TimeAtSampleStrategyElastic::calculate(), Mantid::Algorithms::TimeAtSampleStrategyIndirect::calculate(), Mantid::Algorithms::ModeratorTzeroLinear::calculateTfLi(), Mantid::Algorithms::DetectorEfficiencyCor::correctForEfficiency(), Mantid::Algorithms::He3TubeEfficiency::correctForEfficiency(), Mantid::Algorithms::CalculatePlaczek::exec(), export_SpectrumInfo(), getDetectorValues(), Mantid::Algorithms::CorrectKiKf::getEfixedFromParameterMap(), Mantid::API::WorkspaceNearestNeighbours::getSpectraDetectors(), Mantid::Algorithms::WorkspaceBoundingBox::isValidWs(), and Mantid::Algorithms::populateTable().
double Mantid::API::SpectrumInfo::l1 | ( | ) | const |
Returns L1 (distance from source to sample).
Definition at line 326 of file SpectrumInfo.cpp.
References Mantid::Geometry::DetectorInfo::l1(), and m_detectorInfo.
Referenced by Mantid::Algorithms::RemoveLowResTOF::calcTofMin(), Mantid::Algorithms::TimeAtSampleStrategyElastic::calculate(), Mantid::Algorithms::TimeAtSampleStrategyIndirect::calculate(), Mantid::Algorithms::calculateDIFC(), Mantid::Algorithms::ModeratorTzeroLinear::calculateTfLi(), Mantid::Crystal::FindSXPeaksHelper::PeakFindingStrategy::convertToTOF(), difcUncalibrated(), Mantid::Algorithms::CalculatePlaczek::exec(), Mantid::Algorithms::ConvertEmptyToTof::exec(), export_SpectrumInfo(), Mantid::Algorithms::ConvertEmptyToTof::findAverageEppAndEpTof(), Mantid::DataHandling::SaveGSS::generateBankHeader(), Mantid::Algorithms::BackgroundHelper::removeBackground(), Mantid::Algorithms::ConvertAxisByFormula::setGeometryValues(), MantidQt::MantidWidgets::ImageInfoModelMatrixWS::setUnitsInfo(), Mantid::Crystal::FindSXPeaksHelper::SXPeak::SXPeak(), and Mantid::Algorithms::RemoveBins::transformRangeUnit().
double Mantid::API::SpectrumInfo::l2 | ( | const size_t | index | ) | const |
Returns L2 (distance from sample to spectrum).
For monitors this is defined such that L1+L2 = source-detector distance, i.e., for a monitor in the beamline between source and sample L2 is negative.
Definition at line 73 of file SpectrumInfo.cpp.
References checkAndGetSpectrumDefinition(), index, Mantid::Kernel::l2, spectrumDefinition(), and Mantid::Geometry::x.
Referenced by Mantid::Algorithms::CorrectTOFAxis::averageL2(), Mantid::Algorithms::CorrectTOFAxis::averageL2AndEPP(), Mantid::Algorithms::RemoveLowResTOF::calcTofMin(), Mantid::Algorithms::TimeAtSampleStrategyElastic::calculate(), Mantid::Algorithms::TimeAtSampleStrategyIndirect::calculate(), Mantid::Algorithms::calculateDIFC(), Mantid::Algorithms::ModeratorTzeroLinear::calculateTfLi(), Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::convertEventList(), Mantid::Algorithms::CalculatePlaczek::exec(), Mantid::Algorithms::ConvertEmptyToTof::exec(), export_SpectrumInfo(), Mantid::Algorithms::ConvertEmptyToTof::findAverageEppAndEpTof(), Mantid::DataHandling::SaveGSS::generateBankHeader(), Mantid::Algorithms::GravitySANSHelper::GravitySANSHelper(), MantidQt::MantidWidgets::ImageInfoModelMatrixWS::info(), Mantid::Algorithms::populateTable(), Mantid::Algorithms::ConvertAxisByFormula::setGeometryValues(), and Mantid::Crystal::FindSXPeaksHelper::SXPeak::SXPeak().
Kernel::V3D Mantid::API::SpectrumInfo::position | ( | const size_t | index | ) | const |
Returns the position of the spectrum with given index.
Definition at line 137 of file SpectrumInfo.cpp.
References checkAndGetSpectrumDefinition(), index, spectrumDefinition(), and Mantid::Geometry::x.
Referenced by Mantid::API::WorkspaceNearestNeighbours::build(), Mantid::Algorithms::TimeAtSampleStrategyElastic::calculate(), Mantid::Algorithms::TimeAtSampleStrategyIndirect::calculate(), Mantid::Algorithms::ModeratorTzeroLinear::calculateTfLi(), Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::convertEventList(), export_SpectrumInfo(), Mantid::Algorithms::GetEi2::getDistanceFromSource(), Mantid::Algorithms::GravitySANSHelper::GravitySANSHelper(), Mantid::Algorithms::populateTable(), Mantid::Algorithms::WorkspaceBoundingBox::position(), Mantid::Crystal::FindSXPeaksHelper::SXPeak::SXPeak(), and Mantid::Algorithms::Qhelper::waveLengthCutOff().
Kernel::V3D Mantid::API::SpectrumInfo::samplePosition | ( | ) | const |
Returns the sample position.
Definition at line 323 of file SpectrumInfo.cpp.
References m_detectorInfo, and Mantid::Geometry::DetectorInfo::samplePosition().
Referenced by export_SpectrumInfo(), and Mantid::Crystal::FindSXPeaksHelper::SXPeak::SXPeak().
void Mantid::API::SpectrumInfo::setMasked | ( | const size_t | index, |
bool | masked | ||
) |
Set the mask flag of the spectrum with given index.
Not thread safe.
Currently this simply sets the mask flags for the underlying detectors.
Definition at line 310 of file SpectrumInfo.cpp.
References checkAndGetSpectrumDefinition(), index, m_detectorInfo, and Mantid::Geometry::DetectorInfo::setMasked().
Referenced by export_SpectrumInfo(), and Mantid::Algorithms::BinaryOperation::propagateSpectraMask().
const Kernel::cow_ptr< std::vector< SpectrumDefinition > > & Mantid::API::SpectrumInfo::sharedSpectrumDefinitions | ( | ) | const |
Definition at line 48 of file SpectrumInfo.cpp.
References m_experimentInfo, m_spectrumInfo, size(), and Mantid::API::ExperimentInfo::updateSpectrumDefinitionIfNecessary().
Referenced by Mantid::API::ExperimentInfo::operator=().
double Mantid::API::SpectrumInfo::signedTwoTheta | ( | const size_t | index | ) | const |
Returns the signed scattering angle 2 theta in radians (angle w.r.t.
to beam direction).
Throws an exception if the spectrum is a monitor.
Definition at line 99 of file SpectrumInfo.cpp.
References checkAndGetSpectrumDefinition(), index, signedTwoTheta(), spectrumDefinition(), and Mantid::Geometry::x.
Referenced by export_SpectrumInfo(), getDetectorValues(), MantidQt::MantidWidgets::ImageInfoModelMatrixWS::info(), Mantid::Algorithms::populateTable(), Mantid::Algorithms::ConvertAxisByFormula::setGeometryValues(), and signedTwoTheta().
size_t Mantid::API::SpectrumInfo::size | ( | ) | const |
Returns the size of the SpectrumInfo, i.e., the number of spectra.
Definition at line 38 of file SpectrumInfo.cpp.
References m_spectrumInfo.
Referenced by cend(), checkAndGetSpectrumDefinition(), end(), Mantid::Algorithms::CalculatePlaczek::exec(), export_SpectrumInfo(), geographicalAngles(), sharedSpectrumDefinitions(), Mantid::Algorithms::CalculatePlaczek::validateInputs(), and Mantid::Algorithms::CalculatePlaczekSelfScattering::validateInputs().
Kernel::V3D Mantid::API::SpectrumInfo::sourcePosition | ( | ) | const |
Returns the source position.
Definition at line 320 of file SpectrumInfo.cpp.
References m_detectorInfo, and Mantid::Geometry::DetectorInfo::sourcePosition().
Referenced by Mantid::Algorithms::TimeAtSampleStrategyElastic::calculate(), Mantid::Algorithms::TimeAtSampleStrategyIndirect::calculate(), Mantid::Algorithms::ModeratorTzeroLinear::calculateTfLi(), export_SpectrumInfo(), and Mantid::Crystal::FindSXPeaksHelper::SXPeak::SXPeak().
const SpectrumDefinition & Mantid::API::SpectrumInfo::spectrumDefinition | ( | const size_t | index | ) | const |
Returns a const reference to the SpectrumDefinition of the spectrum.
Definition at line 43 of file SpectrumInfo.cpp.
References index, m_experimentInfo, m_spectrumInfo, and Mantid::API::ExperimentInfo::updateSpectrumDefinitionIfNecessary().
Referenced by azimuthal(), Mantid::Crystal::FindSXPeaksHelper::PeakFindingStrategy::calculatePhi(), checkAndGetSpectrumDefinition(), Mantid::Algorithms::DetectorEfficiencyCor::correctForEfficiency(), diffractometerConstants(), export_SpectrumInfo(), geographicalAngles(), getDetector(), hasDetectors(), hasUniqueDetector(), isMasked(), isMonitor(), l2(), Mantid::Algorithms::populateTable(), position(), signedTwoTheta(), and twoTheta().
double Mantid::API::SpectrumInfo::twoTheta | ( | const size_t | index | ) | const |
Returns the scattering angle 2 theta in radians (angle w.r.t.
to beam direction).
Throws an exception if the spectrum is a monitor.
Definition at line 86 of file SpectrumInfo.cpp.
References checkAndGetSpectrumDefinition(), index, spectrumDefinition(), Mantid::Kernel::twoTheta, and Mantid::Geometry::x.
Referenced by Mantid::Algorithms::calculateDIFC(), Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::convertEventList(), Mantid::Algorithms::Q1D2::convertWavetoQ(), export_SpectrumInfo(), Mantid::DataHandling::SaveGSS::generateBankHeader(), Mantid::Algorithms::populateTable(), Mantid::Algorithms::ConvertAxisByFormula::setGeometryValues(), and Mantid::Crystal::FindSXPeaksHelper::SXPeak::SXPeak().
|
friend |
Definition at line 102 of file SpectrumInfo.h.
|
private |
Definition at line 109 of file SpectrumInfo.h.
Referenced by diffractometerConstants(), geographicalAngles(), getDetector(), l1(), samplePosition(), setMasked(), and sourcePosition().
|
private |
Definition at line 108 of file SpectrumInfo.h.
Referenced by getDetectorValues(), sharedSpectrumDefinitions(), and spectrumDefinition().
|
mutableprivate |
Definition at line 111 of file SpectrumInfo.h.
Referenced by getDetector().
|
mutableprivate |
Definition at line 112 of file SpectrumInfo.h.
Referenced by getDetector().
|
private |
Definition at line 110 of file SpectrumInfo.h.
Referenced by detectorCount(), sharedSpectrumDefinitions(), size(), and spectrumDefinition().