Skip to content

Commit

Permalink
Refs #9081 Small modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
jmborr committed Feb 27, 2014
1 parent 597fd8e commit d3ce13b
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -39,7 +39,7 @@ def generateWorkspaces(self, nf, startf, df, e=False):
if e:
HWHM += 2*df*(0.5-random()) # add uncertainty as big as twice the step between consecutive HWHM!!!
if HWHM < 0: HWHM = f
yvalues = 1/numpy.pi * HWHM / (HWHM*HWHM + xvalues*xvalues)
yvalues = 1/numpy.pi * HWHM / (HWHM*HWHM + xvalues*xvalues) * (1.1 - 0.2*numpy.random.rand(2*n)) #10% random noise
evalues = yvalues*0.1*numpy.random.rand(2*n) # errors
dataX = numpy.append(xvalues-dE/2.0, n*dE-dE/2.0) # histogram bins
CreateWorkspace(OutputWorkspace='sim{0}'.format(iif), DataX=dataX, DataY=yvalues, DataE=evalues)
Expand Down Expand Up @@ -111,7 +111,7 @@ def test_input_exceptions(self):
self.assertTrue('Regression type baloney not implemented' in str(e))
else:
assert False, 'Did not raise any exception'
# Try passing an unappropriate regression window for the regression type selected
# Try passing an inappropriate regression window for the regression type selected
try:
func_string = 'name=DSFinterp1DFit,InputWorkspaces="{0}",ParameterValues="{1}",'.format(InputWorkspaces,fvalues) +\
'LoadErrors=0,LocalRegression=1,RegressionType=quadratic,RegressionWindow=3,' +\
Expand Down Expand Up @@ -145,4 +145,4 @@ def test_LorentzianFit(self):
self.cleanup(nf)

if __name__=="__main__":
unittest.main()
unittest.main()

0 comments on commit d3ce13b

Please sign in to comment.