def build_test_data(self, variable='v'):
metadata = {
'size': NCELLS,
'first_index': 0,
'first_id': 0,
'n': 505,
'variable': variable,
'last_id': NCELLS - 1,
'last_index': NCELLS - 1,
'dt': 0.1,
'label': "population0",
}
if variable == 'v':
metadata['units'] = 'mV'
elif variable == 'spikes':
metadata['units'] = 'ms'
data = np.empty((505, 2))
for i in range(NCELLS):
# signal
data[i*101:(i+1)*101, 0] = np.arange(i, i+101, dtype=float)
# index
data[i*101:(i+1)*101, 1] = i*np.ones((101,), dtype=float)
return data, metadata
评论列表
文章目录