0001 function vb_job_movie
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 proj_root = ['./subjects/V001'];
0015
0016
0017 brain_file = [proj_root '/brain/V001.brain.mat' ];
0018 area_file = [proj_root '/brain/V001.area.mat' ];
0019 meg_file = [proj_root '/meg/a/tfV001ax.meg.mat'];
0020 current_file = [proj_root '/curr/tfV001a.curr.mat'];
0021
0022
0023 movie_file = [proj_root '/bayes/tfV001a.avi' ];
0024
0025
0026
0027
0028
0029 movie_parm.NX = 2;
0030 movie_parm.NY = 2;
0031 movie_parm.movie_file = movie_file;
0032 movie_parm.figpos = [100 100 640 480];
0033 movie_parm.figure_property = {'Color','k','Menubar','none', ...
0034 'Renderer','zbuffer'};
0035 movie_parm.movie2avi_property = {'fps',8};
0036
0037 skip = 5;
0038
0039
0040
0041
0042
0043 [bexp,ChannelInfo] = vb_load_meg_data(meg_file);
0044 load(meg_file,'pick');
0045
0046
0047 subplot{1}.mode = 3;
0048 subplot{1}.sub = 1;
0049 subplot{1}.title_var = {'MEG timecourse','Color','w'};
0050 subplot{1}.bexp = sqrt(sum(bexp(:,1:500).^2,1))*1e15;
0051 subplot{1}.Tdisp = 1:500;
0052 subplot{1}.ix_sample = 1:skip:500;
0053 subplot{1}.xlabel_var = {'Time [ms]','Color','w'};
0054 subplot{1}.ylabel_var = {'Magnetic field power [fT]','Color','w'};
0055 subplot{1}.axes_property = {'Fontsize',10,'XColor','w','YColor','w', ...
0056 'Color','k'};
0057
0058
0059 ix_sensor = find(ChannelInfo.Type==2);
0060
0061
0062 subplot{2}.mode = 2;
0063 subplot{2}.sub = 2;
0064 subplot{2}.title_var = [];
0065 subplot{2}.bexp = bexp(ix_sensor,1:500)*1e15;
0066 subplot{2}.pick = pick(ix_sensor,:);
0067 subplot{2}.clim = [-200 200];
0068 subplot{2}.cbar_var = {'EastOutside'};
0069 subplot{2}.ix_sample = 1:skip:500;
0070 subplot{2}.Tdisp = [];
0071 subplot{2}.axes_property = {'Color','k'};
0072
0073 clear bexp;
0074
0075
0076
0077
0078
0079
0080
0081 load(current_file,'Zact','Jinfo');
0082 [V,F,xx,inf_C] = vb_load_cortex(brain_file,'Inflate');
0083 subplot{3}.mode = 1;
0084 subplot{3}.title_var = [];
0085 subplot{3}.Z = Zact(:,1:500);
0086 subplot{3}.W = Jinfo.Wact;
0087 subplot{3}.ix_act_ex = Jinfo.ix_act_ex;
0088 subplot{3}.ix_sample = 1:skip:500;
0089 subplot{3}.V = V;
0090 subplot{3}.F = F;
0091 subplot{3}.inf_C = inf_C;
0092 subplot{3}.light_flag = true;
0093 subplot{3}.plot_parm = vb_set_plot_parm;
0094 subplot{3}.Jmin = 0.1;
0095 subplot{3}.Jmax = 1.0;
0096 subplot{3}.axes_tight = false;
0097 subplot{3}.axes_equal = true;
0098 subplot{3}.axes_property = {'Color','k','XTick',[],'YTick',[],...
0099 'ZTick',[]};
0100 clear Zact ix_act V F inf_C
0101
0102
0103 subplot{3}.sub = 3;
0104 subplot{3}.angle_var = [-90 0];
0105 subplot{3}.plot_parm.LRflag = 'L';
0106 subplot{3}.cbar_var = [];
0107
0108
0109 subplot{4} = subplot{3};
0110 subplot{4}.sub = 4;
0111 subplot{4}.angle_var = [90 0];
0112 subplot{4}.plot_parm.LRflag = 'R';
0113
0114
0115 for i=1:500
0116 subplot{4}.Tdisp{i} ...
0117 = {1,1,sprintf('%d [ms]',i),'Color','w'};
0118 end;
0119
0120
0121
0122
0123
0124 movie_parm.subplot = subplot;
0125 vb_make_movie(movie_parm);
0126
0127 return;