simuran.analysis.unit module¶
-
simuran.analysis.unit.bin_spike_train(spike_train: Union[Dict[int, numpy.ndarray], List[numpy.ndarray]], bin_step: float = 0.1, bin_overlap: float = 0.0, t_start: float = 0, t_stop: Optional[float] = None, bin_type: str = 'count', smooth: bool = False) → numpy.ndarray¶ Bin a spike train.
Parameters: - spike_train (np.ndarray) – The spike train to bin.
- bin_step (float) – The size of the bins in seconds.
- bin_overlap (float, optional) – The overlap between bins in seconds, by default 0.
- t_start (float, optional) – The start time of the spike train, by default 0.
- t_stop (float, optional) – The end time of the spike train, by default None.
- bin_type (str, optional) – The type of binning to do, by default “count”. Options are “count”, “rate”, “binary”.
Returns: The binned spike train.
Return type: np.ndarray