Home > vbmeg > functions > tool_box > meeg_open_code > make_bayes_meeg.m

make_bayes_meeg

PURPOSE ^

SYNOPSIS ^

function make_bayes_meeg

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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 % --- Input file (relative path from proj_root)
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 % --- Specify current area and fMRI activity
0022 bp.area_key  = 'Cortex';
0023 bp.act_key = '7_set1';
0024 %bp.act_key = 'Uniform';
0025 bp.prior_weight = 10e-5;
0026 
0027 %bp.noise_estimation_model = 2; %update_sx = 0;
0028 %bp.noise_estimation_model = 5; %update_sx = 0; %noise model = Identiby matrix
0029 
0030 % --- Specify time window
0031 time_signal=[0 1]; % Time window for analysis
0032 time_noise=[-0.5 0]; % Time window for noise
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]; % Time window for analysis
0041 bp.Tperiod   = to-from+1; % Time period for current estimation
0042 bp.Tnext     = to-from+1; % Time step for next period
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 % Reduce vertex
0050 bp.reduce=0.5;
0051 bp.reduce_global=0.5;
0052 bp.patch_norm = ON;
0053 %bp.trial_average=ON;
0054 bp.Npre_train = 950;
0055 bp.Ntrain = 100;
0056 
0057 bp.bayesfile=[save_dir 'day' num2str(day) '_' num2str(cond) '.bayes.mat'];
0058 
0059 %MEG
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 %EEG
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

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005