def isi_profile_multi(spike_trains, indices=None): """ Specific function to compute the multivariate ISI-profile for a set of spike trains. This is a deprecated function and should not be called directly. Use :func:`.isi_profile` to compute ISI-profiles. :param spike_trains: list of :class:`.SpikeTrain` :param indices: list of indices defining which spike trains to use, if None all given spike trains are used (default=None) :type state: list or None :returns: The averaged isi profile :math:`<I(t)>` :rtype: :class:`.PieceWiseConstFunc` """ average_dist, M = _generic_profile_multi(spike_trains, isi_profile_bi, indices) average_dist.mul_scalar(1.0 / M) # normalize return average_dist
def spike_profile_multi(spike_trains, indices=None): """ Specific function to compute a multivariate SPIKE-profile. This is a deprecated function and should not be called directly. Use :func:`.spike_profile` to compute SPIKE-profiles. :param spike_trains: list of :class:`.SpikeTrain` :param indices: list of indices defining which spike trains to use, if None all given spike trains are used (default=None) :type indices: list or None :returns: The averaged spike profile :math:`<S>(t)` :rtype: :class:`.PieceWiseLinFunc` """ average_dist, M = _generic_profile_multi(spike_trains, spike_profile_bi, indices) average_dist.mul_scalar(1.0/M) # normalize return average_dist
def spike_train_order_profile_multi(spike_trains, indices=None, max_tau=None): """ Computes the multi-variate spike train order profile for a set of spike trains. For each spike in the set of spike trains, the multi-variate profile is defined as the sum of asymmetry values divided by the number of spike trains pairs involving the spike train of containing this spike, which is the number of spike trains minus one (N-1). :param spike_trains: list of :class:`pyspike.SpikeTrain` :param indices: list of indices defining which spike trains to use, if None all given spike trains are used (default=None) :type indices: list or None :param max_tau: Maximum coincidence window size. If 0 or `None`, the coincidence window has no upper bound. :returns: The multi-variate spike sync profile :math:`<S_{sync}>(t)` :rtype: :class:`pyspike.function.DiscreteFunction` """ prof_func = partial(spike_train_order_profile_bi, max_tau=max_tau) average_prof, M = _generic_profile_multi(spike_trains, prof_func, indices) return average_prof
def spike_sync_profile_multi(spike_trains, indices=None, max_tau=None): """ Specific function to compute a multivariate SPIKE-Sync-profile. This is a deprecated function and should not be called directly. Use :func:`.spike_sync_profile` to compute SPIKE-Sync-profiles. :param spike_trains: list of :class:`pyspike.SpikeTrain` :param indices: list of indices defining which spike trains to use, if None all given spike trains are used (default=None) :type indices: list or None :param max_tau: Maximum coincidence window size. If 0 or `None`, the coincidence window has no upper bound. :returns: The multi-variate spike sync profile :math:`<S_{sync}>(t)` :rtype: :class:`pyspike.function.DiscreteFunction` """ prof_func = partial(spike_sync_profile_bi, max_tau=max_tau) average_prof, M = _generic_profile_multi(spike_trains, prof_func, indices) # average_dist.mul_scalar(1.0/M) # no normalization here! return average_prof
def isi_profile_multi(spike_trains, indices=None): """ computes the multi-variate isi distance profile for a set of spike trains. That is the average isi-distance of all pairs of spike-trains: .. math:: <I(t)> = \\frac{2}{N(N-1)} \\sum_{<i,j>} I^{i,j}, where the sum goes over all pairs <i,j> :param spike_trains: list of :class:`.SpikeTrain` :param indices: list of indices defining which spike trains to use, if None all given spike trains are used (default=None) :type state: list or None :returns: The averaged isi profile :math:`<I(t)>` :rtype: :class:`.PieceWiseConstFunc` """ average_dist, M = _generic_profile_multi(spike_trains, isi_profile, indices) average_dist.mul_scalar(1.0/M) # normalize return average_dist
def spike_sync_profile_multi(spike_trains, indices=None, max_tau=None): """ Computes the multi-variate spike synchronization profile for a set of spike trains. For each spike in the set of spike trains, the multi-variate profile is defined as the number of coincidences divided by the number of spike trains pairs involving the spike train of containing this spike, which is the number of spike trains minus one (N-1). :param spike_trains: list of :class:`pyspike.SpikeTrain` :param indices: list of indices defining which spike trains to use, if None all given spike trains are used (default=None) :type indices: list or None :param max_tau: Maximum coincidence window size. If 0 or `None`, the coincidence window has no upper bound. :returns: The multi-variate spike sync profile :math:`<S_{sync}>(t)` :rtype: :class:`pyspike.function.DiscreteFunction` """ prof_func = partial(spike_sync_profile, max_tau=max_tau) average_prof, M = _generic_profile_multi(spike_trains, prof_func, indices) # average_dist.mul_scalar(1.0/M) # no normalization here! return average_prof