Skip to content

Add color_channels option in in plot_probe_map#2740

Merged
alejoe91 merged 12 commits intoSpikeInterface:mainfrom
RobertoDF:main
May 13, 2024
Merged

Add color_channels option in in plot_probe_map#2740
alejoe91 merged 12 commits intoSpikeInterface:mainfrom
RobertoDF:main

Conversation

@RobertoDF
Copy link
Copy Markdown
Contributor

Fix #2739

@alejoe91 alejoe91 added the widgets Related to widgets module label Apr 22, 2024
@alejoe91
Copy link
Copy Markdown
Member

Thanks @RobertoDF, I think it's a good solution. Can you add a code example here and a screenshot to show how it looks?

@RobertoDF
Copy link
Copy Markdown
Contributor Author

Here it is:

# two probe groups in rec
bad_channel_ids, channel_labels = detect_bad_channels(high_passed_rec, dead_channel_threshold=-1)

color_channels = [channel_label_color_dict[label] for label in channel_labels]

si.plot_probe_map(raw_rec, color_channels=color_channels, with_channel_ids=False)
Screenshot 2024-04-22 at 13 24 09

Copy link
Copy Markdown
Member

@alejoe91 alejoe91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RobertoDF one last suggestion. I think that instead of passing a list of one elements, one easier option is to allow this:

plot_probe_map(rec, color_channels="r")

See implementation details in review :)

Comment thread src/spikeinterface/widgets/probe_map.py Outdated
Comment thread src/spikeinterface/widgets/probe_map.py Outdated
Comment thread src/spikeinterface/widgets/probe_map.py Outdated
@RobertoDF
Copy link
Copy Markdown
Contributor Author

definitely better 👍👍

@alejoe91 alejoe91 changed the title Filter channel_ids in plot_probe_map Add color_channels option in in plot_probe_map May 7, 2024
@alejoe91
Copy link
Copy Markdown
Member

alejoe91 commented May 7, 2024

@RobertoDF can you fix the conflict? Looks good to merge after that!

@RobertoDF
Copy link
Copy Markdown
Contributor Author

ah yes, my mistake. hope it is ok now.

@alejoe91 alejoe91 merged commit 3e9cff3 into SpikeInterface:main May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

widgets Related to widgets module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

channel_ids in plot_probe_map function does not work

2 participants