|
Mantid
|
Functions | |
| EXPORT_OPT_MANTIDQT_COMMON std::vector< std::string > | attachPrefix (std::vector< std::string > const &strings, std::string const &prefix) |
| EXPORT_OPT_MANTIDQT_COMMON bool | doAllWsExistInADS (std::vector< std::string > const &workspaceNames) |
| EXPORT_OPT_MANTIDQT_COMMON bool | doesExistInADS (std::string const &workspaceName) |
| EXPORT_OPT_MANTIDQT_COMMON std::unordered_map< std::string, size_t > | extractAxisLabels (const Mantid::API::MatrixWorkspace_const_sptr &workspace, const size_t &axisIndex) |
| template<typename T = Mantid::API::MatrixWorkspace> | |
| std::shared_ptr< T > | getADSWorkspace (std::string const &workspaceName) |
| template EXPORT_OPT_MANTIDQT_COMMON std::shared_ptr< Mantid::API::MatrixWorkspace_sptr > | getADSWorkspace (std::string const &workspaceName) |
| EXPORT_OPT_MANTIDQT_COMMON std::optional< double > | getEFixed (const Mantid::API::MatrixWorkspace_sptr &ws) |
| Gets the eFixed value from the workspace using the instrument parameters. | |
| EXPORT_OPT_MANTIDQT_COMMON std::string | getEMode (const Mantid::API::MatrixWorkspace_sptr &ws) |
| Gets the energy mode from a workspace based on the X unit. | |
| std::string | getIndexString (const MatrixWorkspace_sptr &workspace) |
| EXPORT_OPT_MANTIDQT_COMMON std::string | getIndexString (const std::string &workspaceName) |
| EXPORT_OPT_MANTIDQT_COMMON bool | getResolutionRangeFromWs (const Mantid::API::MatrixWorkspace_const_sptr &workspace, std::pair< double, double > &res) |
| Checks the workspace's instrument for a resolution parameter to use as a default for the energy range on the mini plot. | |
| EXPORT_OPT_MANTIDQT_COMMON bool | getResolutionRangeFromWs (const std::string &workspace, std::pair< double, double > &res) |
| Checks the workspace's instrument for a resolution parameter to use as a default for the energy range on the mini plot. | |
| EXPORT_OPT_MANTIDQT_COMMON std::string | getWorkspaceBasename (const std::string &wsName) |
| Returns the basename of a workspace (i.e. | |
| EXPORT_OPT_MANTIDQT_COMMON std::string | getWorkspaceSuffix (const std::string &wsName) |
| Gets the suffix of a workspace (i.e. | |
| EXPORT_OPT_MANTIDQT_COMMON std::pair< double, double > | getXRangeFromWorkspace (const Mantid::API::MatrixWorkspace_const_sptr &workspace, double precision=0.00001) |
| EXPORT_OPT_MANTIDQT_COMMON std::pair< double, double > | getXRangeFromWorkspace (std::string const &workspaceName, double precision=0.000001) |
| EXPORT_OPT_MANTIDQT_COMMON std::optional< std::size_t > | maximumIndex (const Mantid::API::MatrixWorkspace_sptr &workspace) |
| Gets the maximum number of histograms for a 2D Workspace. | |
| EXPORT_OPT_MANTIDQT_COMMON std::string | parseRunNumbers (std::vector< std::string > const &workspaceNames) |
Checks the name of the input workspace against a regexp for prefixes in the form instrName\#runNumber_..., where #runNumber is a number indicating the specific instrument run number that the workspace refers to. | |
| template<typename T , typename Predicate > | |
| void | removeElementsIf (std::vector< T > &vector, Predicate const &filter) |
| template<typename Iterator , typename Functor > | |
| std::vector< std::string > | transformElements (Iterator const fromIter, Iterator const toIter, Functor const &functor) |
| std::vector< std::string > MantidQt::MantidWidgets::WorkspaceUtils::attachPrefix | ( | std::vector< std::string > const & | strings, |
| std::string const & | prefix | ||
| ) |
Definition at line 224 of file WorkspaceUtils.cpp.
References transformElements().
| bool MantidQt::MantidWidgets::WorkspaceUtils::doAllWsExistInADS | ( | std::vector< std::string > const & | workspaceNames | ) |
Definition at line 220 of file WorkspaceUtils.cpp.
| bool MantidQt::MantidWidgets::WorkspaceUtils::doesExistInADS | ( | std::string const & | workspaceName | ) |
Definition at line 216 of file WorkspaceUtils.cpp.
Referenced by MantidQt::MantidWidgets::AddWorkspaceDialog::selectAllSpectra().
| std::unordered_map< std::string, size_t > MantidQt::MantidWidgets::WorkspaceUtils::extractAxisLabels | ( | const Mantid::API::MatrixWorkspace_const_sptr & | workspace, |
| const size_t & | axisIndex | ||
| ) |
Definition at line 98 of file WorkspaceUtils.cpp.
References Mantid::API::Axis::isText(), and workspace.
| template EXPORT_OPT_MANTIDQT_COMMON std::shared_ptr< Mantid::API::ITableWorkspace_sptr > MantidQt::MantidWidgets::WorkspaceUtils::getADSWorkspace | ( | std::string const & | workspaceName | ) |
Definition at line 45 of file WorkspaceUtils.h.
Referenced by MantidQt::CustomInterfaces::UserInputValidator::checkWorkspaceNumberOfBins(), MantidQt::CustomInterfaces::UserInputValidator::checkWorkspaceNumberOfHistograms(), getIndexString(), and MantidQt::MantidWidgets::AddWorkspaceDialog::workspaceChanged().
| template EXPORT_OPT_MANTIDQT_COMMON std::shared_ptr< Mantid::API::MatrixWorkspace_sptr > MantidQt::MantidWidgets::WorkspaceUtils::getADSWorkspace | ( | std::string const & | workspaceName | ) |
| std::optional< double > MantidQt::MantidWidgets::WorkspaceUtils::getEFixed | ( | const Mantid::API::MatrixWorkspace_sptr & | ws | ) |
Gets the eFixed value from the workspace using the instrument parameters.
| ws | Pointer to the workspace |
Definition at line 138 of file WorkspaceUtils.cpp.
| std::string MantidQt::MantidWidgets::WorkspaceUtils::getEMode | ( | const Mantid::API::MatrixWorkspace_sptr & | ws | ) |
Gets the energy mode from a workspace based on the X unit.
Units of dSpacing typically denote diffraction, hence Elastic. All other units default to spectroscopy, therefore Indirect.
| ws | Pointer to the workspace |
Definition at line 121 of file WorkspaceUtils.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::API::g_log, and Mantid::API::Axis::unit().
| std::string MantidQt::MantidWidgets::WorkspaceUtils::getIndexString | ( | const MatrixWorkspace_sptr & | workspace | ) |
Definition at line 52 of file WorkspaceUtils.cpp.
References maximumIndex(), std::to_string(), and workspace.
| std::string MantidQt::MantidWidgets::WorkspaceUtils::getIndexString | ( | const std::string & | workspaceName | ) |
Definition at line 59 of file WorkspaceUtils.cpp.
References getADSWorkspace(), and getIndexString().
Referenced by MantidQt::MantidWidgets::WorkspaceMultiSelector::addItem(), getIndexString(), MantidQt::MantidWidgets::WorkspaceMultiSelector::renameItem(), MantidQt::MantidWidgets::WorkspaceMultiSelector::resetIndexRangeToDefault(), MantidQt::MantidWidgets::AddWorkspaceDialog::selectAllSpectra(), and MantidQt::MantidWidgets::AddWorkspaceDialog::setWorkspace().
| bool MantidQt::MantidWidgets::WorkspaceUtils::getResolutionRangeFromWs | ( | const Mantid::API::MatrixWorkspace_const_sptr & | workspace, |
| std::pair< double, double > & | res | ||
| ) |
Checks the workspace's instrument for a resolution parameter to use as a default for the energy range on the mini plot.
| workspace | :: Name of the workspace to use |
| res | :: The retrieved values for the resolution parameter (if one was found) |
Definition at line 179 of file WorkspaceUtils.cpp.
References workspace.
| bool MantidQt::MantidWidgets::WorkspaceUtils::getResolutionRangeFromWs | ( | const std::string & | workspace, |
| std::pair< double, double > & | res | ||
| ) |
Checks the workspace's instrument for a resolution parameter to use as a default for the energy range on the mini plot.
| workspace | :: Name of the workspace to use |
| res | :: The retrieved values for the resolution parameter (if one was found) |
Definition at line 166 of file WorkspaceUtils.cpp.
References getResolutionRangeFromWs(), and workspace.
Referenced by getResolutionRangeFromWs().
| std::string MantidQt::MantidWidgets::WorkspaceUtils::getWorkspaceBasename | ( | const std::string & | wsName | ) |
Returns the basename of a workspace (i.e.
the part before the last underscore)
e.g. basename of irs26176_graphite002_red is irs26176_graphite002
| wsName | Name of workspace |
Definition at line 83 of file WorkspaceUtils.cpp.
| std::string MantidQt::MantidWidgets::WorkspaceUtils::getWorkspaceSuffix | ( | const std::string & | wsName | ) |
Gets the suffix of a workspace (i.e.
part after last underscore (red, sqw)).
| wsName | Name of workspace |
Definition at line 67 of file WorkspaceUtils.cpp.
| std::pair< double, double > MantidQt::MantidWidgets::WorkspaceUtils::getXRangeFromWorkspace | ( | const Mantid::API::MatrixWorkspace_const_sptr & | workspace, |
| double | precision = 0.00001 |
||
| ) |
Definition at line 209 of file WorkspaceUtils.cpp.
References workspace.
Referenced by getXRangeFromWorkspace().
| std::pair< double, double > MantidQt::MantidWidgets::WorkspaceUtils::getXRangeFromWorkspace | ( | std::string const & | workspaceName, |
| double | precision = 0.000001 |
||
| ) |
Definition at line 202 of file WorkspaceUtils.cpp.
References getXRangeFromWorkspace().
| std::optional< std::size_t > MantidQt::MantidWidgets::WorkspaceUtils::maximumIndex | ( | const Mantid::API::MatrixWorkspace_sptr & | workspace | ) |
Gets the maximum number of histograms for a 2D Workspace.
| workspace | Workspace pointer |
Definition at line 43 of file WorkspaceUtils.cpp.
References workspace.
Referenced by getIndexString().
| std::string MantidQt::MantidWidgets::WorkspaceUtils::parseRunNumbers | ( | std::vector< std::string > const & | workspaceNames | ) |
Checks the name of the input workspace against a regexp for prefixes in the form instrName\#runNumber_..., where #runNumber is a number indicating the specific instrument run number that the workspace refers to.
As output, it returns a single string with format instrName#firstRunNumber-#finalRunNumber_..., if run numbers are found.
| workspaceNames | :: a vector of strings containing a series of workspace names |
Definition at line 237 of file WorkspaceUtils.cpp.
References name, std::to_string(), and transformElements().
| void MantidQt::MantidWidgets::WorkspaceUtils::removeElementsIf | ( | std::vector< T > & | vector, |
| Predicate const & | filter | ||
| ) |
Definition at line 64 of file WorkspaceUtils.h.
| std::vector< std::string > MantidQt::MantidWidgets::WorkspaceUtils::transformElements | ( | Iterator const | fromIter, |
| Iterator const | toIter, | ||
| Functor const & | functor | ||
| ) |
Definition at line 57 of file WorkspaceUtils.h.
Referenced by attachPrefix(), and parseRunNumbers().