#frameRate=.128; filename='agchr2_030915_01_040315_a_freestyleshake_01_cam1.avi' frameRate=0.0083; #filename='img007.tif' #frameRate=0.033; #%% filename_mc=filename[:-4]+'_mc.npz' filename_analysis=filename[:-4]+'_analysis.npz' filename_traces=filename[:-4]+'_traces.npz' #%% load movie m=XMovie(filename, frameRate=frameRate); #%% example plot a frame plt.imshow(m.mov[100],cmap=plt.cm.Greys_r) #%% example play movie m.playMovie(frate=.03,gain=20.0,magnification=4) #%% example take first channel of two channelId=1; totalChannels=2; m.makeSubMov(range(channelId-1,m.mov.shape[0],totalChannels)) #%% prtition into two movies up and down m.crop(crop_top=150,crop_bottom=150,crop_left=150,crop_right=150,crop_begin=0,crop_end=0)
#filename='img007.tif' #frameRate=0.033; #filename='img001.tif' #filename='img002.tif' #frameRate=0.033; #%% filename_py=filename[:-4]+'.npz' filename_hdf5=filename[:-4]+'.hdf5' filename_mc=filename[:-4]+'_mc.npz' filename_analysis=filename[:-4]+'_analysis.npz' filename_traces=filename[:-4]+'_traces.npz' #%% load movie m=XMovie(filename, frameRate=frameRate); #%% example plot a frame plt.imshow(m.mov[100],cmap=plt.cm.Greys_r) #%% example play movie m.playMovie(frate=.001,gain=10.0,magnification=1) #%% example take first channel of two channelId=1; totalChannels=2; m.makeSubMov(range(channelId-1,m.mov.shape[0],totalChannels)) #%% np.savez(filename_py,mov=m.mov,frameRate=frameRate) #%% f = h5py.File(filename_hdf5, "w")