smin = np.min(stack) avifn = os.path.join(frame_dir,'frames.avi') make_movie = not os.path.exists(avifn) if make_movie: mov = Movie(avifn) fig = plt.figure() for k in range(N_frames): plt.cla() plt.imshow(astack[k,:,:],interpolation='none',aspect='auto') plt.clim((smin,smax)) if k==0: plt.colorbar() mov.add(fig) plt.pause(.1) mov.make() sz,sy,sx = stack.shape intervals = range(1,80) variances = [] control_variances = [] mads = [] control_mads = []
ax3.plot(t,pv_list,'g') ax3.set_ylabel('phase variance') ax3.set_xticks([]) ax3.set_yticks(ax3.get_yticks()[:-1]) ax3.set_xlim((t1,t2)) ax4.plot(t,compv_list,'b') ax4.set_xlim((t1,t2)) ax4.set_yticks(ax4.get_yticks()[:-2]) ax4.set_ylabel('complex variance') for ax in ax_list[1:]: ax.axvline(now,c=[.5,.5,.5]) fixticks(ax) m.add(fig) plt.close() print now m.make() sys.exit() p1 = Phasor(1.0,np.pi/4.0) p2 = Phasor(1.0,np.pi/3.0) ax = plt.axes() ax.set_xlim((-1,1)) ax.set_ylim((-1,1)) p1.plot_context(ax) p1.plot(ax)
smin = np.min(stack) avifn = os.path.join(frame_dir, 'frames.avi') make_movie = not os.path.exists(avifn) if make_movie: mov = Movie(avifn) fig = plt.figure() for k in range(N_frames): plt.cla() plt.imshow(astack[k, :, :], interpolation='none', aspect='auto') plt.clim((smin, smax)) if k == 0: plt.colorbar() mov.add(fig) plt.pause(.1) mov.make() sz, sy, sx = stack.shape intervals = range(1, 80) variances = [] control_variances = [] mads = [] control_mads = [] def cvar(mat, axis=0):
ax3.plot(t, pv_list, 'g') ax3.set_ylabel('phase variance') ax3.set_xticks([]) ax3.set_yticks(ax3.get_yticks()[:-1]) ax3.set_xlim((t1, t2)) ax4.plot(t, compv_list, 'b') ax4.set_xlim((t1, t2)) ax4.set_yticks(ax4.get_yticks()[:-2]) ax4.set_ylabel('complex variance') for ax in ax_list[1:]: ax.axvline(now, c=[.5, .5, .5]) fixticks(ax) m.add(fig) plt.close() print now m.make() sys.exit() p1 = Phasor(1.0, np.pi / 4.0) p2 = Phasor(1.0, np.pi / 3.0) ax = plt.axes() ax.set_xlim((-1, 1)) ax.set_ylim((-1, 1)) p1.plot_context(ax) p1.plot(ax) p2.plot(ax)