Mantid
|
Helper class for the Q1D and Qxy algorithms. More...
#include <Qhelper.h>
Public Member Functions | |
void | examineInput (const API::MatrixWorkspace_const_sptr &dataWS, const API::MatrixWorkspace_const_sptr &binAdj, const API::MatrixWorkspace_const_sptr &detectAdj) |
Checks if workspaces input to Q1D or Qxy are reasonable. More... | |
void | examineInput (const API::MatrixWorkspace_const_sptr &dataWS, const API::MatrixWorkspace_const_sptr &binAdj, const API::MatrixWorkspace_const_sptr &detectAdj, const API::MatrixWorkspace_const_sptr &qResolution) |
Checks if workspaces input to Q1D or Qxy are reasonable. More... | |
void | outputParts (API::Algorithm *alg, const API::MatrixWorkspace_sptr &sumOfCounts, const API::MatrixWorkspace_sptr &sumOfNormFactors) |
This method performs the common work between Qxy and Q1D2 if algorihtm parameter OutputParts=True. More... | |
size_t | waveLengthCutOff (const API::MatrixWorkspace_const_sptr &dataWS, const API::SpectrumInfo &spectrumInfo, const double RCut, const double WCut, const size_t wsInd) const |
Finds the first index number of the first wavelength bin that should included based on the the calculation: W = Wcut (Rcut-R)/Rcut. More... | |
Helper class for the Q1D and Qxy algorithms.
void Mantid::Algorithms::Qhelper::examineInput | ( | const API::MatrixWorkspace_const_sptr & | dataWS, |
const API::MatrixWorkspace_const_sptr & | binAdj, | ||
const API::MatrixWorkspace_const_sptr & | detectAdj | ||
) |
Checks if workspaces input to Q1D or Qxy are reasonable.
dataWS | data workspace |
binAdj | (WavelengthAdj) workpace that will be checked to see if it has one spectrum and the same number of bins as dataWS |
detectAdj | (PixelAdj) passing NULL for this wont raise an error, if set it will be checked this workspace has as many histograms as dataWS each with one bin |
invalid_argument | if the workspaces are not mututially compatible |
Definition at line 66 of file Qhelper.cpp.
void Mantid::Algorithms::Qhelper::examineInput | ( | const API::MatrixWorkspace_const_sptr & | dataWS, |
const API::MatrixWorkspace_const_sptr & | binAdj, | ||
const API::MatrixWorkspace_const_sptr & | detectAdj, | ||
const API::MatrixWorkspace_const_sptr & | qResolution | ||
) |
Checks if workspaces input to Q1D or Qxy are reasonable.
dataWS | data workspace |
binAdj | (WavelengthAdj) workpace that will be checked to see if it has one spectrum and the same number of bins as dataWS |
detectAdj | (PixelAdj) passing NULL for this wont raise an error, if set it will be checked this workspace has as many histograms as dataWS each with one bin |
qResolution | the QResolution workspace |
invalid_argument | if the workspaces are not mututially compatible |
Definition at line 29 of file Qhelper.cpp.
References examineInput().
Referenced by examineInput(), Mantid::Algorithms::Q1D2::exec(), and Mantid::Algorithms::Qxy::exec().
void Mantid::Algorithms::Qhelper::outputParts | ( | API::Algorithm * | alg, |
const API::MatrixWorkspace_sptr & | sumOfCounts, | ||
const API::MatrixWorkspace_sptr & | sumOfNormFactors | ||
) |
This method performs the common work between Qxy and Q1D2 if algorihtm parameter OutputParts=True.
It simply outputs two workspaces as output parameters. sumOfCounts/sumOfNormFactors equals the main output of Qxy or Q1D2
alg | algoritm |
sumOfCounts | sum of counts |
sumOfNormFactors | sum of normalisation factors |
Definition at line 183 of file Qhelper.cpp.
References Mantid::API::Algorithm::declareProperty(), Mantid::API::Algorithm::getPropertyValue(), Mantid::Kernel::Direction::Output, Mantid::Kernel::IPropertyManager::setProperty(), and Mantid::API::Algorithm::setPropertyValue().
Referenced by Mantid::Algorithms::Q1D2::exec(), and Mantid::Algorithms::Qxy::exec().
size_t Mantid::Algorithms::Qhelper::waveLengthCutOff | ( | const API::MatrixWorkspace_const_sptr & | dataWS, |
const API::SpectrumInfo & | spectrumInfo, | ||
const double | RCut, | ||
const double | WCut, | ||
const size_t | wsInd | ||
) | const |
Finds the first index number of the first wavelength bin that should included based on the the calculation: W = Wcut (Rcut-R)/Rcut.
dataWS | data workspace |
spectrumInfo | the spectrumInfo associated with the data workspace |
RCut | the radius cut off, should be value of the property RadiusCut (unit is mm) |
WCut | this wavelength cut off, should be equal to the value WaveCut |
wsInd | spectrum that is being analysed |
Definition at line 150 of file Qhelper.cpp.
References Mantid::API::SpectrumInfo::position(), Mantid::Kernel::V3D::X(), and Mantid::Kernel::V3D::Y().
Referenced by Mantid::Algorithms::Q1D2::exec(), and Mantid::Algorithms::Qxy::exec().