Mantid
Loading...
Searching...
No Matches
Namespaces | Functions
WorkspaceUtils.h File Reference
#include "DllOption.h"
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/ITableWorkspace.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidAPI/WorkspaceGroup.h"
#include "QPair"
#include <optional>
#include <string>

Go to the source code of this file.

Namespaces

namespace  MantidQt
 The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress bar for them, and a property list.
 
namespace  MantidQt::MantidWidgets
 
namespace  MantidQt::MantidWidgets::WorkspaceUtils
 

Functions

EXPORT_OPT_MANTIDQT_COMMON std::vector< std::string > MantidQt::MantidWidgets::WorkspaceUtils::attachPrefix (std::vector< std::string > const &strings, std::string const &prefix)
 
EXPORT_OPT_MANTIDQT_COMMON bool MantidQt::MantidWidgets::WorkspaceUtils::doAllWsExistInADS (std::vector< std::string > const &workspaceNames)
 
EXPORT_OPT_MANTIDQT_COMMON bool MantidQt::MantidWidgets::WorkspaceUtils::doesExistInADS (std::string const &workspaceName)
 
EXPORT_OPT_MANTIDQT_COMMON std::unordered_map< std::string, size_t > MantidQt::MantidWidgets::WorkspaceUtils::extractAxisLabels (const Mantid::API::MatrixWorkspace_const_sptr &workspace, const size_t &axisIndex)
 
template<typename T = Mantid::API::MatrixWorkspace>
std::shared_ptr< T > MantidQt::MantidWidgets::WorkspaceUtils::getADSWorkspace (std::string const &workspaceName)
 
template EXPORT_OPT_MANTIDQT_COMMON std::shared_ptr< Mantid::API::MatrixWorkspace_sptrMantidQt::MantidWidgets::WorkspaceUtils::getADSWorkspace (std::string const &workspaceName)
 
EXPORT_OPT_MANTIDQT_COMMON std::optional< double > MantidQt::MantidWidgets::WorkspaceUtils::getEFixed (const Mantid::API::MatrixWorkspace_sptr &ws)
 Gets the eFixed value from the workspace using the instrument parameters.
 
EXPORT_OPT_MANTIDQT_COMMON std::string MantidQt::MantidWidgets::WorkspaceUtils::getEMode (const Mantid::API::MatrixWorkspace_sptr &ws)
 Gets the energy mode from a workspace based on the X unit.
 
EXPORT_OPT_MANTIDQT_COMMON std::string MantidQt::MantidWidgets::WorkspaceUtils::getIndexString (const std::string &workspaceName)
 
EXPORT_OPT_MANTIDQT_COMMON 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.
 
EXPORT_OPT_MANTIDQT_COMMON 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.
 
EXPORT_OPT_MANTIDQT_COMMON std::string MantidQt::MantidWidgets::WorkspaceUtils::getWorkspaceBasename (const std::string &wsName)
 Returns the basename of a workspace (i.e.
 
EXPORT_OPT_MANTIDQT_COMMON std::string MantidQt::MantidWidgets::WorkspaceUtils::getWorkspaceSuffix (const std::string &wsName)
 Gets the suffix of a workspace (i.e.
 
EXPORT_OPT_MANTIDQT_COMMON std::pair< double, double > MantidQt::MantidWidgets::WorkspaceUtils::getXRangeFromWorkspace (const Mantid::API::MatrixWorkspace_const_sptr &workspace, double precision=0.00001)
 
EXPORT_OPT_MANTIDQT_COMMON std::pair< double, double > MantidQt::MantidWidgets::WorkspaceUtils::getXRangeFromWorkspace (std::string const &workspaceName, double precision=0.000001)
 
EXPORT_OPT_MANTIDQT_COMMON 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.
 
EXPORT_OPT_MANTIDQT_COMMON 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.
 
template<typename T , typename Predicate >
void MantidQt::MantidWidgets::WorkspaceUtils::removeElementsIf (std::vector< T > &vector, Predicate const &filter)
 
template<typename Iterator , typename Functor >
std::vector< std::string > MantidQt::MantidWidgets::WorkspaceUtils::transformElements (Iterator const fromIter, Iterator const toIter, Functor const &functor)