Home > vbmeg > functions > estimation > bayes > vb_megdata_preparation.m

vb_megdata_preparation

PURPOSE ^

Prepare MEG data from bayes_parm.

SYNOPSIS ^

function [B,Ntrials,Nsensors,Tsample,Twindow,Tmsec] =vb_megdata_preparation(bayes_parm)

DESCRIPTION ^

 Prepare MEG data from bayes_parm.

 [history]
 2008-10-14 Taku Yoshioka
 2011-05-11 taku-y
  [minor] New output variable 'Tmsec' was added. This is a vector of
  actual time of row of B{n}. 
 2011-11-16 taku-y
  [major] Offset of time index was corrected. 

 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 [B,Ntrials,Nsensors,Tsample,Twindow,Tmsec] = ...
0002     vb_megdata_preparation(bayes_parm)
0003 % Prepare MEG data from bayes_parm.
0004 %
0005 % [history]
0006 % 2008-10-14 Taku Yoshioka
0007 % 2011-05-11 taku-y
0008 %  [minor] New output variable 'Tmsec' was added. This is a vector of
0009 %  actual time of row of B{n}.
0010 % 2011-11-16 taku-y
0011 %  [major] Offset of time index was corrected.
0012 %
0013 % Copyright (C) 2011, ATR All Rights Reserved.
0014 % License : New BSD License(see VBMEG_LICENSE.txt)
0015 
0016 % fields of bayes_parm used in this function
0017 vb_struct2vars(bayes_parm,{'megfile', 'twin_meg', 'temporal_filter', ...
0018     'trial_average','Tperiod','Tnext','ix_trial'})
0019 
0020 % Get MEG data for all sessions
0021 [B,Ntrials,Nsensors,Tsample,Tmsec] =...
0022     vb_get_megdata(megfile,twin_meg,temporal_filter,trial_average, ...
0023                    ix_trial);
0024 
0025 % offset
0026 if length(Tnext) > 1, 
0027     Tnext = Tnext-twin_meg(1)+1;
0028 end
0029 
0030 % Time window
0031 Twindow = vb_calc_timewindow(Tsample,Tperiod,Tnext);
0032 
0033 return;

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