add chirpsize to dict
This commit is contained in:
parent
258b3074b8
commit
e1add34c41
@ -19,15 +19,17 @@ def load_chirp_spikes(dataset):
|
|||||||
df = l.split(":")[-1]
|
df = l.split(":")[-1]
|
||||||
if "contrast" in l and "true" not in l:
|
if "contrast" in l and "true" not in l:
|
||||||
contrast = l.split(":")[-1]
|
contrast = l.split(":")[-1]
|
||||||
|
if "chirpsize" in l:
|
||||||
|
cs = l.split(":")[-1]
|
||||||
if "#Key" in l:
|
if "#Key" in l:
|
||||||
spikes[(index, df, contrast)] = {}
|
spikes[(index, df, contrast, cs)] = {}
|
||||||
if "chirp index" in l:
|
if "chirp index" in l:
|
||||||
ci = int(l.split(":")[-1])
|
ci = int(l.split(":")[-1])
|
||||||
if "beat phase" in l:
|
if "beat phase" in l:
|
||||||
phase = float(l.split(":")[-1])
|
phase = float(l.split(":")[-1])
|
||||||
spikes[(index, df, contrast)][(ci, phase)] = []
|
spikes[(index, df, contrast, cs)][(ci, phase)] = []
|
||||||
if len(l.strip()) != 0 and "#" not in l:
|
if len(l.strip()) != 0 and "#" not in l:
|
||||||
spikes[(index, df, contrast)][(ci, phase)].append(float(l))
|
spikes[(index, df, contrast, cs)][(ci, phase)].append(float(l))
|
||||||
return spikes
|
return spikes
|
||||||
|
|
||||||
|
|
||||||
@ -47,12 +49,15 @@ def load_chirp_times(dataset):
|
|||||||
df = l.split(":")[-1]
|
df = l.split(":")[-1]
|
||||||
if "contrast" in l and "true" not in l:
|
if "contrast" in l and "true" not in l:
|
||||||
contrast = l.split(":")[-1]
|
contrast = l.split(":")[-1]
|
||||||
|
if "chirpsize" in l:
|
||||||
|
cs = l.split(":")[-1]
|
||||||
if "#Key" in l:
|
if "#Key" in l:
|
||||||
chirp_times[(index, df, contrast)] = []
|
chirp_times[(index, df, contrast, cs)] = []
|
||||||
if len(l.strip()) != 0 and "#" not in l:
|
if len(l.strip()) != 0 and "#" not in l:
|
||||||
chirp_times[(index, df, contrast)].append(float(l.split()[1]))
|
chirp_times[(index, df, contrast, cs)].append(float(l.split()[1]))
|
||||||
return chirp_times
|
return chirp_times
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
data_dir = "../data"
|
data_dir = "../data"
|
||||||
dataset = "2018-11-09-ad-invivo-1"
|
dataset = "2018-11-09-ad-invivo-1"
|
||||||
|
Loading…
Reference in New Issue
Block a user