Home > functions > device > meg > vb_meginfo_get_read_channels.m

vb_meginfo_get_read_channels

PURPOSE ^

return channel list to be read by channel list and read switch

SYNOPSIS ^

function [read_ch, idx] = vb_meginfo_get_read_channels(meginfo,ch_list, read_swt, active_swt)

DESCRIPTION ^

 return channel list to be read by channel list and read switch
 [usage]
   [read_ch, idx] = vb_meginfo_get_read_channels(...
     meginfo, ch_list, read_swt, active_swt)
 [input]
      meginfo : <<struct>> MEGinfo
      ch_list : [Nchannel x 1] list of channel labels
     read_swt : <<boolean>> 'ch_list' is to be read or to be omitted?
              :   true) read
              :  false) omitted
   active_swt : <<boolean>> target channels are only active or not
              :   true) only active
              :  false) all the channels
 [output]
      read_ch : channel list to be read
       idx_ch : index list of base_list (in meginfo) to be read
 [note]
   basically arguments are not be checked
 [history]
   2008-04-28 (Sako) initial version
   2010-11-15 (Sako) added return value 'idx'

 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 [read_ch, idx] = vb_meginfo_get_read_channels(meginfo, ...
0002   ch_list, read_swt, active_swt)
0003 % return channel list to be read by channel list and read switch
0004 % [usage]
0005 %   [read_ch, idx] = vb_meginfo_get_read_channels(...
0006 %     meginfo, ch_list, read_swt, active_swt)
0007 % [input]
0008 %      meginfo : <<struct>> MEGinfo
0009 %      ch_list : [Nchannel x 1] list of channel labels
0010 %     read_swt : <<boolean>> 'ch_list' is to be read or to be omitted?
0011 %              :   true) read
0012 %              :  false) omitted
0013 %   active_swt : <<boolean>> target channels are only active or not
0014 %              :   true) only active
0015 %              :  false) all the channels
0016 % [output]
0017 %      read_ch : channel list to be read
0018 %       idx_ch : index list of base_list (in meginfo) to be read
0019 % [note]
0020 %   basically arguments are not be checked
0021 % [history]
0022 %   2008-04-28 (Sako) initial version
0023 %   2010-11-15 (Sako) added return value 'idx'
0024 %
0025 % Copyright (C) 2011, ATR All Rights Reserved.
0026 % License : New BSD License(see VBMEG_LICENSE.txt)
0027 
0028 if ~exist('active_swt', 'var'), active_swt = []; end
0029 if isempty(active_swt), active_swt = false; end;
0030 
0031 % ----- "base_list" is filtered by ActiveChannel if prescribed
0032 base_list = vb_meginfo_get_channel_label_whole(meginfo, active_swt);
0033 
0034 % ----- matching specified channel list and filtered chanel list
0035 [read_ch, idx] = vb_util_get_labels_to_read(base_list, ch_list, read_swt);
0036 return
0037 
0038 %%% END OF FILE %%%

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