Home > fmri > simulate > get_exp_info.m

get_exp_info

PURPOSE ^

get_exp_info.m

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 get_exp_info.m

 Contains design matrix info for the I_IV_B experiment for the magnet

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % get_exp_info.m
0002 %
0003 % Contains design matrix info for the I_IV_B experiment for the magnet
0004 %
0005 
0006 ntt = 0;
0007 
0008 ntt = ntt+1;
0009 tinfo.id{ntt} = 'I_C';            % Tonic, Consonant
0010 tinfo.num_trials(ntt) = 12;
0011 
0012 ntt = ntt+1;
0013 tinfo.id{ntt} = 'I_D';            % Tonic, Dissonant
0014 tinfo.num_trials(ntt) = 12;
0015 
0016 ntt = ntt+1;
0017 tinfo.id{ntt} = 'IV_C';            % Sub-dominant, Consonant
0018 tinfo.num_trials(ntt) = 12;
0019 
0020 ntt = ntt+1;
0021 tinfo.id{ntt} = 'IV_D';            % Sub-dominant, Dissonant
0022 tinfo.num_trials(ntt) = 12;
0023 
0024 ntt = ntt+1;
0025 tinfo.id{ntt} = 'BI_C';            % Baseline, matched to I, Consonant
0026 tinfo.num_trials(ntt) = 6;
0027 
0028 ntt = ntt+1;
0029 tinfo.id{ntt} = 'BI_D';            % Baseline, matched to I, Dissonant
0030 tinfo.num_trials(ntt) = 6;
0031 
0032 ntt = ntt+1;
0033 tinfo.id{ntt} = 'BIV_C';        % Baseline, matched to IV, Consonant
0034 tinfo.num_trials(ntt) = 6;
0035 
0036 ntt = ntt+1;
0037 tinfo.id{ntt} = 'BIV_D';        % Baseline, matched to IV, Dissonant
0038 tinfo.num_trials(ntt) = 6;
0039 
0040 ntt = ntt+1;
0041 tinfo.id{ntt} = 'Sil';            % Silence
0042 tinfo.num_trials(ntt) = 36; % 24
0043 
0044 trials_per_iteration = sum(tinfo.num_trials);
0045 
0046 num_iterations = 2;
0047 
0048 nslices = 18;
0049 min_ms_per_slice = 100;
0050 
0051 TR = nslices*min_ms_per_slice;
0052 
0053 notes_per_seq = 8;
0054 ms_per_note = 700;
0055 resp_period = 2000;
0056 prime_dur = (notes_per_seq-1)*ms_per_note;
0057 
0058 cue_dur = 500;
0059 cue_stim_soa_range = [1000 2000];
0060 inter_trial_interval_range = [1*TR 3*TR];
0061 
0062 mag_stabilize_s = 30;
0063 
0064 total_trials = trials_per_iteration * num_iterations
0065 stim_dur = notes_per_seq*ms_per_note + resp_period;
0066 
0067 cue_stim_soa_list = ...
0068     rand(1,total_trials)*diff(cue_stim_soa_range)+min(cue_stim_soa_range);
0069 trial_durs = cue_stim_soa_list + stim_dur;
0070 pure_stim_time = sum(trial_durs);
0071 
0072 iti_list = rand(1,total_trials)*diff(inter_trial_interval_range)+min(inter_trial_interval_range);
0073 total_jitter_time = sum(iti_list);
0074 
0075 total_time_s = (pure_stim_time+total_jitter_time)/1000
0076 total_time_min = total_time_s/60
0077 
0078 % Construct trial orders for each iteration
0079 
0080 trial_type_list = [];
0081 for itt = 1:ntt
0082   trial_type_list(end+1:end+tinfo.num_trials(itt)) = itt;
0083 end % for itt
0084 
0085 % Randomly permute the trial type list
0086 trial_list = trial_type_list(randperm(length(trial_type_list)));
0087 
0088 % Calculate onsets
0089 onsets = cumsum(iti_list + trial_durs)-(iti_list(1)+trial_durs(1));
0090 
0091 scans_per_iteration = ceil((total_time_s*1000/num_iterations)/TR)

Generated on Sat 25-May-2019 04:00:51 by m2html © 2003