User Tools

Site Tools


analysis:neuralynx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
analysis:neuralynx [2013/04/25 10:20]
mvdm created
analysis:neuralynx [2018/07/07 10:19] (current)
Line 1: Line 1:
-To load *.Ncs (Neuralynx Continuously Sampled) files, use the following:+====== Loading LFP data into fieldtrip ====== 
 + 
 +To load *.Ncs (Neuralynx Continuously Sampled, sometimes also referred to as CSC for Continuously Sampled Channel) files in MATLAB, use the following:
  
 <code matlab> <code matlab>
 fc = FindFiles('​*.ncs'​);​ fc = FindFiles('​*.ncs'​);​
-data = ft_read_neuralynx_interp(fc(1));+data = ft_read_neuralynx_interp(fc);​
 </​code>​ </​code>​
 +
 +This will create a [[http://​fieldtrip.fcdonders.nl/​|fieldtrip]] data structure with all CSCs, filling any gaps in the original data with %%NaNs%%.
 +
 +Note that ''​ft_read_neuralynx_interp''​ calls a custom version of ''​ft_read_data''​ (i.e. not the version included in the official fieldtrip releases). Make sure you use an up to date version available from the [[https://​github.com/​mvdm/​vandermeerlab|vandermeerlab code repository]] (see also the [[computing:​computing|Computing]] page on how to use this).
 +
 +====== Neuralynx CSC data properties ======
 +
 +Neuralynx CSC data is generally stored in blocks of 512 samples. Each block has a timestamp (unsigned 64-bit integer on our Digital Lynx) corresponding to the start of the block. Not all blocks have all 512 samples; how many samples are good is also indicated for each block. Based on the overall sampling rate for the file, the block timestamps, and the number of valid samples, a raw [[analysis:​DataTypes|tsd]] can be constructed. Note however that because the time difference within blocks and between blocks may not be the same, and because Neuralynx allows recording to be paused, the resulting raw data will not have a perfectly constant sampling rate. Many analyses require a constant sampling rate, and some sort of interpolation or correction is therefore required. ''​ft_read_neuralynx_interp''​ implements a version of this.
 +
 +====== Loading event data into fieldtrip ======
 +
 +
 +====== Neuralynx event data properties ======
analysis/neuralynx.1366899641.txt.gz · Last modified: 2018/07/07 10:19 (external edit)