import pyrelacs.DataLoader as dl

for metadata, key, data in dl.iload('2012-06-27-ah-invivo-1/basespikes1.dat'):
    print(data.shape)
    break

# mean firing rate (number of spikes per time)
# CV (stdev of ISI divided by mean ISI (np.diff(spiketimes))
# ISI histogram (play around with binsize! < 1ms)
# Vectorstaerke (use EOD frequency from header (metadata)) VS > 0.8
# dl.iload_traces(repro='BaselineActivity')

def test():
    for metadata, key, data in dl.iload('data/2012-06-27-ah-invivo-1/basespikes1.dat'):
        print(data.shape)
        for i in metadata:
            for key in i.keys():
                print(key, ":", i[key])

        break