changed for multiple repros
This commit is contained in:
parent
1ab2daa258
commit
3bcc6b72ad
@ -18,23 +18,25 @@ for feat in mt.features:
|
|||||||
feature_dict.update({feat.data.name[16:]: mt.features[feat.data.name].data[:]})
|
feature_dict.update({feat.data.name[16:]: mt.features[feat.data.name].data[:]})
|
||||||
|
|
||||||
tags = b.tags
|
tags = b.tags
|
||||||
|
intervals_dict = defaultdict(list)
|
||||||
|
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
if tag.name.startswith('Baseline'):
|
if tag.name.startswith('Baseline'):
|
||||||
continue
|
continue
|
||||||
|
curr_comb = tag.metadata["RePro-Info"]["settings"]["object"]
|
||||||
repro_pos, = tag.position
|
repro_pos, = tag.position
|
||||||
repro_ext, = tag.extent
|
repro_ext, = tag.extent
|
||||||
|
idx_qry = np.logical_and(repro_pos < comb_pos, comb_pos < (repro_pos + repro_ext))
|
||||||
|
tag_idx = np.flatnonzero(idx_qry)
|
||||||
|
tag_pos = comb_pos[idx_qry]
|
||||||
|
|
||||||
tag_idx = np.where(np.logical_and(repro_pos < comb_pos, comb_pos < (repro_pos+repro_ext)))
|
for idx, position in zip(tag_idx, tag_pos):
|
||||||
embed()
|
|
||||||
quit()
|
|
||||||
tag_idx_pos = comb_pos[np.logical_and(repro_pos < comb_pos, comb_pos < (repro_pos + repro_ext))]
|
|
||||||
|
|
||||||
|
|
||||||
intervals_dict = defaultdict(list)
|
|
||||||
for idx, position in enumerate(comb_pos):
|
|
||||||
if idx == (len(comb_pos)-1):
|
if idx == (len(comb_pos)-1):
|
||||||
break
|
break
|
||||||
curr_speed = feature_dict['speed'][idx]
|
curr_speed = feature_dict['speed'][idx]
|
||||||
curr_pos = comb_pos[idx]
|
curr_pos = comb_pos[idx]
|
||||||
curr_dir = feature_dict['direction'][idx]
|
curr_dir = feature_dict['direction'][idx]
|
||||||
curr_spikes = spikes[(spikes < comb_pos[idx + 1]) & (spikes > comb_pos[idx])]
|
curr_spikes = spikes[(spikes < comb_pos[idx + 1]) & (spikes > comb_pos[idx])]
|
||||||
|
intervals_dict.update({(tag.name, curr_speed, curr_dir, curr_pos, curr_comb): curr_spikes})
|
||||||
|
embed()
|
||||||
|
quit()
|
Loading…
Reference in New Issue
Block a user