Home > vbmeg > functions > device > meg > vb_meg_adjust_sensor.m

vb_meg_adjust_sensor

PURPOSE ^

adjust sensor information according to ch_idx

SYNOPSIS ^

function [pick, Qpick, MEGinfo] =vb_meg_adjust_sensor(pick, Qpick, ch_idx, MEGinfo)

DESCRIPTION ^

 adjust sensor information according to ch_idx

 [usage]
   [pick, Qpick, MEGinfo] = ...
     vb_meg_adjust_sensor(pick, Qpick, ch_idx, MEGinfo)

 [input]
      pick : <required> [Ncoil x 3] pick before adjusting
     Qpick : <required> [Ncoil x 3] Qpick before adjusting
    ch_idx : <required> [Nsensor_new x 1] index of valid channels
   MEGinfo : <required> <<struct>> before sensor_weight is updated

 [output]
      pick : [Ncoil_new x 3] pick after adjusting
     Qpick : [Ncoil_new x 3] Qpick after adjusting
   MEGinfo : <<struct>> updated sensor_weight [Nsensor_new x Ncoil_new]

 [note]
   
 [history]
   2008-04-22 (Sako) initial version
   2009-07-13 (Sako) modified to arrange by using ch_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:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function [pick, Qpick, MEGinfo] = ...
0002   vb_meg_adjust_sensor(pick, Qpick, ch_idx, MEGinfo)
0003 % adjust sensor information according to ch_idx
0004 %
0005 % [usage]
0006 %   [pick, Qpick, MEGinfo] = ...
0007 %     vb_meg_adjust_sensor(pick, Qpick, ch_idx, MEGinfo)
0008 %
0009 % [input]
0010 %      pick : <required> [Ncoil x 3] pick before adjusting
0011 %     Qpick : <required> [Ncoil x 3] Qpick before adjusting
0012 %    ch_idx : <required> [Nsensor_new x 1] index of valid channels
0013 %   MEGinfo : <required> <<struct>> before sensor_weight is updated
0014 %
0015 % [output]
0016 %      pick : [Ncoil_new x 3] pick after adjusting
0017 %     Qpick : [Ncoil_new x 3] Qpick after adjusting
0018 %   MEGinfo : <<struct>> updated sensor_weight [Nsensor_new x Ncoil_new]
0019 %
0020 % [note]
0021 %
0022 % [history]
0023 %   2008-04-22 (Sako) initial version
0024 %   2009-07-13 (Sako) modified to arrange by using ch_idx
0025 %
0026 % Copyright (C) 2011, ATR All Rights Reserved.
0027 % License : New BSD License(see VBMEG_LICENSE.txt)
0028 
0029 % --- CHECK ARGUMENTS --- %
0030 if ~exist('pick', 'var'), pick = []; end
0031 if ~exist('Qpick', 'var'), Qpick = []; end
0032 if ~exist('ch_idx', 'var'), ch_idx = []; end
0033 if ~exist('MEGinfo', 'var'), MEGinfo = []; end
0034 [pick, Qpick, ch_idx, MEGinfo] = ...
0035   inner_check_arguments(pick, Qpick, ch_idx, MEGinfo);
0036 
0037 % --- MAIN PROCEDURE --------------------------------------------------------- %
0038 %
0039 
0040 % --- select channels
0041 wgt = MEGinfo.sensor_weight(ch_idx,:);
0042 
0043 % --- select sensor coils corresponding to the selected channels
0044 jx = find(sum(abs(wgt),1) > 0);
0045 pick = pick(jx,:);
0046 Qpick = Qpick(jx,:);
0047 
0048 MEGinfo.sensor_weight = MEGinfo.sensor_weight(ch_idx,jx);
0049 return;
0050 %
0051 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0052 
0053 % --- INNER FUNCTIONS -------------------------------------------------------- %
0054 %
0055 % --- inner_check_arguments()
0056 %
0057 function [pick, Qpick, ch_idx, MEGinfo] = ...
0058   inner_check_arguments(pick, Qpick, ch_idx, MEGinfo)
0059 % --- require no check for now
0060 return;
0061 %
0062 % --- end of inner_check_arguments()
0063 %
0064 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0065 
0066 % --- END OF FILE --- %

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