This is a very simple interface:
import HasyUtils, Spectra
import random, time
def main():
MAX = 20
pos = [float(n)/MAX for n in range( MAX)]
d1 = [random.random() for n in range( MAX)]
d2 = [random.random() for n in range( MAX)]
#
# (1)
#
hsh = { 'putData':
{'title': "Important Data",
'columns':
#
# (2)
#
[ { 'name': "d1_mot01", 'data' : pos},
{ 'name': "d1_c01", 'data' : d1},
{ 'name': "d1_c02", 'data' : d2},
]}}
Spectra.putData( hsh[ 'putData'])
time.sleep(3)
main()
Remarks:
'title' is optional
All columns have to have the same length.