Skip to content

Commit

Permalink
Fixed error in x-axis. This refs #4303
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed Jun 13, 2012
1 parent dec7910 commit e6c4845
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def PyExec(self):
if len(_File)>0 and os.path.isfile(_File[0]):
data_file = _File[0]
else:
msg = "RefLReduction: could not find run %d\n" % _run
msg = "RefLReduction: could not find run %d\n" %run_numbers[0]
msg += "Add your data folder to your User Data Directories in the File menu"
raise RuntimeError(msg)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class BaseRefWidget(BaseWidget):
y_axis = []
e_axis = []

bDEBUG = False

def __init__(self, parent=None, state=None, settings=None, name="", data_proxy=None):
super(BaseRefWidget, self).__init__(parent, state, settings, data_proxy=data_proxy)

Expand Down Expand Up @@ -196,6 +198,10 @@ def _smooth_x_axis(self, x_axis, y_axis, e_axis):
new_y_axis = []
new_e_axis = []

if self.bDEBUG:
print 'x_axis before _smooth_x_axis:'
print x_axis

sz = len(x_axis)
i=0
while (i < sz-1):
Expand Down Expand Up @@ -247,6 +253,11 @@ def _smooth_x_axis(self, x_axis, y_axis, e_axis):

i+=1

if self.bDEBUG:
print
print 'x-axis after _smooth_x_axis:'
print new_x_axis

self.x_axis = new_x_axis
self.y_axis = new_y_axis
self.e_axis = new_e_axis
Expand Down Expand Up @@ -284,7 +295,6 @@ def _create_ascii_clicked(self):
e_axis = mt.readE(0)[:]

self._smooth_x_axis(x_axis, y_axis, e_axis)

x_axis = self.x_axis
y_axis = self.y_axis
e_axis = self.e_axis
Expand Down

0 comments on commit e6c4845

Please sign in to comment.