-
Notifications
You must be signed in to change notification settings - Fork 76
The Spiketime Data Class
Patricia Wollstadt edited this page Feb 28, 2022
·
1 revision
IDTxl uses its own class to handle data.
from idtxl.data_spiketime import Data_spiketime
The Spiketime Data class holds up to 2D data, where one dimension represents processes and the second dimension represents spike timings.
spiketimes_0 = np.array([0. , 0.247 , 0.623 , 0.7725, 1.1965, 1.356 , 1.521 , 1.8745])
spiketimes_1 = np.array([2.397 , 2.6385, 3.063 , 3.26 , 3.471 , 3.865 , 4.0635, 4.4515, 4.7015, 4.931])
data = Data_spiketime(np.array([spiketimes_0, spiketimes_1], dtype=object)) # add spike timings for 2 processes, dtype=object to avoid deprecation warning
Note that the number of spikes can vary between processes (i.e., input data are provided as a ragged 2D-array).
For a further example, load the test data:
data = Data_spiketime() # initialise empty data object
data.load_Rudelt_data() # load Rudelt spike time data