📄 pop_chanevent.m
字号:
% pop_chanevent() - import event latencies from 'edge' values of a specified EEG.data channel
%
% Usage:
% >> OUTEEG = pop_chanevent( INEEG ); % select parameters via a pop-up window
% >> OUTEEG = pop_chanevent( INEEG, chanindices, 'key', 'val' ... ); % no pop-up
%
% Graphic interface:
% "Event channel(s)" - [edit box] indices of event channel(s) to import.
% Command line equivalent: chanindices.
% "Preprocessing transform" - [edit box] apply this preprocessing
% formula or function to the selected data channel(s) X,
% transforming X into the command output before edge
% extraction. Command line equivalent 'oper'.
% "Transition to extract" - [list box] extract events when the event
% channel values go up ('leading'), down ('trailing')
% or both ('both'). Command line equivalent: 'edge'.
% "Transition length" - [edit box] Increase this number to avoid having
% events very close to each other due to a not perfectly
% straight edge. Command line equivalent: 'edgelen'.
% "Assign duration to events?" - [checkbox] . Assign duration to each
% extracted event. This option can only be used when
% extracting events on leading edges. Event will last
% until next trailing edge (down) event. Command line
% equivalent: 'duration'.
% "Delete event channel(s)" - [checkbox] check to delete the event channel
% after events have been extracted from it.
% Command line equivalent: 'delchan'.
% "Delete old events if any" - [checkbox] check this checkbox to
% remove any prior events in the dataset. Otherwise
% imported events are appended to old events. Command
% line equivalent: 'delevent'.
% "Only one event type" - [checkbox] check this checkbox to assign
% all transitions in the event channel to one event
% type. Else, one type is assigned for each non-zero
% channel value. Command line equivalent: 'nbtype'.
% Inputs:
% INEEG - input dataset structure
% chanindices - indices of an event channel(s)
%
% Optional inputs:
% 'edge' - ['leading'|'trailing'|'both'] extract events when values
% in the event channel go up ('leading'), down ('trailing')
% or both ('both'). {Default is 'both'}.
% 'edgelen' - [integer] maximum edge length (for some data edge do not
% take whole value and it takes a few sample points for
% signal to rise. Default is 1 (perfect edges).
% 'oper' - [string] prior to extracting edges, preprocess data
% channel(s) using the string command argument.
% In this command, the data channel(s) are designated by
% (capital) X. For example, 'X>3' will test the value of X
% at each time point (returning 1 if the data channel value
% is larger than 3, and 0 otherwise). You may also use
% any function (Ex: 'myfunction(X)').
% 'duration' - ['on'|'off'] extract event duration. This option can only be
% used when extracting events on leading edges. Event will last
% until next trailing-edge (down) event { 'off' }.
% 'delchan' - ['on'|'off'] delete channel from data { 'on' }.
% 'delevent' - ['on'|'off'] delete old events if any { 'on' }.
% 'nbtype' - [1|NaN] setting this to 1 will force the program to
% consider all events to have the same type. {Default is NaN}.
% If set (1), all transitions are considered the same event type
% If unset (NaN), each (transformed) event channel value following a
% transition determines an event type (Ex: Detecting leading-edge
% transitions of 0 0 1 0 2 0 ... produces event types 1 and 2).
% 'typename' - [string] event type name. Only relevant if 'nbtype' is 1
% or if there is only one event type in the event channel.
% {Default is 'chanX', X being the index of
% the selected event channel}.
%
% Outputs:
% OUTEEG - EEGLAB output data structure
%
% Author: Arnaud Delorme, CNL / Salk Institute, 29 July 2002
%
% See also: eeglab()
%123456789012345678901234567890123456789012345678901234567890123456789012
% Copyright (C) 2002 Arnaud Delorme, Salk Institute, arno@salk.edu
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
% $Log: pop_chanevent.m,v $% Revision 1.40 2004/07/28 15:52:03 arno% still debug command line problem%
% Revision 1.39 2004/07/28 15:36:11 arno
% typo
%
% Revision 1.38 2004/07/27 22:47:54 arno
% debug history
%
% Revision 1.37 2004/06/16 16:35:14 arno
% debug edgelen...
%
% Revision 1.36 2004/06/16 16:09:05 arno
% new option edge length
%
% Revision 1.35 2004/05/24 17:17:27 arno
% extracting event duration
%
% Revision 1.34 2004/05/13 22:27:10 arno
% debug operation
%
% Revision 1.33 2004/04/16 15:40:39 arno
% nothing
%
% Revision 1.32 2004/03/05 23:25:54 arno
% debug gui order
%
% Revision 1.31 2004/03/04 18:21:26 arno
% more header
%
% Revision 1.30 2004/03/04 18:19:51 arno
% editing text
%
% Revision 1.29 2004/03/04 17:08:22 arno
% programming new field oper, suppressing threshold
%
% Revision 1.28 2004/03/04 03:09:58 arno
% implementing threshold, debug trials
%
% Revision 1.27 2004/01/15 17:55:46 scott
% same
%
% Revision 1.26 2004/01/15 17:53:34 scott
% same
%
% Revision 1.25 2004/01/15 17:52:38 scott
% same
%
% Revision 1.24 2004/01/15 17:50:23 scott
% pop-up window text
%
% Revision 1.23 2004/01/15 17:47:27 scott
% edit direction checkbox
%
% Revision 1.22 2004/01/15 17:46:03 scott
% edit help msg
%
% Revision 1.21 2004/01/15 17:37:00 scott
% edited pop-window text
%
% Revision 1.20 2003/12/11 20:24:53 arno
% nothing
%
% Revision 1.19 2003/11/18 22:50:22 arno
% do not know
%
% Revision 1.18 2003/09/22 23:30:30 arno
% [6~[6~nothing
%
% Revision 1.17 2003/09/22 23:28:03 arno
% nothing
%
% Revision 1.16 2003/06/19 16:09:28 arno
% make ur
%
% Revision 1.15 2003/04/10 17:30:33 arno
% header edit
%
% Revision 1.14 2002/12/06 03:49:35 arno
% resorint events
%
% Revision 1.13 2002/12/06 03:20:37 arno
% correcting typo
%
% Revision 1.12 2002/12/06 03:12:10 arno
% removing debuging message
%
% Revision 1.11 2002/12/06 02:52:12 arno
% inserting epoch number
%
% Revision 1.10 2002/12/06 02:44:41 arno
% debugging last
%
% Revision 1.9 2002/12/06 02:36:08 arno
% updating header and help
%
% Revision 1.8 2002/12/06 02:32:25 arno
% adding type name
%
% Revision 1.7 2002/10/09 22:28:47 arno
% update text
%
% Revision 1.6 2002/10/09 22:25:31 arno
% debugging
%
% Revision 1.5 2002/10/02 23:02:09 arno
% debug delevent and 'both' options
%
% Revision 1.4 2002/08/22 21:13:36 arno
% debug
%
% Revision 1.3 2002/08/06 21:39:11 arno
% spelling
%
% Revision 1.2 2002/07/29 17:57:12 arno
% debugging
%
% Revision 1.1 2002/07/29 17:53:03 arno
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -