Skip to content

Plot Helper

Computational Brain Lab edited this page Nov 28, 2018 · 3 revisions

Description

Functions to represent the Loihi activity (e.g., firing rates, voltages in multiple compartments)

API

SavePlot

Save a plot in a different filetype.

Parameters:

  • figure matplotlib figure
  • directory directory to the saved file
  • name name of the file
  • filetype file type (only support png or svg)

MultiRowVoltagePlot

Generate and save a plot with voltage data plot separately for each compartment on different rows.

Parameters:

  • name name of the file
  • directory directory to the saved file
  • data data of an CompartmentVoltage Probe
  • filetype file type (only support png or svg)

MultiRowCurrentPlot

Generate and save a plot with current data plot separately for each compartment on different rows.

Parameters:

  • name name of the file
  • directory directory to the saved file
  • data data of an CompartmentCurrent Probe
  • filetype file type (only support png or svg)

FiringRateCompute

Compute firing rate of multiple compartments using a sliding window.

Parameters:

  • data data of a Spike Probe
  • window window size of the sliding window

FiringRateComputeGap

Compute firing rate of multiple compartments using the time difference between successive spikes.

Parameters:

  • data data of a Spike Probe

FiringRatePlot

Generate and save a plot with firing rate data plot separately for each compartment on different rows.

Parameters:

  • name name of the file
  • directory directory to the saved file
  • data data of an Spike Probe
  • filetype file type (only support png or svg)
  • enable_gap if or not using time difference between successive spikes to compute firing rate (Default=False)
  • window window size of the sliding window (Default=250)

SpikeTime2Spikes

Transform lists with spike times to numpy ndarray with binary spikes on each timestep.

Parameters:

  • spike_times lists with spike times
  • time_steps number of time steps in the simulation

Spikes2SpikeTime

Transform numpy ndarray with binary spikes on each timestep to lists with spike times.

Parameters:

  • data numpy ndarray with binary spikes on each timestep

SpikesRasterPlot

Generate and save a spike raster plot of multiple compartments.

Parameters:

  • name name of the file
  • directory directory to the saved file
  • data lists with spike times
  • filetype file type (only support png or svg)

Clone this wiki locally