Membrane Voltage for CBGTC neurons

class analyseur.cbgtc.visual.measurable.VoltageTrace[source]

Bases: object

Methods

plot()

plot_in_ax()

plot_collection()

plot_collection_in_ax()

load_measurables()

volt_trace_collections()

NOTE: ‡Are not plotting methods.

Use Cases

1. Pre-requisites

1.1. Import Modules

from analyseur.cbgtc.visual.measurable import VoltageTrace

Consider the path

locpath = "/data/BG/1/"
all_paths = ["/data/BG/1/", "/data/BG/2/", "/data/BG/3/", "/data/BG/4/"]

2. Visualize

2.1. View average membrane voltage

VoltageTrace.plot(locpath, "MSN")

This plots the voltage trace for the whole simulation run.

2.2. View average membrane voltage within a desired window

VoltageTrace.plot(locpath, "MSN", window=(0,1))

This plots the voltage trace inside the first second of the simulation.

2.3. View average membrane voltage across multiple runs

VoltageTrace.plot_collection(all_paths, "MSN")

For a desired window do

VoltageTrace.plot_collection(all_paths, "MSN", window=(0,1))

classmethod load_measurables(fileloc, nucleus)[source]

Loads the membrane voltage preprocessed by averaging across all neurons in the respective nuclei and sampled at 1 ms. Note that this preprocessing and saving the data in respective csv file is done at simulation.


classmethod plot(fileloc, nucleus=None, window=None)[source]

Displays the Membrane Voltage averaged over all the neurons in the desired nuclei using plot_in_ax()

Parameters:
  • fileloc – string; “path/to/file”

  • window – defines upper and lower range of the bins but ignore lower and upper outliers [default: (0,10000)]

  • nucleus – [OPTIONAL] None or name of the nucleus (string)

Returns:

fig object and axis object comprising the plot


classmethod plot_collection(all_fileloc, nucleus=None, window=None)[source]

Displays the Average Membrane Voltage over multiple runs in the desired nuclei using plot_collection_in_ax()

Parameters:
  • all_fileloc – [“path/to/file1”, “path/to/file2”, “path/to/file3”, “path/to/file4”]

  • window – defines upper and lower range of the bins but ignore lower and upper outliers [default: (0,10000)]

  • nucleus – [OPTIONAL] None or name of the nucleus (string)

Returns:

fig object and axis object comprising the plot


classmethod plot_collection_in_ax(ax, all_fileloc, nucleus, window=None)[source]
Mean Membrane Voltage Across Simulations

Voltage (mV)
   ^
   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-48 ───────────────────────────────────────────
   |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-49 ───────────────────────────────────────────
   |
   +------------------------------------------> Time (ms)
    0              ...                 10000

Displays the Average Membrane Voltage over multiple runs in the desired nuclei as a time-series trace on the given matplotlib.pyplot.axis and returns the axis.

Parameters:
  • ax – object matplotlib.pyplot.axis`

  • all_fileloc – [“path/to/file1”, “path/to/file2”, “path/to/file3”, “path/to/file4”]

  • window – defines upper and lower range of the bins but ignore lower and upper outliers [default: (0,10000)]

  • nucleus – [OPTIONAL] None or name of the nucleus (string)

Returns:

object axis


classmethod plot_in_ax(ax, fileloc, nucleus, window=None)[source]
Voltage trace (mean across neurons)

Voltage (mV)
   ^
   |   ~~~ ~~~~ ~~ ~~~ ~~ ~~~ ~~ ~~ ~~~ ~~~
   |  ~   ~~   ~~   ~~  ~~  ~~   ~~   ~~  ~
-39 ─────────────────────────────────────────
   |   v      v        v     v        v
   |  v v    v v      v v   v v      v v
-40 ─────────────────────────────────────────
   |
   +----------------------------------------> Time (ms)
    0            ...                 10000

Displays the Membrane Voltage averaged over all the neurons in the desired nuclei as a time-series trace on the given matplotlib.pyplot.axis and returns the axis.

Parameters:
  • ax – object matplotlib.pyplot.axis`

  • fileloc – string; “path/to/file”

  • window – defines upper and lower range of the bins but ignore lower and upper outliers [default: (0,10000)]

  • nucleus – [OPTIONAL] None or name of the nucleus (string)

Returns:

object axis


classmethod volt_trace_collections(all_fileloc, nucleus)[source]

This performs NumPy‑ization of multiple load_measurables() and return it and the mean of the coerced array.