1 | # This is a test from a failed unit test requiring the value of Rwp |
---|
2 | from math import * |
---|
3 | |
---|
4 | def f(x, a, s, x0): |
---|
5 | val = exp( -abs(a)*(x-x0)**2/s**2) |
---|
6 | return val |
---|
7 | |
---|
8 | |
---|
9 | vecx = [] |
---|
10 | vecy = [] |
---|
11 | vece = [] |
---|
12 | |
---|
13 | for i in xrange(10): |
---|
14 | dbl_i = float(i) |
---|
15 | x_i = 0.1*dbl_i |
---|
16 | y_i = 9.9*exp(-(x_i)/0.5) |
---|
17 | e_i = sqrt(y_i) |
---|
18 | |
---|
19 | vecx.append(x_i) |
---|
20 | vecy.append(y_i) |
---|
21 | vece.append(e_i) |
---|
22 | |
---|
23 | # Input |
---|
24 | vecx1 = [] |
---|
25 | vecy1 = [] |
---|
26 | vece1 = [] |
---|
27 | |
---|
28 | for i in xrange(10): |
---|
29 | dbl_i = float(i) |
---|
30 | x_i = 0.1*dbl_i |
---|
31 | y_i = 19.*exp(-(x_i)/0.1) |
---|
32 | e_i = sqrt(y_i) |
---|
33 | |
---|
34 | vecx1.append(x_i) |
---|
35 | vecy1.append(y_i) |
---|
36 | vece1.append(e_i) |
---|
37 | |
---|
38 | |
---|
39 | CreateWorkspace(OutputWorkspace="Temp", DataX = vecx, DataY = vecy, DataE = vece, NSpec=1) |
---|