Presentation on theme: "Chronux Tutorial: Part II LOCFIT"— Presentation transcript:
1 Chronux Tutorial: Part II LOCFIT Keith PurpuraWeill Cornell Medical CollegeBijan PesaranCenter for Neural Science, NYUHemant BokilBoston Scientific Corporation
2 Spectra, Coherences etc Fourier transforms using multiple tapers: mtfftc.mSpectrum: mtspectrumc.mCoherency:mtcoherencyc.mSpectrogram: mtspecgramc.mCoherogram:mtcohgramc.mLocal regression and likelihoodThe 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.mPlotting the fit: lfplot.mPlotting local confidence bands: lfband.mPlotting global confidence bands: scb.m
3 Chronux data format Continuous/binned point process data matrices with dimension time x channels/trialse.g x 10 dimensional matrixinterpreted as 1000 samples10 channels/trialsSpikes timesstruct array with dimension = number of channels/trialse.g. data(1).times=[ ]data(2).times=[ ]2 spike trains with 4 and 3 spikesChronux’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 fieldsFs: sampling frequency (slightly different interpretation for spike timestapers: controls the number of taperspad: controls the paddingfpass: frequency range of interesterr: controls error computationtrialave: 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.matReach andSaccadeCueDelayCueDelayReach and Saccade TaskSlide from the morning’s lectures.Pesaran et al (2008)
6 Example II3 local field potentials (LFP) and 2 single units, LFP sampled at 1 kHzTrial: 3 seconds of data for 9 trials to one of thedirections:1 s (Baseline), 2 s (Delay + post movement)Baseline: 1 second of data for 74 trials (pooledacross all directions)Description of data
7 Tasks Compute the following for the Memory trials Spike rates LFP and spike spectraSpike-field coherenceSpike-Spike coherenceCompare 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 analysesType lip_master_script at the Matlab command prompt and press return
17 Setting the bandwidth –fixed (h), nearest neighbor (nn) h: fixed/absolutebandwidth e.g. h=1is interpreted as 1 s if data is in secondsnn: fixed fraction of the total number of points e.g. nn=0.3takes the 30% closest points to a given pointDefault: nn=0.7, h=0>> fit=locfit(data,'family','rate‘,’nn’,0.3);>> lfplot(fit);>> lfband(fit);