Download presentation
1
Chronux Tutorial: Part II LOCFIT
Keith Purpura Weill Cornell Medical College Bijan Pesaran Center for Neural Science, NYU Hemant Bokil Boston Scientific Corporation
2
Spectra, Coherences etc
Fourier transforms using multiple tapers: mtfftc.m Spectrum: mtspectrumc.m Coherency:mtcoherencyc.m Spectrogram: mtspecgramc.m Coherogram:mtcohgramc.m Local regression and likelihood The basic routines are listed here for continuous processes. Corresponding routines for spike times have names ending in pt, and corresponding routines for binned spike counts have names ending in pb. Note that almost all Chronux routines come with error bars. Regression and likelihood: locfit.m Plotting the fit: lfplot.m Plotting local confidence bands: lfband.m Plotting global confidence bands: scb.m
3
Chronux data format Continuous/binned point process data
matrices with dimension time x channels/trials e.g 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=[ ] data(2).times=[ ] 2 spike trains with 4 and 3 spikes Chronux’s standard data format is listed here. We will also expand the Chronux internal format shortly to include cell arrays. We will incorporate other ways of storing data by including filters to convert data from other formats to the Chronux format – filters to convert from the plexon format to the Chronux format will be released soon.
4
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
5
Example II: Spike rates, spectra and coherence (from earlier lecture)
Simultaneous two-cell recording from Macaque area LIP – dataset DynNeuroLIP.mat Reach and Saccade Cue Delay Cue Delay Reach and Saccade Task Slide from the morning’s lectures. Pesaran et al (2008)
6
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) Description of data
7
Tasks Compute 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.
8
The main script for this tutorial lip_master_script2.m
Calls other scripts to run through the various analyses Type lip_master_script at the Matlab command prompt and press return
14
Basic locfit usage (rate estimate)
Spike rate: 1 trial Basic locfit usage (rate estimate) >> fit=locfit(data,'family','rate'); >> lfplot(fit); >> lfband(fit); Density estimate: replace 'rate‘ by ‘dens’ Regression >> fit=locfit(x,y);
17
Setting the bandwidth –fixed (h), nearest neighbor (nn)
h: fixed/absolute bandwidth e.g. h=1 is 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 >> fit=locfit(data,'family','rate‘,’nn’,0.3); >> lfplot(fit); >> lfband(fit);
19
Multiple trials pool the spikes and compute fit
rescale fits and confidence intervals Pause at this place
21
Electrophysiology Analysis Protocol
22
Electrophysiolgy: Data Conditioning
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.