visualizedendrogram_DendrogramDendriteStatistics

_DendrogramDendriteStatistics

class visualize.dendrogram._DendrogramDendriteStatistics(dendrogram_db, colormap_synapses=None)

Compute dendrite statistics from a dendrogram.

Dendrite statistics includes the total amount of dendritic length in a certain bin of soma distance. This is useful for calculating synapse statistics as well.

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

  • 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

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 dendrite density histogram.

Type:

np.array

dendrite_density

The dendrite density histogram, i.e. the amount of dendritic length within a range of soma distance.

Type:

np.array

Methods:

plot(ax)

Plot the dendrite statistics.

_get_amount_of_dendrite_in_bin(min_, max_)

Get the amount of dendritic length in a certain bin of soma distance.

_plot_dendrite_hist(ax, xlim, binsize)

Base method for plotting a histogram of dendrite length on an matplotlib.axes.Axes object.

_compute_dendrite_hist(dist_end, binsize)

Compute the dendrite density histogram.