Plots and reports of spiking results

This section describes in details all the spiking plots available through the cerebellar-models reporting, based on the results of BSB simulations.

SpikePlot

This abstract class provides an interface to plot spike-event based simulation results for the duration of the simulation. It extends from ScaffoldPlot.

Constructor parameters:

  • fig_size: Tuple giving the size of the figure in inches.

  • spiking_results: Spiking activity loaded from BSB-NEST simulation (see SpikingResults).

  • dict_colors: A Dictionary linking the name of the elements (e.g.: cells, fibers) to plot to their RGBA color

spiking_results can be obtained from the SpikeSimulationReport (see SpikeSimulationReport).

SpikeSimulationReport

This abstract class provides an interface to create reports for spike-event based simulation results. It extends from BSBReport.

Constructor parameters:

  • scaffold: Scaffold instance or path to the BSB Scaffold file to load

  • simulation_name: Name of the simulation as defined in the scaffold configuration.

  • folder_nio: Folder containing the simulation results stored as nio files.

  • time_from: The starting time from which the analysis will be performed

  • time_to: The end time at which the analysis will end.

  • ignored_ct: List of cell type names to ignore from the nio files (results from these cells will not be displayed).

  • cell_type_info: List of PlotTypeInfo. This gives for each element to plot, its name, abbreviation and color.

This class will load the results from nio files produced by the BSB simulation and store them in the spiking_results attribute (see SpikingResults)

Note

Any modification to the time_from and time_to values will be automatically forwarded to the report’s SpikePlots

RasterPSTHPlot

This class extracts and plots a simulation spike times as a raster plot for the duration of the simulation, as well as the equivalent PSTH for each of the cell types of the simulation.

On top of the constructor parameters of SpikePlot:

  • nb_bins: Numbers of bins for the PSTH plot part for each cell type.

SimResultsTable

This class computes the mean firing rate and mean inter-spike interval (ISI) of each cell type during the simulation time and plot it in a table. The firing rate value of a cell type corresponds to the mean number of spike over the simulation time interval, while its ISI corresponds to the mean of all mean ISI values computed for each of its neuron.

On top of the constructor parameters of SpikePlot:

  • dict_abv: Dictionary that links each cell type name to an abbreviation to display

FiringRatesPlot

This class plots the mean instantaneous firing rate \(\lambda (t)\) of each population, expressed according to time, for the duration of the simulation (see get_firing_rates).

The final displayed signal \(\lambda (t)\) corresponds to the mean of the neurons’ \(\lambda _m (t)\).

On top of the constructor parameters of SpikePlot:

  • kernel: Elephant kernel to use to smoothen the firing rate signals.

ISIPlot

This class generates the Inter-spike interval (ISI) histogram plot for each cell type (see also extract_isis).

On top of the constructor parameters of SpikePlot:

  • nb_bins: Numbers of bins for the ISI histogram for each cell type.

FrequencyPlot

This class plots the frequency distribution analysis of the instantaneous firing rate signal for each cell type (see get_frequencies).

Separators for the major bands of frequencies for neural activity can also be plotted on top of each panel:

  • Delta band: \([0.5; 4]\) Hz

  • Theta band: \([4; 8]\) Hz

  • Alpha band: \([8; 12]\) Hz

  • Beta band: \([12; 30]\) Hz

  • Gamma band: \([30; 100]\) Hz

SpikeCorrelationPlot

Spike cross-correlation matrix plot for each cell type. Spike trains will be time binned before computing the pairwise coefficient (see get_correlation_coefficients). On top of the constructor parameters of SpikePlot:

  • bin_size: Size of the time bins in ms.

  • dict_abv: Dictionary that links each cell type name to an abbreviation to display

SortedPSTH

This class plots the time-binned instantaneous firing rate for each cell population. Each population firing rate is obtained from a subsample of the neurons within the population, and are displayed in rows in the same panel. The populations are sorted based on the time at which the largest positive change of firing rate has been detected. This allows you to see how this event is progressing within the circuit during the simulation.

On top of the constructor parameters of SpikePlot:

  • nb_bins: Number of bins for the PSTH.

  • sample_size: Maximum number of neurons to subsample for each population

BasicSimulationReport

This class extends SpikeSimulationReport and produces a report containing the following SpikePlot (see section SpikePlot) with a legend:

  • A plot showing both the raster plot and Peristimulus Time Histogram (PSTH) for the duration of the simulation (see section RasterPSTHPlot)

  • A table containing the mean firing rate and mean InterSpike Intervals (ISIs) for each cell type (see section SimResultsTable).

  • A plot showing the mean firing rate according to time of each cell type (see section FiringRatesPlot)

  • A plot showing the ISIs distribution of each cell type (see section ISIPlot)

  • A plot showing the frequency spectrum of each cell type (see section FrequencyPlot)

  • A plot showing the cross-correlation of the spiking activity between each cell type (see section SpikeCorrelationPlot)

All these plots are saved in a single pdf file.