visualizedendrogram_DendrogramSynapseStatistics

_DendrogramSynapseStatistics

class visualize.dendrogram._DendrogramSynapseStatistics(dendrogram_db, cell, colormap_synapses=None)

Compute synapse statistics for a Cell object.

Synaptic statistics include the total amount of synapses binned by soma distance, both unnormalized, as well as normalized by total amount of dendritic length.

Parameters:
  • dendrogram_db (list) – A list of _DendrogramSection objects.

  • cell (Cell) – The cell object.

  • colormap_synapses (dict) – A dictionary mapping color to synapse types. The keys must match the synapse types in the dendrogram. Missing keys will be omitted from the visualization alltogether. Default: None (plot all synapses in black).

Attributes:

dendrogram_db

A list of _DendrogramSection objects.

Type:

list

cell

The cell object.

Type:

Cell

colormap_synapses

A dictionary mapping color to synapse types. The keys must match the synapse types in the dendrogram. Missing keys will be omitted from the visualization alltogether. Default: None (plot all synapses in black).

Type:

dict

bins

The bins of the synapse density histogram.

Type:

np.array

synapse_density

The synapse density histogram, i.e. the amount of synapses within a range of soma distance.

Type:

np.array

synapse_density_apical

The synapse density histogram for apical dendrites.

Type:

np.array

synapse_density_basal

The synapse density histogram for basal dendrites.

Type:

np.array

synapse_statistics

A dictionary of synapse statistics

Type:

dict

Methods:

_add_synapses()

Add synapses to the dendrogram sections.

get_number_of_synapses_in_bin(min_, max_, select, label)

Get the number of synapses in a certain bin of soma distance.

_compute_synapse_hist(binsize)

Compute the synapse density histogram.

_compute_synapse_statistics()

Compute the synapse statistics.

_plot_synapse_density_hist(ax, xlim, binsize)

Plot the synapse density histogram on an matplotlib.axes.Axes object.

_plot_synapse_hist(ax, dendrite_density)

Plot the synapse histogram on an matplotlib.Axes object.

_plot_synapses_dendrogram_overlay(ax)

Plot the synapses on the dendrogram.

plot(ax)

Plot the synapse statistics