Home > vbmeg > demo > tutorial_for_vbmeg2 > advanced > create_project.m

create_project

PURPOSE ^

Set paths and parameters for all the processes

SYNOPSIS ^

function p = create_project(sub)

DESCRIPTION ^

 Set paths and parameters for all the processes

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function p = create_project(sub)
0002 % Set paths and parameters for all the processes
0003 %
0004 % Copyright (C) 2011, ATR All Rights Reserved.
0005 % License : New BSD License(see VBMEG_LICENSE.txt)
0006 
0007 %% Set basic directories and files
0008 p = struct;
0009 p.sub = sub;
0010 p.proj_root = fullfile(cd, '..', 'analyzed_data', p.sub);% Directory to save analyzed data
0011 p.raw_data_root = fullfile(cd, '..', 'raw_data', p.sub);% Directory of raw data
0012 p.fmri_dirname = fullfile(cd, '..', 'fmri_result');% Directory of fMRI result
0013 p.fig_root = fullfile(cd, '..', 'figure');% Directory to save figures
0014 p.file_list = {'a1', 's1', 'v1', 'v2'};% EEG/MEG file names
0015 p.cond_list = [1 2 3 3];% 1 : Auditory task, 2 : Somatosensory task, 3 : Visual task
0016 p.task_list = {'a', 's', 'v'};% a : Auditory task, s : Somatosensory task, v : Visual task
0017 
0018 
0019 %% Parameters for analyzing data
0020 
0021 % For filtering EEG/MEG data
0022 p.bias_flg = 1; % Bias correction (=0/1/2: OFF/Bias/Linear)
0023 p.highpass = 0.4; % Highpass filter cutoff frequency [Hz]
0024 p.lowpass = 50; % Lowpass  filter cutoff frequency [Hz]
0025 p.fsamp = 1000;% down sampling frequency [Hz]
0026 p.highpass_online = 0; % order of online highpass filter (0=eegfilt)
0027 p.lowpass_online = 0; % order of online lowpass filter (0=eegfilt)
0028 p.common_flg = 0;% Common reference flag (=1/0 : ON/OFF)
0029 
0030 % For making trial data of EEG/MEG
0031 p.Pretrigger_ms = 1000; % before trigger [msec]
0032 p.Posttrigger_ms = 1000; % after trigger [msec]
0033 
0034 % For classifying ICs as noise or not
0035 p.threshold_ourlier = 1.64;
0036 p.threshold_num_of_outlier = 0.2;
0037 
0038 % For estimating source current
0039 % Priors on current variances for auditory, somatosensory, and visual tasks
0040 p.prior = {'Uniform', 'Uniform', 'visual_motion_parception_T'};
0041 p.prior_weight = [0.01 0.01 0.01];% Relative influence of prior information (0-1)
0042 
0043 % Host for calculating fiber tracking of dMRI
0044 % (Do not specify a host that runs this script.)
0045 % Available hosts: cbi-node20-33, cbi-node01g-08g, cbi-node20g-23g
0046 p.process_host = {'cbi-node20', 'cbi-node21', 'cbi-node22', 'cbi-node23',...
0047     'cbi-node24', 'cbi-node25', 'cbi-node26', 'cbi-node03g', 'cbi-node07g', 'cbi-node08g'};
0048 
0049 % The number of MATLAB processes for calculating fiber tracking of dMRI
0050 p.Nworker = 20;
0051 
0052 
0053 %% File and directory name
0054 
0055 % For brain modeling
0056 p.t1_dicom_dir = fullfile(p.raw_data_root, 'T1');% T1 dicom data directory
0057 p.t1_dicom_extension = '.dcm';
0058 p.t1_dirname = 'struct';
0059 p.struct_name = 'Subject';
0060 p.fs_dirname = 'freesurfer';
0061 p.brain_dirname = 'brain';
0062 
0063 % For EEG/MEG preprocessing
0064 p.eeg_dirname='eeg';
0065 p.meg_dirname='meg';
0066 p.load_dirname='loaded';
0067 p.denoise_dirname='denoised';% For MEG data
0068 p.filter_dirname='filtered';
0069 p.trial_dirname='trial';
0070 p.ica_dirname = 'ica';
0071 
0072 % For source current estimation
0073 p.leadfield_dirname = 'leadfield';
0074 p.current_dirname = 'current';
0075 p.meeg_dirname = 'meeg';% For source current estimation from EEG and MEG
0076 
0077 % For dMRI processing
0078 p.dmri_dirname = 'dmri';
0079 p.dmri_dicom_dir = fullfile(p.raw_data_root, 'dMRI');% dMRI dicom data directory
0080 p.dmri_basename = 'data_dmri';
0081 p.FA_coreg_basename = 'data_FA_coreg';
0082 p.transform_info_dirname = 'transwarp_info';
0083 p.FA_basename = 'data_FA';
0084 p.parcels_dirname = 'parcels';
0085 p.parcels_file = 'parcels.mat';
0086 p.fiber_track_dirname = 'fibertrack';
0087 p.fiber_resp_area_file = 'sf.nii.gz';
0088 p.fiber_mif_file = 'CSD6.mif';
0089 p.fiber_mask_file = 'parcel_wm.nii.gz';
0090 p.anat_matrix_file = 'anat_matrix.mat';
0091 p.connectivity_dirname = 'connectivity';
0092 p.connectivity_file = 'connectivity.dmri.mat';
0093 
0094 % For connectome dynamics
0095 p.dynamics_dirname = 'dynamics';
0096 p.roi_current_dirname = 'roi_current';
0097 p.dynamics_model_dirname = 'model';
0098 
0099 % For creating movie showing signal flows
0100 p.input_for_movie_dirname = 'input_for_movie';
0101 p.movie_dirname = 'movie';
0102

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