Skip to content

findEventTimes

  Given a NEV file, an channel number, and a unit number this function
  will return indices corresponding to those spikes, timestamps
  corresponding to those spikes (optional), and snippets corresponding to
  those spikes (optional). 

  Use [timestamps snippets indices] = findEventTimes(NEV, Channel, Unit)

  INPUTS

    NEV:          This corresponds to the NEV file the desired data is
                  being extracted from.

    Channel:      The channel number the data is being extracted for.

    Units:        The unit numbers the data is being extracted for. This
                  variable can be one unit or many units passed as an array
                  of integers.
                  DEFAULY: If units is not specified all timestamps from
                  all units will be passed to the calling function. For
                  noise pass 255.

  OUTPUT

    indices:      An array of all indices that correspond to neural data
                  for channel and unit passed.

    timestamps:   An array of all timestamps that correspond to neural data
                  for channel and unit passed.

    snippets:     A matrix of all indices that correspond to neural data
                  for channel and unit passed.

    IF OUTPUT IS NOT SPECIFIED only "timestamps" WILL BE PASSED TO THE
    CALLING FUNCTION.

    Example: 

    [timestamps snippets indices] = findEventTimes(NEV, 3, [1,3:5]);

    In the example above, the indices, timestamps, and snippets for
    channel #3 and units 1, 3, 4, and 5 will be passed to the calling
    function.

    Kian Torab
    ktorab@blackrockmicro.com
    Blackrock Microsystems
    Salt Lake City, UT
    Version 2.0.0
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%