Peristimulus Time Histogram & Smoothing
9 views (last 30 days)
Show older comments
Hi All,
I have a couple questions regarding computation of a peristimulus time-histogram, computation of a spike average from the binned data, and subsequent smoothing for visualization.
My inputs are:
cluster_split(1 x 3 cell) - this is a cell matrix, where each cell consists of a matrix of neuron spike times (in seconds)
recEv (1x97 struct) - this is an event structure; one of the fields "eegoffset" corresponds to the time (in seconds) that my event of interest occurs
I am using this toolbox (specifically the mpsth.m function) to build my PSTH (https://www.mathworks.com/matlabcentral/fileexchange/37339-mlib-toolbox-for-analyzing-spike-data).
My questions are as follows:
1) How do I select a proper bin size?
2) Is there a way to construct a PSTH with overlapping bins? i.e.: bin 1 = -1000ms to -900 ms, bin 2 = -950 ms to -850 ms etc etc. Would this be a better way of doing this?
3) I'd like to calculate the firing rate for each bin and then plot it. If I set the bin size too high, like 1 ms bins, then the distribution of firing rates are very small. If I set it too high, the same problem occurs. Additionally, it seems like the firing rates are extremely high, which is why I wonder if the function is working properly.
4) I'd like to smooth my firing rate. I was using smoothdata(psth,'gaussian',window size) but I was wondering how to select a proper window size?
Any help would be much appreciated!
PAK
3 Comments
Kaushik Lakshminarasimhan
on 5 Sep 2018
Sorry, I haven't used that toolbox so I can't give specific suggestions. If you run into errors or need help with parts of the code, just post the relevant code along with the specific issue you're having.
Answers (0)
See Also
Categories
Find more on Electrophysiology in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!