-
Notifications
You must be signed in to change notification settings - Fork 17
Add spikeinterface automerge presets #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add spikeinterface automerge presets #199
Conversation
|
bravo |
|
I changed all the naming to match the "preset" language we use in spikeinterface. I like the idea of eventually making the similarity be a spikeinterface preset, but I really like the current similarity tools: you can try different similarity metrics, it's all cached nicely, it won't overwrite the |
|
@alejoe91 @samuelgarcia in mergeview, line 100 (
for info_name in more_labels:
values = []
for unit_id1, unit_id2 in itertools.combinations(group_ids, 2):
unit_ind1 = unit_ids.index(unit_id1)
unit_ind2 = unit_ids.index(unit_id2)
values.append(self.merge_info[info_name][unit_ind1][unit_ind2])Questions:
|
Ah now I understand why @samuelgarcia had a list of supported labels...I thought we could generalize! |
|
@chrishalcrow can you test now? Should be fixed! |
| merge_info = self.merge_info[info_name] | ||
| if isinstance(merge_info, np.ndarray) and \ | ||
| merge_info.shape == (len(unit_ids), len(unit_ids)): | ||
| for unit_id1, unit_id2 in itertools.combinations(group_ids, 2): | ||
| unit_ind1 = unit_ids.index(unit_id1) | ||
| unit_ind2 = unit_ids.index(unit_id2) | ||
| values.append(merge_info[unit_ind1][unit_ind2]) | ||
|
|
||
| if max_group_size == 2: | ||
| row[info_name] = f"{values[0]:.2f}" | ||
| else: | ||
| min_, max_ = min(values), max(values) | ||
| row[f"{info_name}_min"] = f"{min_:.2f}" | ||
| row[f"{info_name}_max"] = f"{max_:.2f}" | ||
| else: | ||
| min_, max_ = min(values), max(values) | ||
| row[f"{info_name}_min"] = f"{min_:.2f}" | ||
| row[f"{info_name}_max"] = f"{max_:.2f}" | ||
| if info_name in labels: | ||
| labels.remove(info_name) | ||
| elif f"{info_name}_min" in labels: | ||
| labels.remove(f"{info_name}_min") | ||
| labels.remove(f"{info_name}_max") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For @samuelgarcia
Changed the logic here to be able to show any extra outs with shape (num_units, num_units), instead of pre-selecting potential labels
| num_channels = 32 | ||
| num_units = 16 | ||
| elif case == 'medium_split': | ||
| elif case == 'medium-split': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed this to - to have this line work:
test_folder.stem.split('_')[-1]


Compute potential automerges using presets inherited from spikeinterface (and still do similarity, since it's so nice and simple!)
Possible improvement: use the spikeinterface nomonclenture of presets instead of methods?