Mantid
|
Class responsible for conversion of input workspace data into proper number of output dimensions in NoQ case, when the data from a ws are just copied to MD WS. More...
#include <MDTransfNoQ.h>
Public Member Functions | |
bool | calcGenericVariables (std::vector< coord_t > &Coord, size_t nd) override |
Method fills-in all additional properties requested by user and not defined by matrix workspace itselt. More... | |
bool | calcMatrixCoord (const double &X, std::vector< coord_t > &Coord, double &s, double &err) const override |
The method to calculate all remaining coordinates, defined within the inner loop given that the input described by single value only. More... | |
bool | calcYDepCoordinates (std::vector< coord_t > &Coord, size_t i) override |
Method updates the value of preprocessed detector coordinates in Q-space, used by other functions. More... | |
MDTransfInterface * | clone () const override |
std::vector< std::string > | getDefaultDimID (Kernel::DeltaEMode::Type mode, API::MatrixWorkspace_const_sptr inWS) const override |
the default dimID-s in noQ mode equal to input WS dim-id-s More... | |
std::vector< double > | getExtremumPoints (const double xMin, const double xMax, size_t det_num) const override |
This transformation dos nothing with the workspace ranges, so extremum points for this transformation coordinates are the coordinates themselves. More... | |
unsigned int | getNMatrixDimensions (Kernel::DeltaEMode::Type mode, API::MatrixWorkspace_const_sptr inWS) const override |
return the number of dimensions, calculated by the transformation from the workspace. More... | |
void | initialize (const MDWSDescription &ConvParams) override |
set up transformation from the class, which can provide all variables necessary for the conversion More... | |
const std::string | inputUnitID (Kernel::DeltaEMode::Type mode, API::MatrixWorkspace_const_sptr inWS) const override |
returns the units, the input ws is actually in as they coinside with input units for this class More... | |
MDTransfNoQ () | |
std::vector< std::string > | outputUnitID (Kernel::DeltaEMode::Type mode, API::MatrixWorkspace_const_sptr inWS) const override |
function returns units ID-s which this transformation prodiuces its ouptut. More... | |
void | setDisplayNormalization (Mantid::API::IMDWorkspace_sptr mdWorkspace, Mantid::API::MatrixWorkspace_sptr underlyingWorkspace) const override |
Set the display normalization for no Q. More... | |
const std::string | transfID () const override |
the name, this ChildAlgorithm is known to users (will appear in selection list) More... | |
Public Member Functions inherited from Mantid::MDAlgorithms::MDTransfInterface | |
virtual bool | calcGenericVariables (std::vector< coord_t > &Coord, size_t n_ws_variabes)=0 |
Method deployed out of the loop and calculates all variables needed within the loop. More... | |
virtual bool | calcMatrixCoord (const double &X, std::vector< coord_t > &Coord, double &signal, double &errSq) const =0 |
The method to calculate all remaining coordinates, defined within the inner loop given that the input described by single value only. More... | |
virtual bool | calcMatrixCoordinates (const MantidVec &X, size_t i, size_t j, std::vector< coord_t > &Coord, double &s, double &err) const |
Calculate all remaining coordinates, defined within the inner loop. More... | |
virtual bool | calcYDepCoordinates (std::vector< coord_t > &Coord, size_t i)=0 |
generalizes the code to calculate Y-variables within the detector's loop of the workspace More... | |
virtual MDTransfInterface * | clone () const =0 |
virtual std::vector< std::string > | getDefaultDimID (Kernel::DeltaEMode::Type dEmode, API::MatrixWorkspace_const_sptr inWS) const =0 |
when one builds MD workspace, he needs a dimension names/ID-s which can be different for different Q-transformations and in different E-mode The position of each dimID in the output vector should correspond the position of each coordinate in the Coord vector More... | |
virtual std::vector< std::string > | getEmodes () const |
MD transformation can often be used together with energy analysis mode; This function should be overloaded if the transformation indeed can do the energy analysis. More... | |
virtual std::vector< double > | getExtremumPoints (const double xMin, const double xMax, size_t det_num) const =0 |
method returns the vector of input coordinates values where the transformed coordinates reach its extreme values in any of its transformed directions. More... | |
virtual unsigned int | getNMatrixDimensions (Kernel::DeltaEMode::Type mode, API::MatrixWorkspace_const_sptr inWS) const =0 |
return the number of dimensions, calculated by the transformation from the workspace. More... | |
virtual void | initialize (const MDWSDescription &)=0 |
set up transformation from the class, which can provide all variables necessary for the conversion More... | |
virtual const std::string | inputUnitID (Kernel::DeltaEMode::Type dEmode, API::MatrixWorkspace_const_sptr inWS) const =0 |
returns the unit ID for the input units, the particular transformation expects. More... | |
virtual std::vector< std::string > | outputUnitID (Kernel::DeltaEMode::Type dEmode, API::MatrixWorkspace_const_sptr inWS) const =0 |
The transformation generates output MD events in particular units. More... | |
virtual void | setDisplayNormalization (Mantid::API::IMDWorkspace_sptr mdWorkspace, Mantid::API::MatrixWorkspace_sptr underlyingWorkspace) const =0 |
Sets the display normalization. More... | |
virtual const std::string | transfID () const =0 |
The method returns the name, under which the transformation would be known to a user. More... | |
virtual | ~MDTransfInterface ()=default |
Static Private Member Functions | |
static void | getAxes (const API::MatrixWorkspace_const_sptr &inWS, API::NumericAxis *&pXAxis, API::NumericAxis *&pYAxis) |
Private Attributes | |
std::vector< coord_t > | m_AddDimCoordinates |
the vector of the additional coordinates which define additional MD dimensions. More... | |
Kernel::V3D const * | m_Det |
std::vector< double > | m_DimMax |
std::vector< double > | m_DimMin |
unsigned int | m_NMatrixDim |
API::NumericAxis * | m_YAxis |
Class responsible for conversion of input workspace data into proper number of output dimensions in NoQ case, when the data from a ws are just copied to MD WS.
See http://www.mantidproject.org/Writing_custom_ConvertTo_MD_transformation for detailed description of this class place in the algorithms hierarchy.
Definition at line 28 of file MDTransfNoQ.h.
Mantid::MDAlgorithms::MDTransfNoQ::MDTransfNoQ | ( | ) |
Definition at line 170 of file MDTransfNoQ.cpp.
|
overridevirtual |
Method fills-in all additional properties requested by user and not defined by matrix workspace itselt.
it fills in [nd - (1 or 2 – depending on input ws)] values into the Coord vector;
Coord | – input-output vector of MD-coordinates |
nd | – number of current dimensions |
Implements Mantid::MDAlgorithms::MDTransfInterface.
Definition at line 27 of file MDTransfNoQ.cpp.
References std::to_string().
|
overridevirtual |
The method to calculate all remaining coordinates, defined within the inner loop given that the input described by single value only.
X | – X workspace value |
Coord | – ChildAlgorithm specific number of coordinates, placed in the proper position of the Coordinate vector |
signal | – signal value which can change or remain unchanged depending on MD coordinates or can affect MD coordinates |
errSq | – squared error value which can change or remain unchanged depending on MD coordinates or can affect MD coordinates |
Implements Mantid::MDAlgorithms::MDTransfInterface.
Definition at line 76 of file MDTransfNoQ.cpp.
References m_DimMax, m_DimMin, and Mantid::Geometry::X.
|
overridevirtual |
Method updates the value of preprocessed detector coordinates in Q-space, used by other functions.
Coord | : input-output vector of MD Coordinates |
i | – index of the detector, which corresponds to the spectra to process. |
Implements Mantid::MDAlgorithms::MDTransfInterface.
Definition at line 69 of file MDTransfNoQ.cpp.
|
inlineoverridevirtual |
Implements Mantid::MDAlgorithms::MDTransfInterface.
Definition at line 40 of file MDTransfNoQ.h.
|
staticprivate |
Definition at line 113 of file MDTransfNoQ.cpp.
Referenced by getNMatrixDimensions(), initialize(), and outputUnitID().
|
overridevirtual |
the default dimID-s in noQ mode equal to input WS dim-id-s
Implements Mantid::MDAlgorithms::MDTransfInterface.
Definition at line 151 of file MDTransfNoQ.cpp.
References outputUnitID().
|
overridevirtual |
This transformation dos nothing with the workspace ranges, so extremum points for this transformation coordinates are the coordinates themselves.
Implements Mantid::MDAlgorithms::MDTransfInterface.
Definition at line 85 of file MDTransfNoQ.cpp.
References UNUSED_ARG.
|
overridevirtual |
return the number of dimensions, calculated by the transformation from the workspace.
Depending on ws axis units, the numebr here is either 1 or 2* and is independent on emode
Implements Mantid::MDAlgorithms::MDTransfInterface.
Definition at line 99 of file MDTransfNoQ.cpp.
References getAxes(), and UNUSED_ARG.
Referenced by initialize().
|
overridevirtual |
set up transformation from the class, which can provide all variables necessary for the conversion
Implements Mantid::MDAlgorithms::MDTransfInterface.
Definition at line 47 of file MDTransfNoQ.cpp.
References Mantid::MDAlgorithms::MDWSDescription::getAddCoord(), getAxes(), Mantid::MDAlgorithms::MDWSDescription::getInWS(), Mantid::MDAlgorithms::MDWSDescription::getMinMax(), getNMatrixDimensions(), m_AddDimCoordinates, m_Det, m_DimMax, m_DimMin, m_NMatrixDim, Mantid::MDAlgorithms::MDWSDescription::m_PreprDetTable, m_YAxis, and Mantid::Kernel::DeltaEMode::Undefined.
|
overridevirtual |
returns the units, the input ws is actually in as they coinside with input units for this class
Implements Mantid::MDAlgorithms::MDTransfInterface.
Definition at line 157 of file MDTransfNoQ.cpp.
References Mantid::API::Axis::unit(), and UNUSED_ARG.
|
overridevirtual |
function returns units ID-s which this transformation prodiuces its ouptut.
here it is usually input ws units, which are independent on emode
here it is usually input ws units, which are independent on emode
mode | – current energy analysis mode (not used in NoQ mode) |
inWS | – input matrix workspace shared pointer |
Implements Mantid::MDAlgorithms::MDTransfInterface.
Definition at line 132 of file MDTransfNoQ.cpp.
References getAxes(), Mantid::API::Axis::unit(), and UNUSED_ARG.
Referenced by getDefaultDimID().
|
overridevirtual |
Set the display normalization for no Q.
mdWorkspace | the md workspace |
underlyingWorkspace | the underlying workspace |
Implements Mantid::MDAlgorithms::MDTransfInterface.
Definition at line 177 of file MDTransfNoQ.cpp.
|
overridevirtual |
the name, this ChildAlgorithm is known to users (will appear in selection list)
Implements Mantid::MDAlgorithms::MDTransfInterface.
|
private |
the vector of the additional coordinates which define additional MD dimensions.
For implemented NoQ case, these dimensions do not depend on matrix coordinates and are determined by the WS properties
Definition at line 85 of file MDTransfNoQ.h.
Referenced by initialize().
|
private |
Definition at line 78 of file MDTransfNoQ.h.
Referenced by initialize().
|
private |
Definition at line 80 of file MDTransfNoQ.h.
Referenced by calcMatrixCoord(), calcYDepCoordinates(), and initialize().
|
private |
Definition at line 80 of file MDTransfNoQ.h.
Referenced by calcMatrixCoord(), calcYDepCoordinates(), and initialize().
|
private |
Definition at line 70 of file MDTransfNoQ.h.
Referenced by initialize().
|
private |
Definition at line 74 of file MDTransfNoQ.h.
Referenced by calcYDepCoordinates(), and initialize().