[FieldTrip] Using PPC method

Andreas Wutz awutz at mit.edu
Thu Aug 24 15:21:53 CEST 2017


Dear Julia,

it seems that we are going down the same road. I am also in the process of building a pipeline for spike-field coherence and I am orienting myself along the mentioned tutorial.

That being said, it should become clear that I am far from being an expert for this kind of analysis. Nevertheless, I want to share what I have learned about it in the last days. I hope someone else in the list will correct me in case. This post should also serve as a check for my own analysis.

First, you don't have to re-do your prior analysis for your neuralynx data. You only have to bring the outputs of your analysis into a format that the ft_xxx functions can read. You probably already have all the required information for that from your previous spike sorting.

Let's look at the data structure (already segmented into trials, as shown in the tutorial):


spikeTrials =
         label: {'sig002a_wf'  'sig003a_wf'}
     timestamp: {[1x83601 int32<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/int32.html>]  [1x61513 int32<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/int32.html>]}
      waveform: {[1x32x83601 double<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html>]  [1x32x61513 double<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html>]}
          unit: {[1x83601 double<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html>]  [1x61513 double<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html>]}
           hdr: [1x1 struct<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/struct.html>]
        dimord: '{chan}_lead_time_spike'
           cfg: [1x1 struct<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/struct.html>]
          time: {[1x83601 double<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html>]  [1x61513 double<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html>]}
         trial: {[1x83601 double<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html>]  [1x61513 double<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html>]}
     trialtime: [600x2 double<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html>]

The fields ".waveform" and ".unit" won't be necessary for spike-field coherence.
For the fields ".cfg" and ".hdr", I am not sure if they are used at some point. I fill them with the info I have.
spikeTrials.hdr.FileHeader.Frequency = your SamplingFrequency; % 40000
spikeTrials.cfg.timestampspersecond = your SamplingFrequency; % 40000
spikeTrials.cfg.trl = nTrials x 3 matrix with start (1st column), end (2nd) and offset relative to trigger (3rd) of each trial in timestamp units.

".label" contains a cell array of strings with one string for each unit. ".dimord" can be copied from above.
".trialtime" = nTrials x 2 matrix with start (1st) / end (2nd) of each trial relative to trigger in seconds.

The important fields are ".timestamp", ".time", ".trial". Those contain all info about each spike for each unit (1 x nUnits cell array, each cell contains a vector with one entry per spike for that unit).

".timestamp": spike times in timestamp units from the beginning of the recording (NOTE: Make sure your recording is continuous such that the timestamps increase from first to last, no clock resets to zero).

".time": spike times in seconds relative to trigger in each trial

".trial": trial number in which the spike occurred (1 for trial 1, 2 for 2 and so on)

Best,
Andreas






________________________________
From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Julia Coopi [juliacoopiza at gmail.com]
Sent: Wednesday, August 23, 2017 5:16 PM
To: fieldtrip at science.ru.nl
Subject: [FieldTrip] Using PPC method

Dear Fieldtrippers,

I am new in fieltrip. I want to use pair wise phase consistency method for measuring the spike-pahse locking. My data set is recorded by neuralynx. For measuring it I found this link: http://www.fieldtriptoolbox.org/tutorial/spikefield. Is it the right link? Should I go through all steps including reading spikes and LFPs from neuralynx, make trails and .... finally call thefollowing function?

ft_spiketriggeredspectrum

It is very boring and time consuming. Actually, I imported files into matlab and make the trials which was a huge work at that time. I don't want to do it again and import data from neuralynx by fieldtrip (which seems is not very straighforward). I want to use the PPC method of fieldtrip using imported files into matlab. Is there any way to do that?
Please guide me what is the best way.

Thanks,
Julia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170824/8a3a1c2a/attachment-0002.html>


More information about the fieldtrip mailing list