Skip to content

Commit

Permalink
Refs #5613 fixed elastic and indirect for non-TOF
Browse files Browse the repository at this point in the history
  • Loading branch information
VickieLynch committed Aug 7, 2012
1 parent d852676 commit aa61b61
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -764,15 +764,27 @@ void InstrumentWindowPickTab::addPeak(double x,double y)
else if (det->hasParameter("Efixed"))
{
m_emode = 2; // indirect
try
{
const Mantid::Geometry::ParameterMap& pmap = ws->constInstrumentParameters();
Mantid::Geometry::Parameter_sptr par = pmap.getRecursive(det.get(),"Efixed");
if (par)
{
m_efixed = par->value<double>();
//g_log.debug() << "Detector: " << det->getID() << " EFixed: " << m_efixed << "\n";
}
}
catch (std::runtime_error&) { /* Throws if a DetectorGroup, use single provided value */ }
}
else
{
//m_emode = 0; // Elastic
InputConvertUnitsParametersDialog* dlg = new InputConvertUnitsParametersDialog(this);
//This should be elastic if Ei and Efixed are not set
/*InputConvertUnitsParametersDialog* dlg = new InputConvertUnitsParametersDialog(this);
dlg->exec();
m_emode = dlg->getEMode();
m_efixed = dlg->getEFixed();
m_delta = dlg->getDelta();
m_delta = dlg->getDelta();*/
}
}
std::vector<double> xdata(1,x);
Expand Down

0 comments on commit aa61b61

Please sign in to comment.