Skip to content

Commit

Permalink
Allowed time zero to 'reset'. re #6978
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders-Markvardsen committed May 2, 2013
1 parent 05baa4c commit 2ccfeb3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Code/Mantid/MantidQt/CustomInterfaces/src/MuonAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,7 @@ void MuonAnalysis::createPlotWS(const std::string& groupName,
double shift = m_nexusTimeZero - boost::lexical_cast<double>(timeZero().toStdString());
Mantid::API::IAlgorithm_sptr rebinAlg = Mantid::API::AlgorithmManager::Instance().create("ChangeBinOffset");
rebinAlg->setPropertyValue("InputWorkspace", inputWS);
rebinAlg->setPropertyValue("OutputWorkspace", inputWS);
rebinAlg->setPropertyValue("OutputWorkspace", outWS);
rebinAlg->setProperty("Offset", shift);
rebinAlg->execute();
}
Expand All @@ -1864,7 +1864,10 @@ void MuonAnalysis::createPlotWS(const std::string& groupName,
}

Mantid::API::IAlgorithm_sptr cropAlg = Mantid::API::AlgorithmManager::Instance().create("CropWorkspace");
cropAlg->setPropertyValue("InputWorkspace", inputWS);
if ( m_nexusTimeZero != boost::lexical_cast<double>(timeZero().toStdString()) )
cropAlg->setPropertyValue("InputWorkspace", outWS);
else
cropAlg->setPropertyValue("InputWorkspace", inputWS);
cropAlg->setPropertyValue("OutputWorkspace", outWS);
cropAlg->setProperty("Xmin", plotFromTime());
if ( !m_uiForm.timeAxisFinishAtInput->text().isEmpty() )
Expand Down

0 comments on commit 2ccfeb3

Please sign in to comment.