def mean_isi_range(self, cluster: int, n: int) -> float:
    '\n        Calculates the mean of the autocorrelation from 0 to n milliseconds\n        Used to help classify a neurons type (principal, interneuron etc)\n\n        Parameters\n        ----------\n        cluster : int\n            The cluster to analyse\n        n : int\n            The range in milliseconds to calculate the mean over\n\n        Returns\n        -------\n        mean_isi_range : float\n            The mean of the autocorrelogram between 0 and n milliseconds\n        '
    if (cluster not in self.spk_clusters):
        raise IndexError('Cluster not available')
    bins = 201
    trange = np.array(((- 500), 500))
    t = self.spike_times[(self.spk_clusters == cluster)]
    y = self.xcorr(t, Trange=trange)
    y = y.astype(np.int64)
    (counts, bins) = np.histogram(y[(y != 0)], bins=bins, range=trange)
    mask = np.logical_and((bins > 0), (bins < n))
    return np.mean(counts[mask[1:]])
Calculates the mean of the autocorrelation from 0 to n milliseconds
Used to help classify a neurons type (principal, interneuron etc)

Parameters
----------
cluster : int
    The cluster to analyse
n : int
    The range in milliseconds to calculate the mean over

Returns
-------
mean_isi_range : float
    The mean of the autocorrelogram between 0 and n milliseconds
def mean_isi_range(self, cluster: int, n: int) -> float:
    '\n        Calculates the mean of the autocorrelation from 0 to n milliseconds\n        Used to help classify a neurons type (principal, interneuron etc)\n\n        Parameters\n        ----------\n        cluster : int\n            The cluster to analyse\n        n : int\n            The range in milliseconds to calculate the mean over\n\n        Returns\n        -------\n        mean_isi_range : float\n            The mean of the autocorrelogram between 0 and n milliseconds\n        '
    if (cluster not in self.spk_clusters):
        raise IndexError('Cluster not available')
    bins = 201
    trange = np.array(((- 500), 500))
    t = self.spike_times[(self.spk_clusters == cluster)]
    y = self.xcorr(t, Trange=trange)
    y = y.astype(np.int64)
    (counts, bins) = np.histogram(y[(y != 0)], bins=bins, range=trange)
    mask = np.logical_and((bins > 0), (bins < n))
    return np.mean(counts[mask[1:]])