import numpy as np from dataserver import get_file from demo_helpers import generate_rank1_data # TODO, make scatter f = get_file('parametric_test.h5').get_numbered_child() f.create_dataset('random walk', rank=2) #f.create_dataset('3d random walk', rank=2) f['random walk'].set_attrs(parametric=True) #f['3d random walk'].set_attrs(parametric=True) pos_2d = np.zeros(2) #pos_3d = np.zeros(3) xs, ys, zs = (generate_rank1_data() for _ in range(3)) for x, y, z in zip(xs, ys, zs): raw_input("Enter to Step") pos_2d += (x, y) # pos_3d += (x, y, z) f['random walk'].append(pos_2d) # f['3d random walk'].append(pos_3d) print 'Done'
from dataserver import get_file from demo_helpers import generate_rank1_data, generate_rank2_data f = get_file('simple_test.h5') f = f.get_group('simple group') f = f.get_numbered_child() f['lines'] = generate_rank1_data() f['image'] = generate_rank2_data() print 'Done'
from H5Plot import plotwindow_client from demo_helpers import generate_rank1_data win = plotwindow_client(serverport=55563) plot = win.add_plot('some test plot') plot.set_data(generate_rank1_data())
from dataserver import get_file from demo_helpers import generate_rank1_data f = get_file('attr_test.h5').get_numbered_child() f['lines'] = generate_rank1_data() f['lines'].set_attrs(x0=1, xscale=.01, xlabel='Time', ylabel='Noise')
import numpy as np from dataserver import get_file from demo_helpers import generate_rank1_data, generate_rank2_data f = get_file('accumulating_test.h5').get_numbered_child() f.create_dataset('line', rank=1) f.create_dataset('img', rank=2) for x, trace in zip(generate_rank1_data(), generate_rank2_data()): #time.sleep(.1) print "Enter to step", raw_input() f['line'].append(np.random.normal()) f['img'].append(np.random.normal(size=100)) print 'Done'