Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/10103_scale_column_not_a…
Browse files Browse the repository at this point in the history
…pplied'
  • Loading branch information
OwenArnold committed Aug 21, 2014
2 parents 8a2f980 + 0782986 commit 8e0f7da
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#This is an extension of refl_gui.py as that is a auto-generated script form pyqt and shouldn't be edited
#so this file provides any extra GUI tweaks not easily doable in the designer
#for the time being this also includes non-GUI behaviour
import refl_window
import refl_save
import refl_choose_col
Expand Down Expand Up @@ -744,6 +741,10 @@ def _process(self):
overlapHigh.append(qmax)
if wksp[i].find(',') > 0 or wksp[i].find(':') > 0:
wksp[i] = first_wq.name()

#Scale each run
if self.tableMain.item(row, self.scale_col).text():
Scale(InputWorkspace=wksp[i], OutputWorkspace=wksp[i], Factor=1 / float(self.tableMain.item(row, self.scale_col).text()))

if self.__checked_row_stiched(row):
if (len(runno) == 1):
Expand All @@ -764,8 +765,6 @@ def _process(self):
Qmax = max(w2.readX(0))

wcomb = combineDataMulti(wksp, outputwksp, overlapLow, overlapHigh, Qmin, Qmax, -dqq, 1, keep=True)
if self.tableMain.item(row, self.scale_col).text():
Scale(InputWorkspace=outputwksp, OutputWorkspace=outputwksp, Factor=1 / float(self.tableMain.item(row, self.scale_col).text()))


# Enable the plot button
Expand Down Expand Up @@ -829,6 +828,7 @@ def _plot(self, plotbutton):
wsb = getWorkspace(ws_name_binned)
Imin = min(wsb.readY(0))
Imax = max(wsb.readY(0))

if canMantidPlot:
g[i] = plotSpectrum(ws_name_binned, 0, True)
titl = groupGet(ws_name_binned, 'samp', 'run_title')
Expand All @@ -849,8 +849,6 @@ def _plot(self, plotbutton):
if not getWorkspace(outputwksp, report_error=False):
# Stitching has not been done as part of processing, so we need to do it here.
wcomb = combineDataMulti(wkspBinned, outputwksp, overlapLow, overlapHigh, Qmin, Qmax, -dqq, 1, keep=True)
if self.tableMain.item(row, self.scale_col).text():
Scale(InputWorkspace=outputwksp, OutputWorkspace=outputwksp, Factor=1 / float(self.tableMain.item(row, self.scale_col).text()))

Qmin = min(getWorkspace(outputwksp).readX(0))
Qmax = max(getWorkspace(outputwksp).readX(0))
Expand Down

0 comments on commit 8e0f7da

Please sign in to comment.