Post on 17-Dec-2015
Chronux Tutorial: Part IILOCFIT
Keith PurpuraWeill Cornell Medical College
Bijan PesaranCenter for Neural Science, NYU
Hemant BokilBoston Scientific Corporation
Spectra, Coherences etc
Local regression and likelihood
Fourier transforms using multiple tapers: mtfftc.m
Spectrum: mtspectrumc.m
Spectrogram: mtspecgramc.mCoherogram:mtcohgramc.m
Coherency:mtcoherencyc.m
Regression and likelihood: locfit.m
Plotting the fit: lfplot.mPlotting local confidence bands: lfband.m
Plotting global confidence bands: scb.m
Chronux data format Continuous/binned point process data
matrices with dimension time x channels/trials
e.g. 1000 x 10 dimensional matrix
interpreted as 1000 samples
10 channels/trials
Spikes times
struct array with dimension = number of channels/trials
e.g. data(1).times=[0.3 0.35 0.42 0.6]
data(2).times=[0.2 0.22 0.35]
2 spike trains with 4 and 3 spikes
Important parameter in mulitple Chronux functions
params: structure with multiple fields
Fs: sampling frequency (slightly different interpretation for spike times
tapers: controls the number of tapers
pad: controls the padding
fpass: frequency range of interest
err: controls error computation
trialave: controls whether or not to average over trials
Example II: Spike rates, spectra and coherence (from earlier lecture)
• Simultaneous two-cell recording from Macaque area LIP – dataset DynNeuroLIP.mat
Reach and
Saccade Task
DelayCueReach andSaccade
Pesaran et al (2008)
DelayCue
Example II
3 local field potentials (LFP) and 2 single units, LFP sampled at 1 kHz
Trial: 3 seconds of data for 9 trials to one of the directions: 1 s (Baseline), 2 s (Delay + post movement)
Baseline: 1 second of data for 74 trials (pooled across all directions)
TasksCompute the following for the Memory trials
Spike rates
LFP and spike spectra
Spike-field coherence
Spike-Spike coherence
Compare spike-spike coherence during the memory period and the baseline period.
The main script for this tutorial
lip_master_script2.m
Calls other scripts to run through the various analyses
>> fit=locfit(data,'family','rate');>> lfplot(fit); >> lfband(fit);
Spike rate: 1 trial
Basic locfit usage (rate estimate)
Regression
>> fit=locfit(x,y);
Density estimate:replace 'rate‘ by ‘dens’
>> fit=locfit(data,'family','rate‘,’nn’,0.3);>> lfplot(fit); >> lfband(fit);
Setting the bandwidth –fixed (h), nearest neighbor (nn)
h: fixed/absolutebandwidth e.g. h=1is interpreted as 1 s if data is in seconds
nn: fixed fraction of the total number of points e.g. nn=0.3 takes the 30% closest points to a given point
Default: nn=0.7, h=0
Multiple trials
pool the spikes and compute fitrescale fits and confidence intervals
Electrophysiology Analysis Protocol
Electrophysiolgy: Data Conditioning