Population Activity of CBGTC spike times¶
- class analyseur.cbgtc.stats.popact.PopAct[source]¶
Bases:
object- static compute_complexity_pdf(spike_counts_per_bin)[source]¶
Returns the complexity probability distribution
\[P(k) = \frac{n_k}{B}\]such that \(\sum_{k=0}^{k_\text{max}} P(k) = 1\), complexity in the spike count in a bin is \(k=0,1,\ldots,k_\text{max}\), and the number of bins whose spike count equal \(k\) is given by
\[n_k = \sum_{b=1}^B 1(C_b = k)\]where \(1(.)\) is the indicator function, \(B\) is the number of time bins, \(C = \{C_b\}\) is the spike counts per bin such that \(C_b\) is the number of spikes in bin \(b\), and \(k_\text{max} = \text{max}(C)\)
- Parameters:
spike_counts_per_bin – array returned using
count_allspikes_per_bin()- Returns:
3-tuple
complexities ≜ array with the range [0, maximum spike count]
complexity_counts ≜ occurrences of each complexity
pdf ≜ array of each occurrences ÷ total number of bins
- classmethod count_allspikes_per_bin(spiketimes_set, binsz)[source]¶
Returns spike counts (from any neuron) in each bin
\[\{C_k\}_{k=0}^{K-1}\]where \(C_k\) is the spike couns per bin \(k\) given by
\[C_k = \sum_{i=1}^{n_\text{nuc}} \sum_{j=1}^{K_i}1(b_k \le t_{ij} < b_{k+1})]\]with the indicator function \(1(.)\), bin width \(\Delta t\), number of bins \(\lceil(T_\text{max} - T_\text{min})/\Delta t\rceil\) such that \(T_\text{min} = \text{min}(S_\text{all}), T_\text{max} = \text{max}(S_\text{all}), S_\text{all} = \bigcup_{i=1}^{n_\text{nuc}} S_i, S_i = \{t_{i1}, t_{i2}, \ldots, t_{iK_i}\}\), and bin edges \(b_k = T_\text{min} + k\Delta t\) for \(k=0,1,\ldots,K\). The bin centers are \(c_k = (b_k + b_{k+1})/2\).
- Parameters:
spiketimes_set – Dictionary returned using
get_spiketimes_superset()
or using
get_spiketimes_subset()- Parameters:
binsz – integer or float; 0.01 [default]
- Returns:
2-tuple
array of spike counts per unique bins
array of time bin centers