Home > functions > job > vb_job_calc_scalo.m

vb_job_calc_scalo

PURPOSE ^

---

SYNOPSIS ^

function vb_job_calc_scalo(currfile,scalofile)

DESCRIPTION ^

 ---
 function vb_job_calc_scalo(currfile,scalofile)

 This function calculates scalograms of time courses for all
 trials included in specified area current file. 

 Input parameters are as follows: 
 - currfile : .curr.mat file. 
 - scalofile: .scalo.mat file into which results are saved. 

 The following variables are saved into the scalogram file. 

 scl     : Scalogram.
 scl_freq: Frequencies of scalogram. 
 scl_time: Time points of scalogram. 

 Example
 
 currfile = './NG/data/result3_col_fMTl_1.curr.mat';
 scalofile = './NG/data/result3_col_fMTl_1.scalo.mat';
 vb_job_calc_scalo(currfile,scalofile);

 2004-10-14 Taku Yoshioka
 ---

 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 vb_job_calc_scalo(currfile,scalofile)
0002 % ---
0003 % function vb_job_calc_scalo(currfile,scalofile)
0004 %
0005 % This function calculates scalograms of time courses for all
0006 % trials included in specified area current file.
0007 %
0008 % Input parameters are as follows:
0009 % - currfile : .curr.mat file.
0010 % - scalofile: .scalo.mat file into which results are saved.
0011 %
0012 % The following variables are saved into the scalogram file.
0013 %
0014 % scl     : Scalogram.
0015 % scl_freq: Frequencies of scalogram.
0016 % scl_time: Time points of scalogram.
0017 %
0018 % Example
0019 %
0020 % currfile = './NG/data/result3_col_fMTl_1.curr.mat';
0021 % scalofile = './NG/data/result3_col_fMTl_1.scalo.mat';
0022 % vb_job_calc_scalo(currfile,scalofile);
0023 %
0024 % 2004-10-14 Taku Yoshioka
0025 % ---
0026 %
0027 % Copyright (C) 2011, ATR All Rights Reserved.
0028 % License : New BSD License(see VBMEG_LICENSE.txt)
0029 
0030 %
0031 % Do not modify following lines
0032 %
0033 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0034 
0035 % Load current time courses
0036 MEGinfo = vb_load_meg_info(currfile);
0037 load(currfile,'J','Tstart');
0038 
0039 if size(J,1)>1
0040   error(['Estimated current in an area must be summarized into ' ...
0041      'single time course.'])
0042 end
0043 
0044 JJ = [];
0045 for i = 1:size(J,3)
0046   JJ = [JJ; J(1,:,i)];
0047 end
0048 
0049 [scl,scl_frq,scl_time] = mk_tfrscalo(JJ',MEGinfo.sampf);
0050 scl_time = scl_time+Tstart/MEGinfo.sampf*1000;
0051 
0052 % Save
0053 vb_fsave(scalofile,'scl','scl_frq','scl_time');
0054

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005