14#include <boost/algorithm/string.hpp>
15#include <boost/algorithm/string/trim.hpp>
20namespace PolarizationCorrectionsHelpers {
31 const std::string &spinStateOrder,
const std::string &targetSpinState) {
35 if (!wsIndex.has_value()) {
38 return std::dynamic_pointer_cast<API::MatrixWorkspace>(
group->getItem(wsIndex.value()));
42namespace SpinStatesORSO {
78 throw std::invalid_argument(
"Cannot convert spin state " + spinState +
" into ORSO notation.");
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
MANTID_ALGORITHMS_DLL API::MatrixWorkspace_sptr workspaceForSpinState(const API::WorkspaceGroup_sptr &group, const std::string &spinStateOrder, const std::string &targetSpinState)
Returns the workspace in the group associated with the given targetSpinState according to the order d...
static const std::string PARA_PARA
static const std::string ANTI
static const std::string PARA_ANTI
static const std::string ANTI_ANTI
static const std::string PARA
static const std::string ANTI_PARA
static const std::string MINUS_MINUS
static const std::string PLUS_MINUS
static const std::string PLUS_PLUS
static const std::string MINUS_PLUS
static const std::string PLUS
static const std::string MINUS
static const std::string LOG_NAME
static const std::string MO
static const std::string PO
static const std::string PM
MANTID_ALGORITHMS_DLL void addORSOLogForSpinState(const Mantid::API::MatrixWorkspace_sptr &ws, const std::string &spinState)
static const std::string MM
MANTID_ALGORITHMS_DLL const std::string & getORSONotationForSpinState(const std::string &spinState)
static const std::string PP
static const std::string MP
MANTID_KERNEL_DLL std::vector< std::string > splitSpinStateString(const std::string &spinStates)
MANTID_KERNEL_DLL std::optional< size_t > indexOfWorkspaceForSpinState(const std::vector< std::string > &spinStateOrder, std::string targetSpinState)
Helper class which provides the Collimation Length for SANS instruments.