Home > fmri > simulate > get_exp_info_event.m

get_exp_info_event

PURPOSE ^

get_exp_info.m

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 get_exp_info.m

 See get_exp_info_block.m for more annotations throughout the script

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % get_exp_info.m
0002 %
0003 % See get_exp_info_block.m for more annotations throughout the script
0004 %
0005 
0006 % 2003, Petr Janata
0007 
0008 ntt = 0;
0009 
0010 ntt = ntt+1;
0011 tinfo.id{ntt} = 'F1L1_F2L1';            
0012 tinfo.num_trials(ntt) = 12;
0013 
0014 ntt = ntt+1;
0015 tinfo.id{ntt} = 'F1L1_F2L2';            
0016 tinfo.num_trials(ntt) = 12;
0017 
0018 ntt = ntt+1;
0019 tinfo.id{ntt} = 'F1L2_F2L1';            
0020 tinfo.num_trials(ntt) = 12;
0021 
0022 ntt = ntt+1;
0023 tinfo.id{ntt} = 'F1L2_F2L2';            
0024 tinfo.num_trials(ntt) = 12;
0025 
0026 ntt = ntt+1;
0027 tinfo.id{ntt} = 'F1L3_F2L1';            
0028 tinfo.num_trials(ntt) = 6;
0029 
0030 ntt = ntt+1;
0031 tinfo.id{ntt} = 'F1L3_F2L2';            
0032 tinfo.num_trials(ntt) = 6;
0033 
0034 ntt = ntt+1;
0035 tinfo.id{ntt} = 'F1L4_F2L1';        
0036 tinfo.num_trials(ntt) = 6;
0037 
0038 ntt = ntt+1;
0039 tinfo.id{ntt} = 'F1L4_F2L2';        
0040 tinfo.num_trials(ntt) = 6;
0041 
0042 ntt = ntt+1;
0043 tinfo.id{ntt} = 'Sil';            
0044 tinfo.num_trials(ntt) = 0; 
0045 
0046 trials_per_iteration = sum(tinfo.num_trials);
0047 
0048 num_iterations = 2;
0049 
0050 nslices = 18;
0051 min_ms_per_slice = 100;
0052 
0053 TR = nslices*min_ms_per_slice;
0054 
0055 notes_per_seq = 8;
0056 ms_per_note = 700;
0057 resp_period = 2000;
0058 prime_dur = (notes_per_seq-1)*ms_per_note;
0059 
0060 cue_dur = 500;
0061 cue_stim_soa_range = [1000 2000];
0062 inter_trial_interval_range = [1*TR 3*TR]*1;
0063 
0064 mag_stabilize_s = 30;
0065 
0066 total_trials = trials_per_iteration * num_iterations
0067 stim_dur = notes_per_seq*ms_per_note + resp_period;
0068 
0069 cue_stim_soa_list = ...
0070     rand(1,total_trials)*diff(cue_stim_soa_range)+min(cue_stim_soa_range);
0071 trial_durs = cue_stim_soa_list + stim_dur;
0072 pure_stim_time = sum(trial_durs);
0073 
0074 iti_list = rand(1,total_trials)*diff(inter_trial_interval_range)+min(inter_trial_interval_range);
0075 total_jitter_time = sum(iti_list);
0076 
0077 total_time_s = (pure_stim_time+total_jitter_time)/1000
0078 total_time_min = total_time_s/60
0079 
0080 % Construct trial orders for each iteration
0081 
0082 trial_type_list = [];
0083 for itt = 1:ntt
0084   trial_type_list(end+1:end+tinfo.num_trials(itt)) = itt;
0085 end % for itt
0086 
0087 % Randomly permute the trial type list
0088 trial_list = trial_type_list(randperm(length(trial_type_list)));
0089 
0090 % Calculate onsets
0091 onsets = cumsum(iti_list + trial_durs)-(iti_list(1)+trial_durs(1));
0092 
0093 scans_per_iteration = ceil((total_time_s*1000/num_iterations)/TR)

Generated on Thu 23-May-2019 04:00:50 by m2html © 2003