FT_READ_EVENT

Note that this reference documentation is identical to the help that is displayed in MATLAB when you type “help ft_read_event”.

  FT_READ_EVENT reads all events from an EEG/MEG dataset and returns
  them in a well defined structure. It is a wrapper around different
  EEG/MEG file importers, directly supported formats are CTF, Neuromag,
  EEP, BrainVision, Neuroscan and Neuralynx.
 
  Use as
    [event] = ft_read_event(filename, ...)
 
  Additional options should be specified in key-value pairs and can be
    'dataformat'    string
    'headerformat'  string
    'eventformat'   string
    'header'        structure, see FT_READ_HEADER
    'detectflank'   string, can be 'bit', 'up', 'down', 'both' or 'auto' (default is system specific)
    'trigshift'     integer, number of samples to shift from flank to detect trigger value (default = 0)
    'trigindx'      list with channel numbers for the trigger detection, only for Yokogawa (default is automatic)
    'threshold'     threshold for analog trigger channels (default is system specific)
    'blocking'      wait for the selected number of events (default = 'no')
    'timeout'       amount of time in seconds to wait when blocking (default = 5)
    'tolerance'     tolerance in samples when merging analogue trigger
                    channels, only for Neuromag (default = 1,
                    meaning that an offset of one sample in both directions
                    is compensated for)
 
  Furthermore, you can specify optional arguments as key-value pairs
  for filtering the events, e.g. to select only events of a specific
  type, of a specific value, or events between a specific begin and
  end sample. This event filtering is especially usefull for real-time
  processing. See FT_FILTER_EVENT for more details.
 
  Some data formats have trigger channels that are sampled continuously with
  the same rate as the electrophysiological data. The default is to detect
  only the up-going TTL flanks. The trigger events will correspond with the
  first sample where the TTL value is up. This behaviour can be changed
  using the 'detectflank' option, which also allows for detecting the
  down-going flank or both. In case of detecting the down-going flank, the
  sample number of the event will correspond with the first sample at which
  the TTF went down, and the value will correspond to the TTL value just
  prior to going down.
 
  This function returns an event structure with the following fields
    event.type      = string
    event.sample    = expressed in samples, the first sample of a recording is 1
    event.value     = number or string
    event.offset    = expressed in samples
    event.duration  = expressed in samples
    event.timestamp = expressed in timestamp units, which vary over systems (optional)
 
  The event type and sample fields are always defined, other fields can be empty,
  depending on the type of event file. Events are sorted by the sample on
  which they occur. After reading the event structure, you can use the
  following tricks to extract information about those events in which you
  are interested.
 
  Determine the different event types
    unique({event.type})
 
  Get the index of all trial events
    find(strcmp('trial', {event.type}))
 
  Make a vector with all triggers that occurred on the backpanel
    [event(find(strcmp('backpanel trigger', {event.type}))).value]
 
  Find the events that occurred in trial 26
    t=26; samples_trials = [event(find(strcmp('trial', {event.type}))).sample];
    find([event.sample]>samples_trials(t) & [event.sample]<samples_trials(t+1))
 
  The list of supported file formats can be found in FT_READ_HEADER.
 
  See also FT_READ_HEADER, FT_READ_DATA, FT_WRITE_EVENT, FT_FILTER_EVENT

reference/ft_read_event.txt · Last modified: 2014/09/18 13:00 (external edit)

You are here: startreferenceft_read_event
This DokuWiki features an Anymorphic Webdesign theme, customised by Eelke Spaak and Stephen Whitmarsh.
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0