User Tools

Site Tools


analysis:course-w16:week7

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
analysis:course-w16:week7 [2016/02/02 14:45]
mvdm [Mind the gaps]
analysis:course-w16:week7 [2018/07/07 10:19] (current)
Line 205: Line 205:
 === Processing Neuralynx events files (.nev) === === Processing Neuralynx events files (.nev) ===
  
-Apart from neural data stored in ''​.ncs''​ and ''​.ntt''​ files, the Neuralynx system also stores //events// in a file called ''​Events.Nev''​ (see [[analysis:nsb2015:​week2|Module 2]] for details). Here is an example usage for the specific task in this data:+Apart from neural data stored in ''​.ncs''​ and ''​.ntt''​ files, the Neuralynx system also stores //events// in a file called ''​Events.Nev''​ (see [[analysis:course-w16:​week2|Module 2]] for details). Here is an example usage for the specific task in this data:
  
 <code matlab> <code matlab>
Line 254: Line 254:
 ==== Event-triggered spectrograms using FieldTrip ==== ==== Event-triggered spectrograms using FieldTrip ====
  
-[[http://​fieldtrip.fcdonders.nl/​ | FieldTrip]] is a toolbox originally developed for the analysis of human EEG and MEG data. Because these settings have historically faced complex signal processing challenges, such as eyeblink artifact removal, source reconstruction,​ and mapping across many electrodes, the methods developed to address these challenges are mature and have much to offer to rodent electrophysiologists+[[http://​fieldtrip.fcdonders.nl/​ | FieldTrip]] is a toolbox originally developed for the analysis of human EEG and MEG data. Because these settings have historically faced complex signal processing challenges, such as eyeblink artifact removal, source reconstruction,​ and mapping across many electrodes, the methods developed to address these challenges are mature and have much to offer, particularly ​to rodent electrophysiologists
  
 The FieldTrip toolbox continues to be actively developed and maintained, primarily at the [[http://​www.ru.nl/​donders/​ | Donders Institute for Brain, Cognition and Behaviour]] in Nijmegen. It is supported by a popular [[http://​fieldtrip.fcdonders.nl/​discussion_list | mailing list]], extensive documentation with [[http://​fieldtrip.fcdonders.nl/​tutorial | tutorials]],​ and various workshops organized across the globe (such as [[http://​fieldtrip.fcdonders.nl/​workshop/​toronto | this one]] in Toronto). The FieldTrip toolbox continues to be actively developed and maintained, primarily at the [[http://​www.ru.nl/​donders/​ | Donders Institute for Brain, Cognition and Behaviour]] in Nijmegen. It is supported by a popular [[http://​fieldtrip.fcdonders.nl/​discussion_list | mailing list]], extensive documentation with [[http://​fieldtrip.fcdonders.nl/​tutorial | tutorials]],​ and various workshops organized across the globe (such as [[http://​fieldtrip.fcdonders.nl/​workshop/​toronto | this one]] in Toronto).
Line 260: Line 260:
 === Loading Neuralynx data into FieldTrip === === Loading Neuralynx data into FieldTrip ===
  
-☛ If you haven'​t already done so, clone the lab'​s ​[[https://​github.com/​fieldtrip/​fieldtrip|FieldTrip repository on GitHub]]. Make sure you have a shortcut that sets up MATLAB'​s path to include it.+☛ If you haven'​t already done so, clone the [[https://​github.com/​fieldtrip/​fieldtrip|FieldTrip repository on GitHub]]. Make sure you have a shortcut that sets up MATLAB'​s path to include it. Also do a ''​git pull''​ of the course repository. 
 + 
 +:!: **IMPORTANT:​ to make this section work, your path shortcut should add %%FieldTrip%% first, the course repository second!** :!: This ensures that our (modified) functions take precedence over the %%FieldTrip%% code.
  
 Let's load our familiar ventral striatal LFP into FieldTrip: Let's load our familiar ventral striatal LFP into FieldTrip:
Line 443: Line 445:
 %% load the data %% load the data
 fc = FindFiles('​*.ncs'​);​ % get filenames of all LFPs recorded fc = FindFiles('​*.ncs'​);​ % get filenames of all LFPs recorded
-data = ft_read_neuralynx_interp(fc);​ % load them all -- this will take a while+data_all ​= ft_read_neuralynx_interp(fc);​ % load them all -- this will take a while
 data_all.hdr.Fs = data_all.fsample;​ % for some reason this is missing from the header data_all.hdr.Fs = data_all.fsample;​ % for some reason this is missing from the header
  
Line 449: Line 451:
 cfg = []; cfg = [];
 cfg.layout = '​ordered';​ cfg.channel = data.label; cfg.layout = '​ordered';​ cfg.channel = data.label;
-layout = ft_prepare_layout(cfg, ​data);+layout = ft_prepare_layout(cfg, ​data_all);
 </​code>​ </​code>​
  
Line 531: Line 533:
  
 Test your code with the same events used to generate the event-triggered spectrogram above. Do you think the average is a reasonable charaterization of what is happening in the LFP for these events? Test your code with the same events used to generate the event-triggered spectrogram above. Do you think the average is a reasonable charaterization of what is happening in the LFP for these events?
 +
 +☆ Choose your own challenge! Make sure to discuss your idea(s) with me first. Remember, this module concludes the first half of the course, and you should pick something from this first set of modules.
analysis/course-w16/week7.1454442347.txt.gz · Last modified: 2018/07/07 10:19 (external edit)