0
$\begingroup$

I have recorded data from a neuron from different trials. Each trial we show a stimulus to a rat and then we measure the neural activity. I want to measure the PSTH which is peristimulus time histogram. However since each trial has a different duration, I can't just compute the PSTH where it needs to have a fixed trial duration.

If I want to make my question more general it would be stated as follows: Suppose I have a point process with a defined underlying rate function (which may or may not be homogenous). Now I have different observations from this process, i,e., different trials with different durations.

Say, one time I have data from this process for 2 seconds and another trial for 5 seconds and so on.

How can I compute the underlying the rate function assuming that the underlying rate function doesn't change from one trial to another trial?

$\endgroup$

2 Answers 2

1
$\begingroup$

You could get fancier, but here's a simple, standard way to do it. Say you have a set of spike times for each trial and you want to calculate a binned PSTH. All times are measured relative to the stimulus at time 0. Set up a number of equally-sized, non-overlapping time bins covering the interval from the minimum to the maximum time point in any trial. Let $t_i$ be the center time of bin $i$ and $\Delta t$ be the bin width (both measured in seconds). Let $s_i$ be the total number of spikes that fall into bin $i$ (summing over all trials). Let $o_i$ be the number of trials that are long enough to include $t_i$. The average number of spikes in bin $i$ (averaged across trials) is then $s_i / o_i$. Dividing by $o_i$ instead of the number of trials lets you deal with trials of different lengths. The firing rate in bin $i$ is $f_i = s_i / o_i / \Delta t$ (spikes per second = Hz).

$\endgroup$
0
$\begingroup$
  1. Align spike times to the stimulus.
  2. Define a time window relative to the stimulus.
  3. Select a subset of trials where that time window is well defined, e.g. it doesn't include end-of-trial, stimulus2, trial wasn't aborted, etc.
  4. In each of the trials selected in 3, count how many spikes are inside the time bin and divide by the width of the bin. This is a single trial firing rate.
  5. Compute the average of single trial firing rates.

Another method is to convolve your spike train with a Gaussian kernel. This is how most "smooth" PSTHs are computed. The spike train can either come from a single trial - giving you a single trial firing rate - or you can combine spike times across trials to compute an average firing rate. Of course you'll still need to 1) align and 2) remove trials with confounding events in the window of interest.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.