Mantid
|
helper class describes the properties of target MD workspace, which should be obtained as the result of conversion algorithm. More...
#include <MDWSDescription.h>
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_t > | getAddCoord () 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::OrientedLattice > | getLattice () 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::Property * | getLogData (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::Property * | getProperty (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 |
LogManager & | operator= (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::OrientedLattice > | getOrientedLattice (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_t > | m_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::PropertyManager > | m_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... | |
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.
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().
|
inline |
Definition at line 82 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDTransfQ3D::initialize().
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.
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().
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
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().
|
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().
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.
NewMDWorkspaceD | – MD workspace description, obtained from algorithm parameters |
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().
|
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.
inWS2D | – input workspace |
dimPropertyNames | – names of properties which should be treated as dimensions |
AddCoord | – |
Definition at line 329 of file MDWSDescription.cpp.
References Mantid::Kernel::Math::TimeAveragedMean, and value.
Referenced by buildFromMatrixWS().
|
inline |
Definition at line 75 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDTransfModQ::initialize(), Mantid::MDAlgorithms::MDTransfNoQ::initialize(), and Mantid::MDAlgorithms::MDTransfQ3D::initialize().
Mantid::Kernel::SpecialCoordinateSystem Mantid::MDAlgorithms::MDWSDescription::getCoordinateSystem | ( | ) | const |
Definition at line 404 of file MDWSDescription.cpp.
References m_coordinateSystem.
Referenced by Mantid::MDAlgorithms::ConvToMDBase::initialize(), and Mantid::MDAlgorithms::ConvToMDEventsWS::initialize().
|
inline |
Definition at line 70 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDEventWSWrapper::createEmptyEventWS().
|
inline |
Definition at line 73 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDEventWSWrapper::createEmptyEventWS().
|
inline |
Definition at line 72 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDEventWSWrapper::createEmptyEventWS().
|
inline |
Definition at line 69 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDEventWSWrapper::createEmptyEventWS(), and Mantid::MDAlgorithms::MDWSTransform::setQ3DDimensionsNames().
|
inline |
Definition at line 71 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDEventWSWrapper::createEmptyEventWS().
|
inline |
Definition at line 77 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDTransfModQ::initialize(), Mantid::MDAlgorithms::MDTransfQ3D::initialize(), Mantid::MDAlgorithms::UnitsConversionHelper::initialize(), and Mantid::MDAlgorithms::ConvToMDBase::initialize().
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.
Geometry::MDFrame_uptr Mantid::MDAlgorithms::MDWSDescription::getFrame | ( | size_t | d | ) | const |
Retrieve the md frame.
create the frame
d | : dimension index to get the frame for. |
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().
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().
|
inline |
|
inline |
Definition at line 95 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDWSTransform::buildQTrahsf(), and Mantid::MDAlgorithms::MDWSTransform::setQ3DDimensionsNames().
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().
|
inline |
Definition at line 74 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDEventWSWrapper::createEmptyEventWS().
|
static |
function retrieves copy of the oriented lattice from the workspace
Definition at line 370 of file MDWSDescription.cpp.
|
inline |
Definition at line 78 of file MDWSDescription.h.
|
inline |
Definition at line 84 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDTransfModQ::initialize(), and Mantid::MDAlgorithms::MDTransfQ3D::initialize().
|
inline |
Definition at line 90 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDWSTransform::getTransfMatrix().
bool Mantid::MDAlgorithms::MDWSDescription::hasGoniometer | ( | ) | const |
Method checks if input workspace has defined goniometer.
Definition at line 123 of file MDWSDescription.cpp.
References m_InWS.
Referenced by Mantid::MDAlgorithms::MDWSTransform::checkTargetFrame(), Mantid::MDAlgorithms::MDWSTransform::findTargetFrame(), and Mantid::MDAlgorithms::MDWSTransform::getTransfMatrix().
bool Mantid::MDAlgorithms::MDWSDescription::hasLattice | ( | ) | const |
Definition at line 412 of file MDWSDescription.cpp.
References m_InWS.
Referenced by Mantid::MDAlgorithms::MDWSTransform::buildQTrahsf(), Mantid::MDAlgorithms::MDWSTransform::checkTargetFrame(), Mantid::MDAlgorithms::MDWSTransform::findTargetFrame(), Mantid::MDAlgorithms::MDWSTransform::getTransfMatrix(), and Mantid::MDAlgorithms::MDWSTransform::setQ3DDimensionsNames().
|
inline |
check if one needs to perform Lorentz corrections
Definition at line 81 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDTransfQ3D::initialize().
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.
Referenced by Mantid::MDAlgorithms::MDWSTransform::getTransfMatrix().
bool Mantid::MDAlgorithms::MDWSDescription::isQ3DMode | ( | ) | const |
Is the algorithm running in Q3D mode?
Definition at line 410 of file MDWSDescription.cpp.
References AlgID.
Referenced by Mantid::MDAlgorithms::MDEventWSWrapper::createEmptyEventWS(), and Mantid::MDAlgorithms::MDWSTransform::getTransfMatrix().
|
inline |
Definition at line 67 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::MDEventWSWrapper::createEmptyMDWS(), Mantid::MDAlgorithms::ConvertToMD::createNewMDWorkspace(), and resizeDimDescriptions().
|
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().
|
inline |
Definition at line 123 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::ConvertToMD::buildTargetWSDescription().
void Mantid::MDAlgorithms::MDWSDescription::setCoordinateSystem | ( | const Mantid::Kernel::SpecialCoordinateSystem | system | ) |
Set the special coordinate system if any.
system | : coordinate system. |
Definition at line 383 of file MDWSDescription.cpp.
References m_coordinateSystem.
Referenced by Mantid::MDAlgorithms::MDWSTransform::setQ3DDimensionsNames().
void Mantid::MDAlgorithms::MDWSDescription::setDimName | ( | unsigned int | nDim, |
const std::string & | Name | ||
) |
set specific (non-default) dimension name
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().
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().
void Mantid::MDAlgorithms::MDWSDescription::setFrame | ( | const std::string & | frameKey | ) |
Set the md frame.
Sets the frame.
frameKey | : Frame key desired. |
Definition at line 401 of file MDWSDescription.cpp.
References m_frameKey.
Referenced by Mantid::MDAlgorithms::MDWSTransform::setQ3DDimensionsNames().
|
inline |
do we need to perform Lorentz corrections
Definition at line 122 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::ConvertToMD::buildTargetWSDescription(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::initTargetWSDescr(), Mantid::MDAlgorithms::IntegrateEllipsoidsV2::initTargetWSDescr(), Mantid::MDAlgorithms::SaveIsawQvector::initTargetWSDescr(), Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::qListFromEventWS(), and Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::qListFromHistoWS().
void Mantid::MDAlgorithms::MDWSDescription::setMinMax | ( | const std::vector< double > & | minVal, |
const std::vector< double > & | maxVal | ||
) |
function sets up min-max values to the dimensions, described by the class
minVal | – vector of minimal dimension's values |
maxVal | – vector of maximal dimension's values |
Definition at line 294 of file MDWSDescription.cpp.
References checkMinMaxNdimConsistent(), m_DimMax, and m_DimMin.
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().
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
nBins_toSplit | vector, 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().
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
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().
void Mantid::MDAlgorithms::MDWSDescription::setWS | ( | API::MatrixWorkspace_sptr | otherMatrixWS | ) |
Definition at line 121 of file MDWSDescription.cpp.
References m_InWS.
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().
|
protected |
hole near origin of Q
Definition at line 161 of file MDWSDescription.h.
Referenced by setUpMissingParameters().
|
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().
bool Mantid::MDAlgorithms::MDWSDescription::m_buildingNewWorkspace |
Definition at line 64 of file MDWSDescription.h.
Referenced by buildFromMatrixWS(), and Mantid::MDAlgorithms::ConvertToMD::buildTargetWSDescription().
|
private |
Coordinate system.
Definition at line 186 of file MDWSDescription.h.
Referenced by getCoordinateSystem(), and setCoordinateSystem().
|
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().
|
protected |
Definition at line 178 of file MDWSDescription.h.
Referenced by buildFromMDWS(), getMinMax(), MDWSDescription(), and setMinMax().
|
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().
|
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().
|
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().
|
protected |
energy transfer analysis mode
Definition at line 157 of file MDWSDescription.h.
Referenced by buildFromMatrixWS(), checkWSCorresponsMDWorkspace(), getEModeStr(), and setUpMissingParameters().
|
private |
Frame key. For frame to use.
Definition at line 188 of file MDWSDescription.h.
Referenced by getFrame(), and setFrame().
|
protected |
Definition at line 155 of file MDWSDescription.h.
Referenced by buildFromMatrixWS(), getGoniometerMatr(), hasGoniometer(), hasLattice(), isPowder(), setUpMissingParameters(), and setWS().
|
protected |
if one needs to calculate Lorentz corrections
Definition at line 159 of file MDWSDescription.h.
Referenced by setUpMissingParameters().
|
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().
|
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().
DataObjects::TableWorkspace_const_sptr Mantid::MDAlgorithms::MDWSDescription::m_PreprDetTable |
Definition at line 61 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::ConvertToMD::exec(), Mantid::MDAlgorithms::ConvertToMDMinMaxLocal::exec(), Mantid::MDAlgorithms::ConvertToMDMinMaxLocal::findMinMaxValues(), Mantid::MDAlgorithms::MDTransfModQ::initialize(), Mantid::MDAlgorithms::MDTransfNoQ::initialize(), Mantid::MDAlgorithms::MDTransfQ3D::initialize(), Mantid::MDAlgorithms::UnitsConversionHelper::initialize(), Mantid::MDAlgorithms::ConvToMDBase::initialize(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::initTargetWSDescr(), Mantid::MDAlgorithms::IntegrateEllipsoidsV2::initTargetWSDescr(), Mantid::MDAlgorithms::SaveIsawQvector::initTargetWSDescr(), Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::qListFromEventWS(), and Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::qListFromHistoWS().
std::vector<double> Mantid::MDAlgorithms::MDWSDescription::m_RotMatrix |
Definition at line 58 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::ConvertToMD::buildTargetWSDescription(), Mantid::MDAlgorithms::ConvertToMDMinMaxLocal::exec(), and MDWSDescription().
Kernel::DblMatrix Mantid::MDAlgorithms::MDWSDescription::m_Wtransf |
Definition at line 56 of file MDWSDescription.h.
Referenced by Mantid::MDAlgorithms::ConvertToMD::addExperimentInfo(), buildFromMDWS(), Mantid::MDAlgorithms::MDEventWSWrapper::createEmptyMDWS(), and Mantid::MDAlgorithms::MDWSTransform::getTransfMatrix().