0001 function make_bayes_meeg
0002
0003 sub = '030';
0004
0005 root = ['/home/cbi-data20/yusuke-f/Projects/VisualMotion/' sub '/'];
0006
0007 save_dir = 'test/';
0008
0009 day = 1;
0010 cond = 4;
0011
0012 Dir = ['data0' num2str(day)];
0013
0014 bp = vb_set_bayes_default_parameters;
0015
0016
0017 bp.brainfile = ['MEG/' Dir '/brain/' sub '.brain.mat'];
0018 bp.areafile = ['MEG/' Dir '/brain/' sub '.area.mat'];
0019 bp.actfile = ['MEG/' Dir '/brain/' sub '.act.mat'];
0020
0021
0022 bp.area_key = 'Cortex';
0023 bp.act_key = '7_set1';
0024
0025 bp.prior_weight = 10e-5;
0026
0027
0028
0029
0030
0031 time_signal=[0 1];
0032 time_noise=[-0.5 0];
0033
0034 meg_data_file=[root 'MEG/' Dir '/meg/epoch/i' sub '_' num2str(cond) '_Both.meg.mat'];
0035 load(meg_data_file,'fileinfo')
0036 time=fileinfo.time;
0037
0038 [~,from]=min(abs(time-time_signal(1)));
0039 [~,to]=min(abs(time-time_signal(2)));
0040 bp.twin_meg = [from to];
0041 bp.Tperiod = to-from+1;
0042 bp.Tnext = to-from+1;
0043
0044 [~,from]=min(abs(time-time_noise(1)));
0045 [~,to]=min(abs(time-time_noise(2)));
0046 bp.twin_noise = [from to];
0047 bp.twin_baseline = [from to];
0048
0049
0050 bp.reduce=0.5;
0051 bp.reduce_global=0.5;
0052 bp.patch_norm = ON;
0053
0054 bp.Npre_train = 950;
0055 bp.Ntrain = 100;
0056
0057 bp.bayesfile=[save_dir 'day' num2str(day) '_' num2str(cond) '.bayes.mat'];
0058
0059
0060 bp.megfile{1}=['MEG/' Dir '/meg/epoch/i' sub '_' num2str(cond) '_Both.meg.mat'];
0061 bp.basisfile_meg=['MEG/' Dir '/basis/' sub '_both_noPCA.basis.mat'];
0062 bp.megfile_baseline=bp.megfile;
0063
0064
0065 bp.eegfile{1}=['EEG/' Dir '/eeg/epoch/i' sub '_' num2str(cond) '_Both.eeg.mat'];
0066 bp.basisfile_eeg = ['EEG/' Dir '/basis_eeg/bn0.62_sk0.03_sn0.62.basis.mat'];
0067 bp.eegfile_baseline=bp.eegfile;
0068
0069 bp = vb_set_noise_estimation_model(bp, root);
0070
0071 vb_job_vb_meeg(root, bp);
0072