Back to the main page.

Bug 1550 - ft_spike_maketrials cfg.trl

Status CLOSED FIXED
Reported 2012-06-22 15:12:00 +0200
Modified 2013-03-02 21:41:07 +0100
Product: FieldTrip
Component: spike
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to: Martin Vinck
URL:
Tags:
Depends on:
Blocks:
See also:

Martin Vinck - 2012-06-22 15:12:55 +0200

Robert pointed out that having a third input is not desirable. How to proceed now? cfg.trl cfg.timestampspersecond cfg.trlunit = 'samples' or 'timestamps' if 'samples', cfg.hdr should be present?


Martin Vinck - 2012-06-22 15:26:03 +0200

Also we should think of the spike.sampleinfo field. Is a field with similar content (having borders of trials in timestamps or samples) necessary / desired?


Martin Vinck - 2012-06-23 10:13:40 +0200

I've done it as follows: % cfg.trl = is an nTrials-by-M matrix, with at least 3 columns: % Every row contains start (col 1), end (col 2) and offset of the event % trigger in the trial in timestamp units. For example, an offset of -1000 % means that the trigger (t = 0 sec) occurred 1000 timestamps after the % trial start. % If more columns are added than 3, these are used to construct the % spike.trialinfo field having information about the trial. % % cfg.trlunit = 'timestamps' (default) or 'samples'. % If 'samples', cfg.trl should % be specified in samples, and cfg.hdr = data.hdr should be specified % If 'timestamps', cfg.timestampspersecond should be % specified. % % cfg.hdr = struct, should be specified if cfg.trlunit = 'samples'. % This should be specified as cfg.hdr = data.hdr where data.hdr % contains the subfields data.hdr.Fs (sampling frequency of the LFP), % data.hdr.FirstTimeStamp, and data.hdr.TimeStampPerSecond. % % cfg.timestampspersecond = number of timestaps per second (for % Neuralynx, 1000000 for example). This can be computed for example from % the LFP hdr (cfg.timestampspersecond = data.hdr.Fs*data.hdr.TimeStampPerSecond)


Martin Vinck - 2013-03-02 21:40:54 +0100

bug fixed