vbmeg2_job_functions
vb_job_brain
Description
Convert FreeSurfer data to VBMEG format.
Syntax
vb_job_brain(proj_root,brain_parm)
Output files
- VBMEG Cortical model file (.brain.mat)
- VBMEG Cortical act file (.act.mat)
- VBMEG Cortical area file (.area.mat)
For anatomical area display.
- VBMEG Cortical area files
- AAL-area file (_aal.area.mat) : AAL maps
- Destrieux-area file (_Destrieux.area.mat) : freesurfer(.aparc.a2009s.annot)
- Desikan-Killany-area file (_Desikan-Killany.area.mat) : freesurfer(.aparc.annot)
- Yeo2011_7Networks-area file (_Yeo2011_7Networks.area.mat) : freesurfer(.Yeo2011_7Networks_N1000.annot)
- Yeo2011_17Networks-area file (_Yeo2011_17Networks.area.mat) : freesurfer(.Yeo2011_17Networks_N1000.annot)
Parameters
- proj_root
- VBMEG project root directory.
- brain_parm
- <<structure>> The fields are as below. In order to get the default parameters, execute vb_set_brain_parm.
- .analyze_file
- <<string>> MRI filename (.nii/.hdr)
- .FS_left_file
- <<string>> FreeSurfer left smooth white matter file.
- .FS_right_file
- <<string>> FreeSufer right smooth white matter file.
- .FS_left_infl_file
- <<string>> FreeSurfer left inflate model file.
- .FS_right_infl_file
- <<string>> FreeSurfer right inflate model file.
- .FS_left_curv_file
- <<string>> FreeSurfer left curvature file.
- .FS_right_curv_file
- <<string>> FreeSurfer right curvature file.
- .FS_left_label_file
- <<string>> FreeSurfer left label file.
- .FS_right_label_file
- <<string>>FreeSurfer right label file.
- .FS_left_sphere_file
- <<string>>FreeSurfer left sphere file.
- .FS_right_sphere_file
- <<string>> FreeSurfer right sphere file.
- .brain_file
- <<string>> Cortical surface model file (.brain.mat).
- .act_file
- <<string>> Cortical activity map file (.act.mat).
- .area_file
- <<string>>Cortical area file (.area.mat).
Remarks : Describe brain_file, act_file, area_file in a relative path from proj_root.
vb_job_head_3shell
Description
Make 1-shell(CSF) for MEG or 3-shell(CSF, Skull, Scalp) surface model for EEG.
syntax
vb_job_head_3shell(proj_root, head_parm)
Output file
- VBMEG Head model file (.head.mat)
Parameters
- proj_root
- VBMEG project root directory.
- head_parm
- <<structure>> The fields are as below. In order to get the default parameters, execute vb_set_head_parm.
- .analyze_file
- <<string>> MRI filename (.nii/.hdr)
- .fs_scalp_file
- <<string>> FreeSurfer outer skin surface file.
- .gray_file
- <<string>> Gray matter file created by SPM8 Segment function(='c1**.nii/.hdr');
- .freesurf_file
- <<string>> FreeSurfer inner skull surface file.
- .brain_file
- <<string>> Cortical surface model file (.brain.mat).
- .Nsurf
- <<integer>> Head model type
=1:CSF model(for MEG)
=3:3shell model(for EEG) - .Nvertex
- <<integer>> The number of vertices of each head tissue model.
- .head_file
- <<string>> Head model file(.head.mat)
Remarks : Describe brain_file, head_file in a relative path from proj_root.
vb_job_fmri
Description
Import fMRI activities as a prior information.
Syntax
vb_job_fmri(proj_root, fmri_parm)
Update files
- VBMEG Cortical act file (.act.mat) : fMRI activity (T value, PS value) is saved.
- VBMEG Cortical area file (.area.mat) : The location where the fMRI activity exists is saved.
Parameters
- proj_root
- VBMEG project root directory.
- fmri_parm
- <<structure>> The fields are as below. In order to get the default parameters, execute vb_set_fmri_parm.
- .SPMmat_file
- <<string>> SPM result file(SPM.mat)
- .SPMmapmode
- <<string>> SPM result map mode(fMRI coordinate to VBMEG Cortical model).
= 'mni2mni' : SPM analysis was conducted on the MNI template brain model. - .keys_postfix
- <<string>> postfix of keys of fmri activity that will be stored to VBMEG act and area files.
- .Tthres
- <<real>> T-value threshold(one-sided) (no unit)
- .PSthres
- <<real>> Parcent signal change threshold(two-sided) (unit: %s)
- .Rthres
- <<real>> Radius threshold for converting a voxel image to a surface image(unit:mm)
- .brain_file
- <<string>> Cortical surface model file (.brain.mat).
- .act_file
- <<string>> Cortical activity map file (.act.mat).
- .area_file
- <<string>>Cortical area file (.area.mat).
Remarks : Describe brain_file, act_file, area_file in a relative path from proj_root.
vb_job_meg
Description
Import M/EEG data and create VBMEG MEG (.meg.mat) or EEG (.eeg.mat) file.
Supported measurement data are
- MEG
- Yokogawa
- Neuromag (Neuromag toolbox)
- EEG
- Biosemi
- BrainAmp
If this function is not compatible with your device, you can create a file with reference to this document.
Syntax
vb_job_meg(proj_root, meg_parm)
Output file
- VBMEG MEG-MAT file (.meg.mat) or VBMEG EEG-MAT file (.eeg.mat)
Parameters for Yokogawa MEG
- proj_root
- VBMEG project root directory.
- meg_parm
- <<structure>> The fields are as below. In order to get the default parameters, execute vb_set_yokogawa_meg_parm.
- .Measurement
- <<string>> hardware type (set 'MEG').
- .device
- <<string>> device type (set 'YOKOGAWA').
- .yokogawa_file
- <<string>> Yokogawa MEG file(.con/.raw/.ave).
- .pos_file
- <<string>> sensor location file(.pos.mat).
This is made by positioning program. - .meg_file
- <<string>> VBMEG MEG file (.meg.mat)
Remarks : Describe meg_file in a relative path from proj_root.
Parameters for Biosemi EEG
- proj_root
- VBMEG project root directory.
- meg_parm
- <<structure>> The fields are as below. In order to get the default parameters, execute vb_set_meg_parm_brainamp.
- .Measurement
- <<string>> hardware type (set to 'EEG').
- .device
- <<string>> device type(set to 'BIOSEMI').
- .measurement_file
- <<string>> Biosemi EEG file(.bdf).
- .pos_file
- <<string>> sensor location file(.pos.mat).
This is made by positioning program. - .output_file
- <<string>> VBMEG EEG file (.eeg.mat).
Remarks : Describe output_file in a relative path from proj_root.
Parameters for BrainAmp
- meg_parm
- <<structure>> The fields are as below. In order to get the default parameters, execute vb_set_meg_parm_brainamp.
- .Measurement
- <<string>> hardware type (set to 'EEG').
- .device
- <<string>> device type(set to 'BRAINAMP').
- .measurement_file
- <<string>> BrainAmp EEG file(.eeg).
- .pos_file
- <<string>> sensor location file(.pos.mat).
This is made by positioning program. - .output_file
- <<string>> VBMEG EEG file (.eeg.mat).
Remarks : Describe output_file in a relative path from proj_root.
vb_job_leadfield
Description
Calculate leadfield matrix for using the following numerical methods:
- MEG Sphere model (Sarvas equation)
- MEG 1-shell BEM (boundary element method)
- MEG Spherical harmonics expansion
- EEG 3-shell Sphere model
- EEG 3-shell BEM
Syntax
vb_job_leadfield(proj_root, basis_parm)
Output file
- VBMEG Leadfield file (.basis.mat)
Parameters
- proj_root
- VBMEG project root directory.
- basis_parm
- <<structure>> The fields are as below. In order to get the default parameters, execute vb_set_basis_parm.
- .brain_file
- <<string>> Cortical surface model file (.brain.mat).
- .meg_file
- <<string>> VBMEG MEG/EEG file (.meg.mat/.eeg.mat).
- .bem_mode
- <<integer>> calculation methods.
0:MEG Sphere model (Sarvas)
1:MEG 1-shell BEM
2:MEG Spherical harmonics expansion
3:EEG 3-shell Sphere model
4:EEG 3-shell BEM - .head_file
- <<string>> (optional) VBMEG head model file (.head.mat). This is used for BEM method.
- .basis_file
- <<string>> VBMEG leadfield file (.basis.mat)
Remarks : Describe brain_file, meg_file, head_file, basis_file in a relative path from proj_root.
vb_job_vb
Description
Compute current variance from the M/EEG data using Hierarchical bayesian method.
Syntax
vb_job_vb(proj_root, bayes_parm)
Output file
- VBMEG Current variance file (.bayes.mat)
Parameters
- proj_root
- VBMEG project root directory.
- bayes_parm
- <<structure>> The fields are as below. In order to get the default parameters, execute vb_set_bayes_default_parameters.
- .brainfile
- <<string>> Cortical surface model file (.brain.mat).
- .reduce
- <<real>> Parameter for spatially uniformly thinning the number of vertices of the brain model. 0.1 corresponds to setting the number of vertices to 1/10.
- .Rfilt
- <<real>> Smoothing filter radius in [m]
- .basisfile
- <<string>> VBMEG leadfield file (.basis.mat)
- .areafile
- <<string>> VBMEG Cortical area file (.area.mat).
- .area_key
- <<string>> The key for specifying the area to assume the current source.
- .actfile
- <<string>> VBMEG Cortical activity file (.act.mat).
- .act_key
- <<string>> A key to specify which fMRI strength information of the activity contained in actfile to use as prior information.
- .prior_weight
- <<real>> Relative influence of prior information on data(from 0 to 1 real).
- .a0_act
- <<real>> Maximum value of current variance parameter.
- .megfile
- <<string or cell string>> VBMEG MEG/EEG file (.meg.mat/.eeg.mat).
- .twin_meg
- <<vector>> Analysis time range(twin_meg = [from, to])(unit:sample). from, to is the sample number of the data specified in bayes_parm.meg_file.
- .Tnext
- <<integer>> Partial time window length of MEG data(unit:sample).
- .Tperiod
- <<integer>> Moving step length of partial time of MEG data(unit:sample).
- .twin_noise
- <<vector>> Observation noise covariance matrix is calculated using MEG data bayes_parm.megfile within this time window, specified by start and end.
- .twin_baseline
- <<vector>> Baseline observation noise variance (rho_{base}) and baseline current variance parameter (nu_{0,base}) are estimated from MEG data within the time window, specified by start and end.
- .Npre_train
- <<integer>> Iteration number of fast VB algorithm.
- .Ntrain
- <<integer>> Iteration number of VB algorithm.
- .skip
- <<integer>> Calculate free energy at each skip steps.
- .trial_average
- <<integer>> If true, trial average is applied to the MEG data.
- .patch_norm
- <<bool>> If true, patch area normalization is applied. That is, dipole current moment (Am) is replaced by its (area) density (Am/m^2).
- .noise_reg
- <<real>> Regularization parameter for observarion noise covariance matrix. This value is used to suppress singularity of the covariance matrix.
- .bayesfile
- <<string>> VBMEG Current variance file (.bayes.mat).
Remarks : Describe brainfile, areafile, actfile, megfile, bayesfile in a relative path from proj_root.
vb_job_current
Description
Calculate cortical current from the estimated current variance and M/EEG data.
Syntax
vb_job_current(proj_root, current_parm)
Output file(s)
- VBMEG Cortical current file (.curr.mat)
(if you specify current_parm.jactdir, the estimated current for each trial is saved for each file under the specified directory.)
Parameters
- proj_root
- VBMEG project root directory.
- current_parm
- <<structure>> The fields are as below. In order to get the default parameters, execute vb_set_current_parm.
- .bayesfile
- <<string>> VBMEG Current variance file (.bayes.mat).
- .trial_average
- <<integer>>
0:Calculate current for each trial.
1:Calculate current over all trials. - .currfile
- <<string>> VBMEG Cortical current file (.curr.mat)
- .jactdir
- <<string>> (optional) If current for each trial is calculated (trial_average = OFF), data size exceed the maximum memory or file size limit, specify this output directory, then save current file for each trial.
Remarks : Describe bayesfile, currfile in a relative path from proj_root.