rasterize

nrv.ui.rasterize(my_dict, my_key, t_start=0, t_stop=0, t_min_spike=0.1, t_refractory=2, threshold=0)[source]

Rasterize a membrane potential (or filtered or any quantity processed from membrane voltage), with spike detection. This function adds 4 items to the dictionnary, with the key termination ‘_raster_position’, ‘_raster_x_position’, ‘_raster_time_index’, ‘_raster_time’ concatenated to the original key. These keys correspond to: _raster_position : spike position as the indice of the original key _raster_x_position : spike position as geometrical position in um _raster_time_index : spike time as the indice of the original key _raster_time : spike time as ms

Parameters:
  • my_dict (dictionary) – dictionary where the quantity should be rasterized

  • key (str) – name of the key to rasterize

  • t_start (float) – time at which the spike detection should start, in ms. By default 0

  • t_stop (float) – maximum time to apply spike detection, in ms. If zero is specified, the spike detection is applied to the full signal duration. By default set to 0.

  • t_min_spike (float) – minimum duration of a spike over its threshold, in ms. By default set to 0.1 ms

  • t_refractory (float) – refractory period for a spike, in ms. By default set to 2 ms.

  • threshold (float) – threshold for spike dection, in mV. If 0 is specified the threshold associated with the axon is automatically chosen. By default set to 0. Note that if a 0 value is wanted as threshold, a insignificat value (eg. 1e-12) should be specified.