elephant.spike_train_generation.inhomogeneous_gamma_process¶
-
elephant.spike_train_generation.
inhomogeneous_gamma_process
(rate, shape_factor, as_array=False)[source]¶ Returns a spike train whose spikes are a realization of an inhomogeneous Gamma process with the given rate profile and the given shape factor [gen2].
Parameters: - rateneo.AnalogSignal
A neo.AnalogSignal representing the rate profile evolving over time. Its values have all to be >=0. The output spiketrain will have t_start = rate.t_start and t_stop = rate.t_stop
- shape_factorfloat
The shape factor of the Gamma process
- as_arraybool, optional
If True, a NumPy array of sorted spikes is returned, rather than a SpikeTrain object. Default: False
Returns: - spiketrainneo.SpikeTrain or np.ndarray
Inhomogeneous Poisson process realization, of type neo.SpikeTrain if as_array is False (default) and np.ndarray otherwise.
Raises: - ValueError
If rate is not a neo AnalogSignal If rate contains a negative value.