29 if (m_NMatrixDim + m_AddDimCoordinates.size() != nd) {
30 std::string ERR =
"Number of matrix dimensions: " +
std::to_string(m_NMatrixDim) +
31 " plus number of additional dimensions: " +
std::to_string(m_AddDimCoordinates.size()) +
32 " not equal to number of workspace dimensions: " +
std::to_string(nd);
33 throw(std::invalid_argument(ERR));
39 for (
unsigned int i = m_NMatrixDim; i < nd; i++) {
40 if (m_AddDimCoordinates[ic] < m_DimMin[i] || m_AddDimCoordinates[ic] >= m_DimMax[i])
42 Coord[i] = m_AddDimCoordinates[ic];
88 std::vector<double> rez(2);
104 this->
getAxes(inWS, pXAx, pYAx);
106 unsigned int nMatrDim = 1;
119 std::string ERR =
"Can not retrieve X axis from the source workspace: " + inWS->getName();
120 throw(std::invalid_argument(ERR));
136 std::vector<std::string> rez;
138 this->
getAxes(inWS, pXAxis, pYAx);
142 rez[1] = pYAx->
unit()->unitID();
146 rez[0] = pXAxis->
unit()->unitID();
164 std::string ERR =
"Can not retrieve X axis from the source workspace: " + inWS->getName();
165 throw(std::invalid_argument(ERR));
167 return pXAxis->
unit()->unitID();
181 setter(mdWorkspace, underlyingWorkspace, isQ);
#define DECLARE_MD_TRANSFID(classname, regID)
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
const std::shared_ptr< Kernel::Unit > & unit() const
The unit for this axis.
Class to represent a numeric axis of a workspace.
DisplayNormalizationSetter: Sets the displaynormalization on a workspace based on several parameters ...
Class responsible for conversion of input workspace data into proper number of output dimensions in N...
std::vector< double > m_DimMin
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.
void initialize(const MDWSDescription &ConvParams) override
set up transformation from the class, which can provide all variables necessary for the conversion
static void getAxes(const API::MatrixWorkspace_const_sptr &inWS, API::NumericAxis *&pXAxis, API::NumericAxis *&pYAxis)
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.
void setDisplayNormalization(Mantid::API::IMDWorkspace_sptr mdWorkspace, Mantid::API::MatrixWorkspace_sptr underlyingWorkspace) const override
Set the display normalization for no Q.
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.
Kernel::V3D const * m_Det
std::vector< double > m_DimMax
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
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
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...
std::vector< coord_t > m_AddDimCoordinates
the vector of the additional coordinates which define additional MD dimensions.
unsigned int m_NMatrixDim
API::NumericAxis * m_YAxis
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...
helper class describes the properties of target MD workspace, which should be obtained as the result ...
API::MatrixWorkspace_const_sptr getInWS() const
std::vector< coord_t > getAddCoord() const
void getMinMax(std::vector< double > &min, std::vector< double > &max) const
get vector of minimal and maximal values from the class
DataObjects::TableWorkspace_const_sptr m_PreprDetTable
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< IMDWorkspace > IMDWorkspace_sptr
Shared pointer to the IMDWorkspace base class.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
float coord_t
Typedef for the data type to use for coordinate axes in MD objects such as MDBox, MDEventWorkspace,...
std::string to_string(const wide_integer< Bits, Signed > &n)
Type
Define the available energy transfer modes It is important to assign enums proper numbers,...
@ Undefined
this mode should not be displayed among modes availible to select but may have string representation