35 const std::vector<int> &summedPeriods,
36 const std::vector<int> &subtractedPeriods,
37 const int groupIndex,
const double start,
const double end,
38 const std::string &wsName)
53 int numPeriods =
m_inputWS->getNumberOfEntries();
70 tempWS = asymSummedPeriods;
93 const int index)
const {
99 asym->setProperty(
"InputWorkspace", inputWS);
104 std::vector<int> spec(1,
index);
105 asym->setProperty(
"Spectra", spec);
107 asym->setProperty(
"OutputWorkspace",
"__NotUsed__");
109 outWS = asym->getProperty(
"OutputWorkspace");
121 const int index)
const {
122 const std::string normTableName =
"MuonAnalysisTFNormalizations";
127 table->addColumn(
"double",
"norm");
128 table->addColumn(
"str",
"name");
129 table->addColumn(
"str",
"method");
136 asym->setChild(
true);
138 asym->setProperty(
"InputWorkspace", inputWS);
139 asym->setProperty(
"WorkspaceName",
m_wsName);
141 std::vector<int> spec(1,
index);
142 asym->setProperty(
"Spectra", spec);
144 asym->setProperty(
"OutputWorkspace",
"__NotUsed__");
145 asym->setProperty(
"StartX",
m_startX);
146 asym->setProperty(
"EndX",
m_endX);
148 asym->setProperty(
"OutputUnNormData",
true);
149 asym->setProperty(
"OutputUnNormWorkspace",
"tmp_unNorm");
150 asym->setProperty(
"NormalizationTable", normTableName);
157 outWS = asym->getProperty(
"OutputWorkspace");
172 auto colNorm = table->getColumn(
"norm");
173 return (*colNorm)[0];
std::map< DeltaEMode::Type, std::string > index
The Analysis data service stores instances of the Workspace objects and anything that derives from te...
void addOrReplace(const std::string &name, const std::shared_ptr< API::Workspace > &workspace) override
Overridden addOrReplace member to attach the name to the workspace when a workspace object is added t...
bool doesExist(const std::string &name) const
Check to see if a data object exists in the store.
Manage the lifetime of a class intended to be a singleton.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
API::MatrixWorkspace_sptr subtractWorkspaces(const API::MatrixWorkspace_sptr &lhs, const API::MatrixWorkspace_sptr &rhs) const
Subtracts one workspace from another (lhs - rhs)
const API::WorkspaceGroup_sptr m_inputWS
Input workspace.
const std::vector< int > m_subtractedPeriods
List of subtracted periods.
API::MatrixWorkspace_sptr sumPeriods(const std::vector< int > &periodsToSum) const
Sums the specified periods in the input workspace group.
API::MatrixWorkspace_sptr extractSpectrum(const API::Workspace_sptr &inputWS, const int index) const
Extracts a single spectrum from a workspace.
const std::vector< int > m_summedPeriods
List of summed periods.
API::MatrixWorkspace_sptr removeExpDecay(const API::Workspace_sptr &inputWS, const int index) const
Removes exponential decay from the workspace.
MuonGroupAsymmetryCalculator(const API::WorkspaceGroup_sptr &inputWS, const std::vector< int > &summedPeriods, const std::vector< int > &subtractedPeriods, const int groupIndex, const double start=0.0, const double end=30.0, const std::string &wsName="")
Constructor.
API::MatrixWorkspace_sptr calculate() const override
Performs group asymmetry calculation.
API::MatrixWorkspace_sptr estimateAsymmetry(const API::Workspace_sptr &inputWS, const int index) const
Estimate the asymmetrey for the given workspace (TF data).
MuonGroupCalculator : Base class for Muon group counts/asymmetry calculators.
void setWSName(const std::string &wsName)
const int m_groupIndex
Workspace index of the group to analyse.
void setStartEnd(const double start, const double end)
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class