Recording and analyzing spike times from IaF cells
Model: Spike Time Recording
Demonstrates <EventOutputFile> — recording discrete spike events (as opposed to continuous voltage traces). Uses IaF cells with different input currents.
import matplotlib.pyplot as pltimport numpy as npfor name, ref_arr in ref_outputs.items(): t = ref_arr[:, 0] *1000 fig, ax = plt.subplots(figsize=(10, 4))for i inrange(1, min(ref_arr.shape[1], 8)): ax.plot(t, ref_arr[:, i] *1000, alpha=0.7, label=f'Cell {i}') ax.set_xlabel("Time (ms)") ax.set_ylabel("Voltage (mV)") ax.set_title(f"Ex23: Spike Times — {name}") ax.legend(fontsize=6, ncol=2) ax.grid(True, alpha=0.3) plt.tight_layout() plt.show()
Spike Time Recording
EventOutputFile is NeuroML’s mechanism for recording discrete events. TVBO’s continuous trace includes the spike/reset dynamics directly in the voltage state variable.