Skip to content

Commit

Permalink
Refs #7731 Added sample log for rebin type to SQW workspace.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Jackson committed Oct 9, 2013
1 parent ea36b3f commit f981d37
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Code/Mantid/MantidQt/CustomInterfaces/src/Indirect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1714,13 +1714,16 @@ void Indirect::sOfQwClicked()
"efixed = " + m_uiForm.leEfixed->text() + "\n"
"rebin = '" + rebinString + "'\n";

if(m_uiForm.sqw_cbRebinType->currentText() == "Centre (SofQW)")
QString rebinType = m_uiForm.sqw_cbRebinType->currentText();
if(rebinType == "Centre (SofQW)")
pyInput += "SofQW(InputWorkspace=sqwInput, OutputWorkspace=sqwOutput, QAxisBinning=rebin, EMode='Indirect', EFixed=efixed)\n";
else if(m_uiForm.sqw_cbRebinType->currentText() == "Parallelepiped (SofQW2)")
else if(rebinType == "Parallelepiped (SofQW2)")
pyInput += "SofQW2(InputWorkspace=sqwInput, OutputWorkspace=sqwOutput, QAxisBinning=rebin, EMode='Indirect', EFixed=efixed)\n";
else if(m_uiForm.sqw_cbRebinType->currentText() == "Parallelepiped/Fractional Area (SofQW3)")
else if(rebinType == "Parallelepiped/Fractional Area (SofQW3)")
pyInput += "SofQW3(InputWorkspace=sqwInput, OutputWorkspace=sqwOutput, QAxisBinning=rebin, EMode='Indirect', EFixed=efixed)\n";

pyInput += "AddSampleLog(Workspace=sqwOutput, LogName='rebin_type', LogType='String', LogText='"+rebinType+"')\n";

if ( m_uiForm.sqw_ckSave->isChecked() )
{
pyInput += "SaveNexus(InputWorkspace=sqwOutput, Filename=sqwOutput+'.nxs')\n";
Expand Down

0 comments on commit f981d37

Please sign in to comment.