Skip to content

Commit

Permalink
Refs #5421 Added multiple plot option to ResNorm.
Browse files Browse the repository at this point in the history
Also updated plot to use +/- resolution * 10
  • Loading branch information
Samuel Jackson committed Sep 19, 2013
1 parent 14c4d65 commit d9b46df
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,41 @@
</spacer>
</item>
<item>
<widget class="QCheckBox" name="chkPlot">
<widget class="QLabel" name="lblPlot">
<property name="text">
<string>Plot Result</string>
<string>Plot Result: </string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbPlot">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Intensity</string>
</property>
</item>
<item>
<property name="text">
<string>Stretch</string>
</property>
</item>
<item>
<property name="text">
<string>Fit</string>
</property>
</item>
<item>
<property name="text">
<string>All</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_18">
<property name="orientation">
Expand Down
7 changes: 5 additions & 2 deletions Code/Mantid/MantidQt/CustomInterfaces/src/ResNorm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ namespace MantidQt
void ResNorm::run()
{
QString verbose("False");
QString plot("False");
QString save("False");

QString pyInput =
Expand All @@ -80,8 +79,8 @@ namespace MantidQt

// get output options
if(m_uiForm.chkVerbose->isChecked()){ verbose = "True"; }
if(m_uiForm.chkPlot->isChecked()){ plot = "True"; }
if(m_uiForm.chkSave->isChecked()){ save ="True"; }
QString plot = m_uiForm.cbPlot->currentText();

pyInput += "ResNormRun('"+VanName+"', '"+ResName+"', "+ERange+", "+nBin+","
" Save="+save+", Plot="+plot+", Verbose="+verbose+")\n";
Expand All @@ -103,6 +102,10 @@ namespace MantidQt
//Use the values from the instrument parameter file if we can
if(getInstrumentResolution(filename, res))
{
//ResNorm resolution should be +/- 10 * the IPF resolution
res.first = res.first * 10;
res.second = res.second * 10;

setMiniPlotGuides(m_properties["EMin"], m_properties["EMax"], res);
}
else
Expand Down

0 comments on commit d9b46df

Please sign in to comment.