pymaid.connection_density¶
- pymaid.connection_density(s, t, method='MEDIAN', normalize='DENSITY', remote_instance=None)[source]¶
Calculate connection density.
Given source neuron(s)
s
and a target neuront
, calculate the local density of connections as function of the geodesic distance between the postsynaptic contacts on target neuront
.The general idea here is that spread out contacts might be more effective in depolarizing dendrites of the postsynaptic neuron than highly localized ones. See Gouwens and Wilson, Journal of Neuroscience (2009) for example.
- Parameters
s (skeleton ID | CatmaidNeuron | CatmaidNeuronList) – Source and target neuron, respectively. Multiple sources are allowed. Target must be single neuron. If
t
is a CatmaidNeuron, will use connectors and total cable to this neuron. Use to subset density calculations to e.g. the dendrites.t (skeleton ID | CatmaidNeuron | CatmaidNeuronList) – Source and target neuron, respectively. Multiple sources are allowed. Target must be single neuron. If
t
is a CatmaidNeuron, will use connectors and total cable to this neuron. Use to subset density calculations to e.g. the dendrites.method ('SUM' | 'AVERAGE' | 'MEDIAN', optional) – Arithmetic method used to collapse pairwise geodesic distances over all synaptic contacts on
t
froms
into connection densityD
.normalize ('DENSITY' | 'CABLE' | False) –
Normalization method:
DENSITY
: normalize by synapse density over all postsynapses of the targetCABLE
: normalize by total cable length of the targetFalse
: no normalization
remote_instance (CatmaidInstance, optional) –
- Returns
connection density – Will return
None
if no connections or if only a single connection between source and target.- Return type
float