Ticket #8568: mkws.py

File mkws.py, 288 bytes (added by Roman Tolchenov, 7 years ago)
Line 
1import numpy as np
2
3m = 200
4n = 64
5X = np.ones(m*n)
6
7ws = CreateWorkspace(X,X,X,n,'MomentumTransfer')
8
9for i in range(n):
10        x0 = -10 + i * 0.1
11        x1 = x0 + 20
12        x = np.linspace(x0,x1,m)
13        y = np.exp(-x**2)
14        ws.setX(i,x)
15        ws.setY(i,y)
16
17LoadInstrument(ws,InstrumentName='MUSR')