Skip to content

Commit

Permalink
Refs #5421 Starting Quasi implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Jackson committed Sep 17, 2013
1 parent 8d00c24 commit 444dbbd
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion Code/Mantid/MantidQt/CustomInterfaces/src/Quasi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace MantidQt

//add the plot to the ui form
m_uiForm.plotSpace->addWidget(m_plot);

//add the properties browser to the ui form
m_uiForm.treeSpace->addWidget(m_propTree);

Expand Down Expand Up @@ -42,7 +42,31 @@ namespace MantidQt

void Quasi::run()
{
QString verbose("False");
QString plot("False");
QString save("False");

QString pyInput =
"from IndirectBayes import QLRun\n";

QString sampleName = m_uiForm.dsSample->getCurrentDataName();
QString resName = m_uiForm.dsResolution->getCurrentDataName();

QString eMin = m_dblManager->value(m_properties["EMin"]);
QString eMax = m_dblManager->value(m_properties["EMax"]);
QString eRange = "[" + eMin + "," + eMax + "]";

QString sampleBins = m_dblManager->value(m_properties["SampleBinning"]);
QString resBins = m_dblManager->value(m_properties["ResBinning"]);

if(m_uiForm.ckVerbose->isChecked()){ verbose = "True"; }
if(m_uiForm.ckPlot->isChecked()){ plot = "True"; }
if(m_uiForm.ckSave->isChecked()){ save ="True"; }

pyInput += "QLRun("+sampleName+", "+resName+", "+eRange+", "+sampleBins+","+resBins+","
" Save="+save+", Plot="+plot+", Verbose="+verbose+")\n";

runPythonScript(pyInput);
}

void Quasi::minValueChanged(double min)
Expand Down

0 comments on commit 444dbbd

Please sign in to comment.