Mantid
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Mantid::Algorithms::Qhelper Class Reference

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...
 

Detailed Description

Helper class for the Q1D and Qxy algorithms.

Author
Anders Markvardsen ISIS Rutherford Appleton Laboratory
Date
30/09/2011

Definition at line 20 of file Qhelper.h.

Member Function Documentation

◆ examineInput() [1/2]

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.

Parameters
dataWSdata 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
Exceptions
invalid_argumentif the workspaces are not mututially compatible

Definition at line 66 of file Qhelper.cpp.

◆ examineInput() [2/2]

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.

Parameters
dataWSdata 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
qResolutionthe QResolution workspace
Exceptions
invalid_argumentif 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().

◆ outputParts()

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

Parameters
algalgoritm
sumOfCountssum of counts
sumOfNormFactorssum 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().

◆ waveLengthCutOff()

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.

Parameters
dataWSdata workspace
spectrumInfothe spectrumInfo associated with the data workspace
RCutthe radius cut off, should be value of the property RadiusCut (unit is mm)
WCutthis wavelength cut off, should be equal to the value WaveCut
wsIndspectrum that is being analysed
Returns
index number of the first bin to include in the calculation

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().


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