# Analysis¶

## Statistics of spike trains¶

`brian.``firing_rate`(spikes)

Rate of the spike train.

`brian.``CV`(spikes)

Coefficient of variation.

`brian.``correlogram`(T1, T2, width=20.0 * msecond, bin=1.0 * msecond, T=None)

Returns a cross-correlogram with lag in [-width,width] and given bin size. T is the total duration (optional) and should be greater than the duration of T1 and T2. The result is in Hz (rate of coincidences in each bin).

N.B.: units are discarded. TODO: optimise?

`brian.``autocorrelogram`(T0, width=20.0 * msecond, bin=1.0 * msecond, T=None)

Returns an autocorrelogram with lag in [-width,width] and given bin size. T is the total duration (optional) and should be greater than the duration of T1 and T2. The result is in Hz (rate of coincidences in each bin).

`brian.``CCF`(T1, T2, width=20.0 * msecond, bin=1.0 * msecond, T=None)

Returns the cross-correlation function with lag in [-width,width] and given bin size. T is the total duration (optional). The result is in Hz**2: CCF(T1,T2)=<T1(t)T2(t+s)>

`brian.``ACF`(T0, width=20.0 * msecond, bin=1.0 * msecond, T=None)

Returns the autocorrelation function with lag in [-width,width] and given bin size. T is the total duration (optional). The result is in Hz**2: ACF(T0)=<T0(t)T0(t+s)>

`brian.``CCVF`(T1, T2, width=20.0 * msecond, bin=1.0 * msecond, T=None)

Returns the cross-covariance function with lag in [-width,width] and given bin size. T is the total duration (optional). The result is in Hz**2: CCVF(T1,T2)=<T1(t)T2(t+s)>-<T1><T2>

`brian.``ACVF`(T0, width=20.0 * msecond, bin=1.0 * msecond, T=None)

Returns the autocovariance function with lag in [-width,width] and given bin size. T is the total duration (optional). The result is in Hz**2: ACVF(T0)=<T0(t)T0(t+s)>-<T0>**2

`brian.``total_correlation`(T1, T2, width=20.0 * msecond, T=None)
`brian.``spike_triggered_average`(spikes, stimulus, max_interval, dt, onset=None, display=False)