Demonstrates how a rat's position on a linear track can be decoded from hippocampal place cell activity using Bayesian inference.
- Rat runs back and forth on a linear track (−1 to +1)
- Position modelled as a sawtooth wave (0.1 Hz, ~10s per lap)
- Sampled at 10 ms resolution over 120 seconds
- 30 neurons with Gaussian tuning curves
- Field centres evenly spaced across the track
- Peak firing rate: 40 Hz
- Field width: 0.25 (normalised units)
- Firing rates interpolated from place fields based on rat's instantaneous position
- Spikes generated via inhomogeneous Poisson process:
P(spike in Δt) = 1 − exp(−λ · Δt)
- Bin track into 50 spatial bins
- Compute firing rate = spike count / occupancy time per bin
- This mimics what you'd do with real experimental data
- Decode position in 200 ms windows (τ = 0.2s)
- For each time window, compute posterior over positions:
P(position | spikes) ∝ ∏ᵢ Poisson(nᵢ | λᵢ(x) · τ) - Assumes independent Poisson firing across neurons
- Compare decoded (MAP estimate) vs actual position
- Visualise posterior distribution over time
- Scatter plot / 2D histogram of decoding accuracy
- Rat position over time
- Place fields (tuning curves)
- Example neuron firing rate over time
- Raster plot of all 30 neurons
- Occupancy histogram
- Reconstructed (empirical) place fields
- Posterior distribution heatmap
- Posterior with actual position overlay
- Decoded vs actual position (2D histogram)
- Decoded vs actual position (scatter)
| Parameter | Value |
|---|---|
| No. of Neurons | 30 |
| Track length | −1 to +1 (a.u.) |
| Time step (Δt) | 10ms |
| Simulation duration | 120s |
| Decoding window (τ) | 200ms |
| Spatial bins | 50 |