visualizecurrent_visualizerCurrentAnalysis

CurrentAnalysis

class visualize.current_visualizer.CurrentAnalysis(cell_or_dict=None, secID='bifurcation', segID=-1, rangeVars=None, colormap=None, tVec=None)

Plot the individual ion currents and the net current of a cell simulation.

Inspect the individual ion currents and the net current of a single cell segment.

Initialize the CurrentAnalysis object.

Parameters:
  • cell_or_dict (dict or Cell) – The cell object, or a dictionary containing equivalent simulation data.

  • secID (int) – The index of the section. Default is ‘bifurcation’.

  • segID (int) – The index of the segment. Default is -1.

  • rangeVars (list) – The names of the ion currents to plot. Default is None, which plots all ion currents.

  • colormap (dict) – The colormap for the ion currents. Default is None.

  • tVec (list) – The time vector. Default is None. Only necessary if cell_or_dict is a dictionary.

Attributes:

mode

‘cell’ or ‘dict’.

Type:

str

cell

The cell object, or a dictionary containing equivalent simulation data.

Type:

Cell | dict

t

The time vector.

Type:

list

sec

The section of the cell.

Type:

Section

secID

The index of the section.

Type:

int

segID

The index of the segment.

Type:

int

seg

The segment of the cell.

Type:

Segment

rangeVars

The names of the ion currents to plot. Default is None, which plots all ion currents.

Type:

list

colormap

The colormap for the ion currents.

Type:

dict

depolarizing_currents

The depolarizing currents.

Type:

np.array

hyperpolarizing_currents

The hyperpolarizing currents.

Type:

np.array

depolarizing_currents_sum

The sum of the depolarizing currents.

Type:

np.array

hyperpolarizing_currents_sum

The sum of the hyperpolarizing currents.

Type:

np.array

net_current

The net current.

Type:

np.array

depolarizing_currents_normalized

The normalized depolarizing currents.

Type:

np.array

hyperpolarizing_currents_normalized

The normalized hyperpolarizing currents.

Type:

np.array

voltage_trace

The voltage trace.

Type:

np.array

Methods:

_get_current_by_rv(rv)

Get the section current by the range variable name.

_compute_current_arrays()

Compute the ionic currents of a section.

plot_areas(ax, normalized, plot_net, plot_voltage, t_stim, select_window_relative_to_stim)

Plot the ion currents and the net current of a cell simulation.

plot_lines(ax, legend)

Plot the ion currents and the net current of a cell simulation.