def save_and_plot_data(data,histogram): #Data processing sync = 2**par_binsize_sync * arange(par_range_sync) * 1e3 #sync axis in ns dt = 2**par_binsize_g2 * linspace(-par_range_g2/2,par_range_g2/2,par_range_g2)*1e3 #dt axis in ns X,Y = meshgrid(dt, sync) data.create_file() #plt = qt.Plot3D(data, name='Interference',clear = True, coorddims=(0,1), valdim=1, style='image') data.add_data_point(ravel(X),ravel(Y),ravel(histogram)) filename=data.get_filepath()[:-4] pqm.savez(filename,dt=dt,sync=sync, counts=histogram) #Plot Data plt = plot3(ravel(X),ravel(Y),ravel(histogram), style='image',palette='hot', title='interference') #data.new_block() plt.set_xlabel('dt [ns]') plt.set_ylabel('delay wrt sync pulse [ns]') plt.save_png(filename) data.close_file() print 'interference' print '(entanglement expected in 3 weeks)'