Mantid
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
Mantid::MDAlgorithms::MDWSDescription Class Reference

helper class describes the properties of target MD workspace, which should be obtained as the result of conversion algorithm. More...

#include <MDWSDescription.h>

Inheritance diagram for Mantid::MDAlgorithms::MDWSDescription:
Mantid::API::LogManager

Public Member Functions

double absMin () const
 
void buildFromMatrixWS (const API::MatrixWorkspace_sptr &pWS, const std::string &QMode, const std::string &dEMode, const std::vector< std::string > &dimPropertyNames=std::vector< std::string >())
 method builds MD Event ws description from a matrix workspace and the transformations, requested to be performed on the workspace More...
 
void buildFromMDWS (const API::IMDEventWorkspace_const_sptr &pWS)
 method builds MD Event description from existing MD event workspace More...
 
void checkWSCorresponsMDWorkspace (const MDWSDescription &NewMDWorkspaceD)
 compare two descriptions and select the complimentary result. More...
 
std::vector< coord_tgetAddCoord () const
 
Mantid::Kernel::SpecialCoordinateSystem getCoordinateSystem () const
 
std::vector< std::string > getDimIDs () const
 
std::vector< double > getDimMax () const
 
std::vector< double > getDimMin () const
 
std::vector< std::string > getDimNames () const
 
std::vector< std::string > getDimUnits () const
 
Kernel::DeltaEMode::Type getEMode () const
 
std::string getEModeStr () const
 Returns symbolic representation of current Emode. More...
 
Geometry::MDFrame_uptr getFrame (size_t d) const
 Retrieve the md frame. More...
 
Kernel::Matrix< double > getGoniometerMatr () const
 method returns goniometer matrix if one is defined on the workspace or unit matrix if there are no such matrix More...
 
API::MatrixWorkspace_const_sptr getInWS () const
 
std::shared_ptr< Geometry::OrientedLatticegetLattice () const
 
void getMinMax (std::vector< double > &min, std::vector< double > &max) const
 get vector of minimal and maximal values from the class More...
 
std::vector< size_t > getNBins () const
 
std::string getQMode () const
 
std::vector< double > getTransfMatrix () const
 
const std::string & getWSName () const
 
bool hasGoniometer () const
 Method checks if input workspace has defined goniometer. More...
 
bool hasLattice () const
 
bool isLorentsCorrections () const
 check if one needs to perform Lorentz corrections More...
 
bool isPowder () const
 Method checks if the workspace is expected to be processed in powder mode. More...
 
bool isQ3DMode () const
 Is the algorithm running in Q3D mode? More...
 
 MDWSDescription (unsigned int nDimensions=0)
 constructor More...
 
unsigned int nDimensions () const
 
void setAbsMin (double absMin)
 
void setCoordinateSystem (const Mantid::Kernel::SpecialCoordinateSystem system)
 Set the special coordinate system if any. More...
 
void setDimName (unsigned int nDim, const std::string &Name)
 set specific (non-default) dimension name More...
 
void setDimUnit (unsigned int nDim, const std::string &Unit)
 this is rather misleading function, as MD workspace does not currently have dimension units. More...
 
void setFrame (const std::string &frameKey)
 Set the md frame. More...
 
void setLorentsCorr (bool On=false)
 do we need to perform Lorentz corrections More...
 
void setMinMax (const std::vector< double > &minVal, const std::vector< double > &maxVal)
 function sets up min-max values to the dimensions, described by the class More...
 
void setNumBins (const std::vector< int > &nBins_toSplit)
 sets number of bins each dimension is split More...
 
void setUpMissingParameters (const MDWSDescription &SourceMatrWS)
 copy some parameters from the input workspace, as target md WS do not have all information about the algorithm. More...
 
void setWS (API::MatrixWorkspace_sptr otherMatrixWS)
 
- Public Member Functions inherited from Mantid::API::LogManager
void addLogData (Kernel::Property *p)
 Add a log entry. More...
 
void addLogData (std::unique_ptr< Kernel::Property > p, bool overwrite=false)
 Add a log entry. More...
 
template<class TYPE >
void addProperty (const std::string &name, const TYPE &value, bool overwrite=false)
 Add a property of given type. More...
 
template<class TYPE >
void addProperty (const std::string &name, const TYPE &value, const std::string &units, bool overwrite=false)
 Add a property of a specified type (Simply creates a Kernel::Property of that type) and set its units. More...
 
void addProperty (Kernel::Property *prop, bool overwrite=false)
 Add data to the object in the form of a property. More...
 
void addProperty (std::unique_ptr< Kernel::Property > prop, bool overwrite=false)
 Add data to the object in the form of a property. More...
 
void clearLogs ()
 Clear the logs. More...
 
void clearOutdatedTimeSeriesLogValues ()
 Empty all but the last value out of all TimeSeriesProperty logs. More...
 
void clearTimeSeriesLogs ()
 Empty the values out of all TimeSeriesProperty logs. More...
 
const Types::Core::DateAndTime endTime () const
 Return the run end time. More...
 
void filterByLog (const Kernel::TimeSeriesProperty< bool > &filter, const std::vector< std::string > &excludedFromFiltering=std::vector< std::string >())
 Filter the run by the given boolean log. More...
 
virtual void filterByTime (const Types::Core::DateAndTime start, const Types::Core::DateAndTime stop)
 Filter the logs by time. More...
 
Kernel::TimeSeriesProperty< bool > * getInvalidValuesFilter (const std::string &logName) const
 returns the invalid values log if the log has a matching invalid values log filter More...
 
double getLogAsSingleValue (const std::string &name, Kernel::Math::StatisticType statistic=Kernel::Math::Mean) const
 
const std::vector< Kernel::Property * > & getLogData () const
 Access all log entries. More...
 
Kernel::PropertygetLogData (const std::string &name) const
 Access a single log entry. More...
 
virtual size_t getMemorySize () const
 Return an approximate memory size for the object in bytes. More...
 
const std::vector< Kernel::Property * > & getProperties () const
 Return all of the current properties. More...
 
Kernel::PropertygetProperty (const std::string &name) const
 Returns the named property as a pointer. More...
 
int getPropertyAsIntegerValue (const std::string &name) const
 Returns a property as an integer value. More...
 
double getPropertyAsSingleValue (const std::string &name, Kernel::Math::StatisticType statistic=Kernel::Math::Mean) const
 Returns a property as a single double value from its name. More...
 
template<typename HeldType >
HeldType getPropertyValueAsType (const std::string &name) const
 Get the value of a property as the given TYPE. More...
 
double getTimeAveragedStd (const std::string &name) const
 Get the time averaged standard deviation for a log. More...
 
template<typename T >
Kernel::TimeSeriesProperty< T > * getTimeSeriesProperty (const std::string &name) const
 Returns a property as a time series property. More...
 
bool hasInvalidValuesFilter (const std::string &logName) const
 returns true if the log has a matching invalid values log filter More...
 
bool hasProperty (const std::string &name) const
 Does the property exist on the object. More...
 
virtual void loadNexus (::NeXus::File *file, const std::string &group, bool keepOpen=false)
 Load the run from a NeXus file with a given group name. More...
 
virtual void loadNexus (::NeXus::File *file, const std::string &group, const Mantid::Kernel::NexusHDF5Descriptor &fileInfo, const std::string &prefix, bool keepOpen=false)
 Load the run from a NeXus file with a given group name. More...
 
 LogManager ()
 
 LogManager (const LogManager &other)
 
bool operator!= (const LogManager &other) const
 
LogManageroperator= (const LogManager &other)
 
bool operator== (const LogManager &other) const
 
void removeLogData (const std::string &name, const bool delproperty=true)
 Remove a named log entry. More...
 
void removeProperty (const std::string &name, bool delProperty=true)
 Remove a named property. More...
 
virtual void saveNexus (::NeXus::File *file, const std::string &group, bool keepOpen=false) const
 Save the run to a NeXus file with a given group name. More...
 
void setStartAndEndTime (const Types::Core::DateAndTime &start, const Types::Core::DateAndTime &end)
 Set the run start and end. More...
 
virtual void splitByTime (Kernel::TimeSplitterType &splitter, std::vector< LogManager * > outputs) const
 Split the logs based on the given intervals. More...
 
const Types::Core::DateAndTime startTime () const
 Return the run start time. More...
 
virtual ~LogManager ()
 Destructor. More...
 

Static Public Member Functions

static void checkMinMaxNdimConsistent (const std::vector< double > &minVal, const std::vector< double > &maxVal)
 helper function checks if min values are less them max values and are consistent between each other More...
 
static void fillAddProperties (const Mantid::API::MatrixWorkspace_const_sptr &inWS2D, const std::vector< std::string > &dimPropertyNames, std::vector< coord_t > &AddCoord)
 function extracts the coordinates from additional workspace properties and places them to AddCoord vector for further usage More...
 
static std::shared_ptr< Geometry::OrientedLatticegetOrientedLattice (const Mantid::API::MatrixWorkspace_const_sptr &inWS2D)
 function retrieves copy of the oriented lattice from the workspace More...
 
- Static Public Member Functions inherited from Mantid::API::LogManager
static std::string getInvalidValuesFilterLogName (const std::string &logName)
 Gets the correct log name for the matching invalid values log for a given log name. More...
 

Public Attributes

std::string AlgID
 the string which describes ChildAlgorithm, used to convert source ws to target MD ws. More...
 
bool m_buildingNewWorkspace
 
DataObjects::TableWorkspace_const_sptr m_PreprDetTable
 
std::vector< double > m_RotMatrix
 
Kernel::DblMatrix m_Wtransf
 

Protected Member Functions

void resizeDimDescriptions (unsigned int nDimensions, size_t nBins=10)
 helper function to resize all vectors, responsible for MD dimensions in one go More...
 
- Protected Member Functions inherited from Mantid::API::LogManager
void loadNexus (::NeXus::File *file, const Mantid::Kernel::NexusHDF5Descriptor &fileInfo, const std::string &prefix)
 
void loadNexus (::NeXus::File *file, const std::map< std::string, std::string > &entries)
 Load the run from a NeXus file with a given group name. More...
 

Protected Attributes

double m_AbsMin
 hole near origin of Q More...
 
std::vector< coord_tm_AddCoord
 the vector of MD coordinates, which are obtained from workspace properties. More...
 
std::vector< std::string > m_DimIDs
 the ID-s for the target workspace, which allow to identify the dimensions according to their ID More...
 
std::vector< double > m_DimMax
 
std::vector< double > m_DimMin
 minimal and maximal values for the workspace dimensions. More...
 
std::vector< std::string > m_DimNames
 the names for the target workspace dimensions and properties of input MD workspace More...
 
std::vector< std::string > m_DimUnits
 the units of target workspace dimensions and properties of input MD workspace dimensions More...
 
Kernel::DeltaEMode::Type m_Emode
 energy transfer analysis mode More...
 
API::MatrixWorkspace_sptr m_InWS
 
bool m_LorentzCorr
 if one needs to calculate Lorentz corrections More...
 
std::vector< size_t > m_NBins
 if defined, specifies number of bins split in each dimension More...
 
unsigned int m_NDims
 the variable which describes the number of the dimensions, in the target workspace. More...
 
- Protected Attributes inherited from Mantid::API::LogManager
std::unique_ptr< Kernel::PropertyManagerm_manager
 A pointer to a property manager. More...
 

Private Attributes

Mantid::Kernel::SpecialCoordinateSystem m_coordinateSystem
 Coordinate system. More...
 
std::string m_frameKey
 Frame key. For frame to use. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from Mantid::API::LogManager
static const char * PROTON_CHARGE_LOG_NAME = "gd_prtn_chrg"
 Name of the log entry containing the proton charge when retrieved using getProtonCharge. More...
 

Detailed Description

helper class describes the properties of target MD workspace, which should be obtained as the result of conversion algorithm.

Definition at line 49 of file MDWSDescription.h.

Constructor & Destructor Documentation

◆ MDWSDescription()

Mantid::MDAlgorithms::MDWSDescription::MDWSDescription ( unsigned int  nDimensions = 0)

constructor

empty constructor

Definition at line 235 of file MDWSDescription.cpp.

References m_DimMax, m_DimMin, m_NDims, m_RotMatrix, and resizeDimDescriptions().

Member Function Documentation

◆ absMin()

double Mantid::MDAlgorithms::MDWSDescription::absMin ( ) const
inline

Definition at line 82 of file MDWSDescription.h.

Referenced by Mantid::MDAlgorithms::MDTransfQ3D::initialize().

◆ buildFromMatrixWS()

void Mantid::MDAlgorithms::MDWSDescription::buildFromMatrixWS ( const API::MatrixWorkspace_sptr pWS,
const std::string &  QMode,
const std::string &  dEMode,
const std::vector< std::string > &  dimPropertyNames = std::vector<std::string>() 
)

method builds MD Event ws description from a matrix workspace and the transformations, requested to be performed on the workspace

the method builds the MD ws description from existing matrix workspace and the requested transformation parameters.

Parameters
pWS– input matrix workspace to be converted into MD workspace
QMode– momentum conversion mode. Any mode supported by Q conversion factory. Class just carries up the name of Q-mode, to the place where factory call to the solver is made , so no code modification is needed when new modes are added to the factory
dEMode– energy analysis mode (string representation). Should correspond to energy analysis modes, supported by selected Q-mode
dimPropertyNames– the vector of names for additional ws properties, which will be used as dimensions.

Definition at line 66 of file MDWSDescription.cpp.

References AlgID, fillAddProperties(), Mantid::Kernel::DeltaEMode::fromString(), Mantid::MDAlgorithms::MDTransfInterface::getDefaultDimID(), Mantid::MDAlgorithms::MDTransfInterface::getNMatrixDimensions(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_AddCoord, m_buildingNewWorkspace, m_DimIDs, m_DimMin, m_DimNames, m_DimUnits, m_Emode, m_InWS, m_NDims, Mantid::MDAlgorithms::MDTransfInterface::outputUnitID(), and resizeDimDescriptions().

Referenced by Mantid::MDAlgorithms::ConvertToMD::buildTargetWSDescription(), Mantid::MDAlgorithms::ConvertToMDMinMaxLocal::exec(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::initTargetWSDescr(), Mantid::MDAlgorithms::IntegrateEllipsoidsV2::initTargetWSDescr(), Mantid::MDAlgorithms::SaveIsawQvector::initTargetWSDescr(), Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::qListFromEventWS(), and Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::qListFromHistoWS().

◆ buildFromMDWS()

void Mantid::MDAlgorithms::MDWSDescription::buildFromMDWS ( const API::IMDEventWorkspace_const_sptr pWS)

method builds MD Event description from existing MD event workspace

the function builds MD event WS description from existing workspace.

Primary used to obtain existing ws parameters

Parameters
pWS– shared pointer to existing MD workspace

Definition at line 142 of file MDWSDescription.cpp.

References Mantid::Geometry::IMDDimension::getDimensionId(), Mantid::Geometry::IMDDimension::getMaximum(), Mantid::Geometry::IMDDimension::getMinimum(), Mantid::Geometry::IMDDimension::getName(), Mantid::Geometry::IMDDimension::getNBins(), Mantid::Geometry::IMDDimension::getUnits(), m_DimIDs, m_DimMax, m_DimMin, m_DimNames, m_DimUnits, m_NBins, m_NDims, and m_Wtransf.

Referenced by Mantid::MDAlgorithms::ConvertToMD::buildTargetWSDescription().

◆ checkMinMaxNdimConsistent()

void Mantid::MDAlgorithms::MDWSDescription::checkMinMaxNdimConsistent ( const std::vector< double > &  minVal,
const std::vector< double > &  maxVal 
)
static

helper function checks if min values are less them max values and are consistent between each other

function verifies the consistency of the min and max dimensions values checking if all necessary values were defined and min values are smaller then max values

Definition at line 352 of file MDWSDescription.cpp.

References std::to_string().

Referenced by setMinMax().

◆ checkWSCorresponsMDWorkspace()

void Mantid::MDAlgorithms::MDWSDescription::checkWSCorresponsMDWorkspace ( const MDWSDescription NewMDWorkspaceD)

compare two descriptions and select the complimentary result.

function compares old workspace description with the new workspace description, defined by the algorithm properties and selects/changes the properties which can be changed through input parameters given that target MD workspace exist

This situation occurs if the base description has been obtained from MD workspace, and one is building a description from other matrix workspace to add new data to the existing workspace. The workspaces have to be comparable.

Parameters
NewMDWorkspaceD– MD workspace description, obtained from algorithm parameters
Returns
NewMDWorkspaceD – modified md workspace description, which is compatible with existing MD workspace

Definition at line 204 of file MDWSDescription.cpp.

References m_Emode, m_NDims, std::to_string(), and Mantid::Kernel::DeltaEMode::Undefined.

Referenced by Mantid::MDAlgorithms::ConvertToMD::buildTargetWSDescription().

◆ fillAddProperties()

void Mantid::MDAlgorithms::MDWSDescription::fillAddProperties ( const Mantid::API::MatrixWorkspace_const_sptr inWS2D,
const std::vector< std::string > &  dimPropertyNames,
std::vector< coord_t > &  AddCoord 
)
static

function extracts the coordinates from additional workspace properties and places them to AddCoord vector for further usage

function extracts the coordinates from additional workspace properties and places them to proper position within the vector of MD coordinates for the particular workspace.

Parameters
inWS2D– input workspace
dimPropertyNames– names of properties which should be treated as dimensions
AddCoord
Returns
AddCoord – vector of additional coordinates (derived from WS properties) for current multidimensional event

Definition at line 329 of file MDWSDescription.cpp.

References Mantid::Kernel::Math::TimeAveragedMean, and value.

Referenced by buildFromMatrixWS().

◆ getAddCoord()

std::vector< coord_t > Mantid::MDAlgorithms::MDWSDescription::getAddCoord ( ) const
inline

◆ getCoordinateSystem()

Mantid::Kernel::SpecialCoordinateSystem Mantid::MDAlgorithms::MDWSDescription::getCoordinateSystem ( ) const
Returns
the special coordinate system if any.

Definition at line 404 of file MDWSDescription.cpp.

References m_coordinateSystem.

Referenced by Mantid::MDAlgorithms::ConvToMDBase::initialize(), and Mantid::MDAlgorithms::ConvToMDEventsWS::initialize().

◆ getDimIDs()

std::vector< std::string > Mantid::MDAlgorithms::MDWSDescription::getDimIDs ( ) const
inline

◆ getDimMax()

std::vector< double > Mantid::MDAlgorithms::MDWSDescription::getDimMax ( ) const
inline

◆ getDimMin()

std::vector< double > Mantid::MDAlgorithms::MDWSDescription::getDimMin ( ) const
inline

◆ getDimNames()

std::vector< std::string > Mantid::MDAlgorithms::MDWSDescription::getDimNames ( ) const
inline

◆ getDimUnits()

std::vector< std::string > Mantid::MDAlgorithms::MDWSDescription::getDimUnits ( ) const
inline

◆ getEMode()

Kernel::DeltaEMode::Type Mantid::MDAlgorithms::MDWSDescription::getEMode ( ) const
inline

◆ getEModeStr()

std::string Mantid::MDAlgorithms::MDWSDescription::getEModeStr ( ) const

Returns symbolic representation of current Emode.

Definition at line 315 of file MDWSDescription.cpp.

References Mantid::Kernel::DeltaEMode::asString(), and m_Emode.

◆ getFrame()

Geometry::MDFrame_uptr Mantid::MDAlgorithms::MDWSDescription::getFrame ( size_t  d) const

Retrieve the md frame.

create the frame

Parameters
d: dimension index to get the frame for.
Returns
MDFrame

Definition at line 392 of file MDWSDescription.cpp.

References Mantid::Geometry::d, m_DimUnits, m_frameKey, and Mantid::Geometry::makeMDFrameFactoryChain().

Referenced by Mantid::MDAlgorithms::MDEventWSWrapper::createEmptyEventWS().

◆ getGoniometerMatr()

Kernel::Matrix< double > Mantid::MDAlgorithms::MDWSDescription::getGoniometerMatr ( ) const

method returns goniometer matrix if one is defined on the workspace or unit matrix if there are no such matrix

Definition at line 131 of file MDWSDescription.cpp.

References m_InWS.

Referenced by Mantid::MDAlgorithms::MDWSTransform::getTransfMatrix().

◆ getInWS()

API::MatrixWorkspace_const_sptr Mantid::MDAlgorithms::MDWSDescription::getInWS ( ) const
inline

◆ getLattice()

std::shared_ptr< Geometry::OrientedLattice > Mantid::MDAlgorithms::MDWSDescription::getLattice ( ) const
inline

◆ getMinMax()

void Mantid::MDAlgorithms::MDWSDescription::getMinMax ( std::vector< double > &  min,
std::vector< double > &  max 
) const

get vector of minimal and maximal values from the class

Definition at line 302 of file MDWSDescription.cpp.

References m_DimMax, and m_DimMin.

Referenced by Mantid::MDAlgorithms::MDTransfModQ::initialize(), Mantid::MDAlgorithms::MDTransfNoQ::initialize(), and Mantid::MDAlgorithms::MDTransfQ3D::initialize().

◆ getNBins()

std::vector< size_t > Mantid::MDAlgorithms::MDWSDescription::getNBins ( ) const
inline

◆ getOrientedLattice()

std::shared_ptr< Geometry::OrientedLattice > Mantid::MDAlgorithms::MDWSDescription::getOrientedLattice ( const Mantid::API::MatrixWorkspace_const_sptr inWS2D)
static

function retrieves copy of the oriented lattice from the workspace

Definition at line 370 of file MDWSDescription.cpp.

◆ getQMode()

std::string Mantid::MDAlgorithms::MDWSDescription::getQMode ( ) const
inline

Definition at line 78 of file MDWSDescription.h.

◆ getTransfMatrix()

std::vector< double > Mantid::MDAlgorithms::MDWSDescription::getTransfMatrix ( ) const
inline

◆ getWSName()

const std::string & Mantid::MDAlgorithms::MDWSDescription::getWSName ( ) const
inline

◆ hasGoniometer()

bool Mantid::MDAlgorithms::MDWSDescription::hasGoniometer ( ) const

◆ hasLattice()

bool Mantid::MDAlgorithms::MDWSDescription::hasLattice ( ) const

◆ isLorentsCorrections()

bool Mantid::MDAlgorithms::MDWSDescription::isLorentsCorrections ( ) const
inline

check if one needs to perform Lorentz corrections

Definition at line 81 of file MDWSDescription.h.

Referenced by Mantid::MDAlgorithms::MDTransfQ3D::initialize().

◆ isPowder()

bool Mantid::MDAlgorithms::MDWSDescription::isPowder ( ) const

Method checks if the workspace is expected to be processed in powder mode.

Definition at line 310 of file MDWSDescription.cpp.

References AlgID, and m_InWS.

Referenced by Mantid::MDAlgorithms::MDWSTransform::getTransfMatrix().

◆ isQ3DMode()

bool Mantid::MDAlgorithms::MDWSDescription::isQ3DMode ( ) const

Is the algorithm running in Q3D mode?

Returns
True only if in Q3D mode

Definition at line 410 of file MDWSDescription.cpp.

References AlgID.

Referenced by Mantid::MDAlgorithms::MDEventWSWrapper::createEmptyEventWS(), and Mantid::MDAlgorithms::MDWSTransform::getTransfMatrix().

◆ nDimensions()

unsigned int Mantid::MDAlgorithms::MDWSDescription::nDimensions ( ) const
inline

◆ resizeDimDescriptions()

void Mantid::MDAlgorithms::MDWSDescription::resizeDimDescriptions ( unsigned int  nDimensions,
size_t  nBins = 10 
)
protected

helper function to resize all vectors, responsible for MD dimensions in one go

Definition at line 248 of file MDWSDescription.cpp.

References m_DimIDs, m_DimNames, m_DimUnits, m_NBins, m_NDims, nDimensions(), and std::to_string().

Referenced by buildFromMatrixWS(), and MDWSDescription().

◆ setAbsMin()

void Mantid::MDAlgorithms::MDWSDescription::setAbsMin ( double  absMin)
inline

◆ setCoordinateSystem()

void Mantid::MDAlgorithms::MDWSDescription::setCoordinateSystem ( const Mantid::Kernel::SpecialCoordinateSystem  system)

Set the special coordinate system if any.

Parameters
system: coordinate system.

Definition at line 383 of file MDWSDescription.cpp.

References m_coordinateSystem.

Referenced by Mantid::MDAlgorithms::MDWSTransform::setQ3DDimensionsNames().

◆ setDimName()

void Mantid::MDAlgorithms::MDWSDescription::setDimName ( unsigned int  nDim,
const std::string &  Name 
)

set specific (non-default) dimension name

Parameters
nDim– number of dimension;
Name– the name to assign into dimension names vector;

Definition at line 31 of file MDWSDescription.cpp.

References m_DimNames, m_NDims, and std::to_string().

Referenced by Mantid::MDAlgorithms::MDWSTransform::setQ3DDimensionsNames().

◆ setDimUnit()

void Mantid::MDAlgorithms::MDWSDescription::setDimUnit ( unsigned int  nDim,
const std::string &  Unit 
)

this is rather misleading function, as MD workspace does not currently have dimension units.

It actually sets the units for the dimension names, which will be displayed along axis and have nothing in common with units, defined by unit factory

Definition at line 43 of file MDWSDescription.cpp.

References m_DimUnits, m_NDims, and std::to_string().

Referenced by Mantid::MDAlgorithms::MDWSTransform::setQ3DDimensionsNames().

◆ setFrame()

void Mantid::MDAlgorithms::MDWSDescription::setFrame ( const std::string &  frameKey)

Set the md frame.

Sets the frame.

Parameters
frameKey: Frame key desired.

Definition at line 401 of file MDWSDescription.cpp.

References m_frameKey.

Referenced by Mantid::MDAlgorithms::MDWSTransform::setQ3DDimensionsNames().

◆ setLorentsCorr()

void Mantid::MDAlgorithms::MDWSDescription::setLorentsCorr ( bool  On = false)
inline

◆ setMinMax()

void Mantid::MDAlgorithms::MDWSDescription::setMinMax ( const std::vector< double > &  minVal,
const std::vector< double > &  maxVal 
)

◆ setNumBins()

void Mantid::MDAlgorithms::MDWSDescription::setNumBins ( const std::vector< int > &  nBins_toSplit)

sets number of bins each dimension is split

function sets number of bins each dimension become split

Parameters
nBins_toSplitvector, containing number of bins each dimension is split into. If the vector contains only one element, each dimension is split according to this element values.

Definition at line 267 of file MDWSDescription.cpp.

References m_NBins, m_NDims, and std::to_string().

Referenced by Mantid::MDAlgorithms::ConvertToMD::buildTargetWSDescription().

◆ setUpMissingParameters()

void Mantid::MDAlgorithms::MDWSDescription::setUpMissingParameters ( const MDWSDescription SourceMatrWS)

copy some parameters from the input workspace, as target md WS do not have all information about the algorithm.

When the workspace has been build from existing MDWrokspace, some target workspace parameters can not be defined, as these parameters are defined by the algorithm and input matrix workspace.

examples are emode or input energy, which is actually source workspace parameters, or some other parameters defined by the transformation algorithm

This method used to define such parameters from MDWS description, build from workspace and the transformation algorithm parameters

Parameters
SourceMatrWS– the MDWS description obtained from input matrix workspace and the algorithm parameters

Definition at line 177 of file MDWSDescription.cpp.

References AlgID, m_AbsMin, m_AddCoord, m_Emode, m_InWS, and m_LorentzCorr.

Referenced by Mantid::MDAlgorithms::ConvertToMD::buildTargetWSDescription().

◆ setWS()

void Mantid::MDAlgorithms::MDWSDescription::setWS ( API::MatrixWorkspace_sptr  otherMatrixWS)

Definition at line 121 of file MDWSDescription.cpp.

References m_InWS.

Member Data Documentation

◆ AlgID

std::string Mantid::MDAlgorithms::MDWSDescription::AlgID

the string which describes ChildAlgorithm, used to convert source ws to target MD ws.

At the moment, it coincides with Q-mode

Definition at line 53 of file MDWSDescription.h.

Referenced by buildFromMatrixWS(), Mantid::MDAlgorithms::SaveIsawQvector::exec(), Mantid::MDAlgorithms::ConvToMDBase::initialize(), isPowder(), isQ3DMode(), and setUpMissingParameters().

◆ m_AbsMin

double Mantid::MDAlgorithms::MDWSDescription::m_AbsMin
protected

hole near origin of Q

Definition at line 161 of file MDWSDescription.h.

Referenced by setUpMissingParameters().

◆ m_AddCoord

std::vector<coord_t> Mantid::MDAlgorithms::MDWSDescription::m_AddCoord
protected

the vector of MD coordinates, which are obtained from workspace properties.

Definition at line 164 of file MDWSDescription.h.

Referenced by buildFromMatrixWS(), and setUpMissingParameters().

◆ m_buildingNewWorkspace

bool Mantid::MDAlgorithms::MDWSDescription::m_buildingNewWorkspace

◆ m_coordinateSystem

Mantid::Kernel::SpecialCoordinateSystem Mantid::MDAlgorithms::MDWSDescription::m_coordinateSystem
private

Coordinate system.

Definition at line 186 of file MDWSDescription.h.

Referenced by getCoordinateSystem(), and setCoordinateSystem().

◆ m_DimIDs

std::vector<std::string> Mantid::MDAlgorithms::MDWSDescription::m_DimIDs
protected

the ID-s for the target workspace, which allow to identify the dimensions according to their ID

Definition at line 170 of file MDWSDescription.h.

Referenced by buildFromMatrixWS(), buildFromMDWS(), and resizeDimDescriptions().

◆ m_DimMax

std::vector<double> Mantid::MDAlgorithms::MDWSDescription::m_DimMax
protected

Definition at line 178 of file MDWSDescription.h.

Referenced by buildFromMDWS(), getMinMax(), MDWSDescription(), and setMinMax().

◆ m_DimMin

std::vector<double> Mantid::MDAlgorithms::MDWSDescription::m_DimMin
protected

minimal and maximal values for the workspace dimensions.

Usually obtained from WS parameters;

Definition at line 178 of file MDWSDescription.h.

Referenced by buildFromMatrixWS(), buildFromMDWS(), getMinMax(), MDWSDescription(), and setMinMax().

◆ m_DimNames

std::vector<std::string> Mantid::MDAlgorithms::MDWSDescription::m_DimNames
protected

the names for the target workspace dimensions and properties of input MD workspace

Definition at line 167 of file MDWSDescription.h.

Referenced by buildFromMatrixWS(), buildFromMDWS(), resizeDimDescriptions(), and setDimName().

◆ m_DimUnits

std::vector<std::string> Mantid::MDAlgorithms::MDWSDescription::m_DimUnits
protected

the units of target workspace dimensions and properties of input MD workspace dimensions

Definition at line 173 of file MDWSDescription.h.

Referenced by buildFromMatrixWS(), buildFromMDWS(), getFrame(), resizeDimDescriptions(), and setDimUnit().

◆ m_Emode

Kernel::DeltaEMode::Type Mantid::MDAlgorithms::MDWSDescription::m_Emode
protected

energy transfer analysis mode

Definition at line 157 of file MDWSDescription.h.

Referenced by buildFromMatrixWS(), checkWSCorresponsMDWorkspace(), getEModeStr(), and setUpMissingParameters().

◆ m_frameKey

std::string Mantid::MDAlgorithms::MDWSDescription::m_frameKey
private

Frame key. For frame to use.

Definition at line 188 of file MDWSDescription.h.

Referenced by getFrame(), and setFrame().

◆ m_InWS

API::MatrixWorkspace_sptr Mantid::MDAlgorithms::MDWSDescription::m_InWS
protected

◆ m_LorentzCorr

bool Mantid::MDAlgorithms::MDWSDescription::m_LorentzCorr
protected

if one needs to calculate Lorentz corrections

Definition at line 159 of file MDWSDescription.h.

Referenced by setUpMissingParameters().

◆ m_NBins

std::vector<size_t> Mantid::MDAlgorithms::MDWSDescription::m_NBins
protected

if defined, specifies number of bins split in each dimension

Definition at line 175 of file MDWSDescription.h.

Referenced by buildFromMDWS(), resizeDimDescriptions(), and setNumBins().

◆ m_NDims

unsigned int Mantid::MDAlgorithms::MDWSDescription::m_NDims
protected

the variable which describes the number of the dimensions, in the target workspace.

Calculated from number of input properties and the operations, performed on input workspace;

Definition at line 153 of file MDWSDescription.h.

Referenced by buildFromMatrixWS(), buildFromMDWS(), checkWSCorresponsMDWorkspace(), MDWSDescription(), resizeDimDescriptions(), setDimName(), setDimUnit(), and setNumBins().

◆ m_PreprDetTable

DataObjects::TableWorkspace_const_sptr Mantid::MDAlgorithms::MDWSDescription::m_PreprDetTable

◆ m_RotMatrix

std::vector<double> Mantid::MDAlgorithms::MDWSDescription::m_RotMatrix

◆ m_Wtransf

Kernel::DblMatrix Mantid::MDAlgorithms::MDWSDescription::m_Wtransf

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