Home > vbmeg > functions > gui > preAnalysis > meeg_processor > signal_processor > vb_signal_processor_util_convert_parm_to_editor.m

vb_signal_processor_util_convert_parm_to_editor

PURPOSE ^

convert parameter to editor's format.

SYNOPSIS ^

function [item] = vb_signal_processor_util_convert_parm_to_editor(parm)

DESCRIPTION ^

 convert parameter to editor's format.
 [USAGE]
    item = vb_signal_processor_util_convert_parm_to_editor(parm);
 [IN]
    parm : parameter.
 [OUT]
    item : data for vb_input_settings(editor).

 See Also: vb_input_settings.m


 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 [item] = vb_signal_processor_util_convert_parm_to_editor(parm)
0002 % convert parameter to editor's format.
0003 % [USAGE]
0004 %    item = vb_signal_processor_util_convert_parm_to_editor(parm);
0005 % [IN]
0006 %    parm : parameter.
0007 % [OUT]
0008 %    item : data for vb_input_settings(editor).
0009 %
0010 % See Also: vb_input_settings.m
0011 %
0012 %
0013 % Copyright (C) 2011, ATR All Rights Reserved.
0014 % License : New BSD License(see VBMEG_LICENSE.txt)
0015 
0016 d = vb_define_signal_processor;
0017 
0018 switch(parm.type)
0019     case d.TYPE_PROCESSING_BIAS_CORRECTION
0020         % Bias correction
0021         item = { ...
0022             {'type', 'string input', 'title', 'mode', 'value', num2str(parm.mode), ...
0023              'help', ...
0024               sprintf(['0: No Bias correction.\n' ...
0025                        '1: Constant Bias correction by using all time samples.\n'...
0026                        '2: Linear trend removal and Constant Bias correction by using all time samples.\n'...
0027                        '[t1 t2]: Bias correction by time window [t1 t2] (msec). time is specified by [msec] from the begining of data.']);}; ...
0028         };
0029     case d.TYPE_PROCESSING_HIGHPASS
0030         % Highpass
0031         item = { ...
0032             {'type', 'string input', 'title', 'Cutoff frequency [Hz]', 'value', num2str(parm.cutoff_freq), ...
0033              'help', 'Cutoff frequency for highpass filter [Hz].'}, ...
0034             {'type', 'string input', 'title', 'Impulse response', 'value', num2str(parm.impulse_response), ...
0035              'help', '1:Finite impulse filter, 2:Butterworth filter'}, ...
0036             {'type', 'string input', 'title', 'Filter order', 'value', num2str(parm.order), ...
0037              'help', 'Filter order for Butterworth filter. For finite impulse filter, this value is not used.'}, ...
0038             {'type', 'string input', 'title' 'Time delay correction', 'value', num2str(parm.filtfilt), ...
0039              'help', sprintf('0: ''filter'' is applied for online filter case, \n1: Time delay correction is applied by using ''filtfilt''');}; ...
0040         };
0041     case d.TYPE_PROCESSING_LOWPASS
0042         % Lowpass
0043         item = { ...
0044             {'type', 'string input', 'title', 'Cutoff frequency [Hz]', 'value', num2str(parm.cutoff_freq), ...
0045              'help', 'Cutoff frequency for lowpass filter [Hz].'}, ...
0046             {'type', 'string input', 'title', 'Impulse response', 'value', num2str(parm.impulse_response), ...
0047              'help', '1:Finite impulse filter, 2:Butterworth filter.'}, ...
0048             {'type', 'string input', 'title', 'Filter order', 'value', num2str(parm.order), ...
0049              'help', 'Filter order for Butterworth filter. For finite impulse filter, this value is not used.'}, ...
0050             {'type', 'string input', 'title' 'Time delay correction', 'value', num2str(parm.filtfilt), ...
0051              'help', sprintf('0: ''filter'' is applied for online filter case, \n1: Time delay correction is applied by using ''filtfilt''');}; ...
0052         };
0053     case d.TYPE_PROCESSING_BANDPASS
0054         % Bandpass
0055         item = { ...
0056             {'type', 'string input', 'title', 'Lower cutoff frequency [Hz]', 'value', num2str(parm.cutoff_freq_low), ...
0057              'help', 'Lower cutoff frequency for bandpass filter.'}, ...
0058             {'type', 'string input', 'title', 'Higher cutoff frequency [Hz]', 'value', num2str(parm.cutoff_freq_high), ...
0059              'help', 'Higher cutoff frequency for bandpass filter.'}, ...
0060             {'type', 'string input', 'title', 'Impulse response', 'value', num2str(parm.impulse_response), ...
0061              'help', '1:Finite impulse filter, 2:Butterworth filter.'}, ...
0062             {'type', 'string input', 'title', 'Filter order', 'value', num2str(parm.order), ...
0063              'help', 'Filter order for Butterworth filter. For finite impulse filter, this value is not used.'}, ...
0064             {'type', 'string input', 'title' 'Time delay correction', 'value', num2str(parm.filtfilt), ...
0065              'help', sprintf('0: ''filter'' is applied for online filter case, \n1: Time delay correction is applied by using ''filtfilt''');}; ...
0066         };
0067     case d.TYPE_PROCESSING_STOPBAND
0068         % Bandpass
0069         item = { ...
0070             {'type', 'string input', 'title', 'Lower cutoff frequency [Hz]', 'value', num2str(parm.cutoff_freq_low), ...
0071              'help', 'Lower cutoff frequency for stop-band filter.'}, ...
0072             {'type', 'string input', 'title', 'Higher cutoff frequency [Hz]', 'value', num2str(parm.cutoff_freq_high), ...
0073              'help', 'Higher cutoff frequency for stop-band filter.'}, ...
0074             {'type', 'string input', 'title', 'Impulse response', 'value', num2str(parm.impulse_response), ...
0075              'help', '1:Finite impulse filter, 2:Butterworth filter.'}, ...
0076             {'type', 'string input', 'title', 'Filter order', 'value', num2str(parm.order), ...
0077              'help', 'Filter order for Butterworth filter. For finite impulse filter, this value is not used.'}, ...
0078             {'type', 'string input', 'title' 'Time delay correction', 'value', num2str(parm.filtfilt), ...
0079              'help', sprintf('0: ''filter'' is applied for online filter case, \n1: Time delay correction is applied by using ''filtfilt''');}; ...
0080         };
0081     case d.TYPE_PROCESSING_DOWNSAMPLE
0082         % Downsampling
0083         item = { ...
0084             {'type', 'string input', 'title', 'New sampling frequency [Hz]', 'value', num2str(parm.dsamp_freq), ...
0085              'help', 'New sampling frequency. Before downsampling, lowpass filtering with cutoff frequency less than ''New sampling frequency/2'' should be applied.'}; ...
0086         };
0087     case d.TYPE_PROCESSING_COMMON_REFERENCE
0088         % Common reference(for EEG)
0089         item = { ...
0090             {'type', 'string input', 'title', 'mode', 'value', num2str(parm.mode), ...
0091              'help', sprintf(['0:OFF, 1:ON.\nCommon reference is one way of EEG reference channel specification.',...
0092                       'For EEG data, reference voltage is assumed as the average of all channel data.', ...
0093                       'Namely, the average of all channel data is subtracted from each channel data for each time sample.']); };...
0094         };
0095     otherwise
0096         error('Unknown parameter type was specified.');
0097 end
0098

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