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

vb_meginfo_set_acqfile

PURPOSE ^

MEGinfo setter for acquisition file path

SYNOPSIS ^

function [meg_info] = vb_meginfo_set_acqfile(meg_info, acq_file)

DESCRIPTION ^

 MEGinfo setter for acquisition file path
 [usage]
   [meg_info] = vb_meginfo_set_acqfile(meg_info, acq_file)
 [input]
   meg_info : <optional> <<struct>> MEG information []
   acq_file : <optional> <<file>> acquisition file path []
 [output]
   meg_info : updated MEG information struct
            :  the data is stored in 'acq_info' as 'data_file' field
 [note]
   if meg_info is empty, this program creates new meg_info
   The new standard format was defined. (2011-05)
 [history]
   2007-06-12 (Sako) initial version
   2008-01-31 (Sako) modified slightly
   2011-05-26 (Sako) modified according to the new format

 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 [meg_info] = vb_meginfo_set_acqfile(meg_info, acq_file)
0002 % MEGinfo setter for acquisition file path
0003 % [usage]
0004 %   [meg_info] = vb_meginfo_set_acqfile(meg_info, acq_file)
0005 % [input]
0006 %   meg_info : <optional> <<struct>> MEG information []
0007 %   acq_file : <optional> <<file>> acquisition file path []
0008 % [output]
0009 %   meg_info : updated MEG information struct
0010 %            :  the data is stored in 'acq_info' as 'data_file' field
0011 % [note]
0012 %   if meg_info is empty, this program creates new meg_info
0013 %   The new standard format was defined. (2011-05)
0014 % [history]
0015 %   2007-06-12 (Sako) initial version
0016 %   2008-01-31 (Sako) modified slightly
0017 %   2011-05-26 (Sako) modified according to the new format
0018 %
0019 % Copyright (C) 2011, ATR All Rights Reserved.
0020 % License : New BSD License(see VBMEG_LICENSE.txt)
0021 
0022 % --- CHECK ARGUMENTS --- %
0023 if ~exist('meg_info', 'var'), meg_info = []; end
0024 if ~exist('acq_file', 'var'), acq_file = []; end
0025 [meg_info, acq_file] = inner_check_arguments(meg_info, acq_file);
0026 
0027 % --- MAIN PROCEDURE --------------------------------------------------------- %
0028 %
0029 meg_info.device_info.acq_info.data_file = acq_file;
0030 return;
0031 %
0032 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0033 
0034 % --- INNER FUNCTIONS -------------------------------------------------------- %
0035 %
0036 % --- inner_check_arguments()
0037 %
0038 function [meg_info, acq_file] = inner_check_arguments(meg_info, acq_file)
0039 
0040 if isempty(meg_info)
0041   meg_info.acq_info = [];
0042 end
0043 
0044 if isempty(acq_file)
0045   % require no action
0046 end
0047 return;
0048 %
0049 % --- end of inner_check_arguments()
0050 %
0051 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0052 
0053 % --- END OF FILE --- %

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