-
Notifications
You must be signed in to change notification settings - Fork 203
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
Adding colorbar support to peak activity widget #3646
base: main
Are you sure you want to change the base?
Adding colorbar support to peak activity widget #3646
Conversation
adding colorbar support with option of having variable/fixed range when animating
for more information, see https://pre-commit.ci
Hi @abhinavsns Thank you for the PR! Can you add more information in the PR description and a screenshot/screencast of the widget with the change? |
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.
Couple initial questions from me. But I personally think this cool!
): | ||
rates = self._compute_rates(rec, peaks, duration) | ||
|
||
self.artists = () |
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.
why did we need to put the artists into the class? It seems like they only exist inside the function or am I misreading?
self._plot_one_bin( | ||
rec, probe, peaks, duration, dp.with_channel_ids, dp.with_contact_color, dp.with_interpolated_map | ||
) | ||
if type(dp.fixed_color_range) in [tuple, list]: |
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.
docstring only says tuple. This is a tiny point though so not sure we need to change.
rec, probe, peaks, duration, dp.with_channel_ids, dp.with_contact_color, dp.with_interpolated_map | ||
) | ||
if type(dp.fixed_color_range) in [tuple, list]: | ||
self.vmin, self.vmax = dp.fixed_color_range |
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.
if you're just putting them into the function why do you need to pull them out and put them in the class?
I am following the tutorial located at: https://spikeinterface.readthedocs.io/en/stable/tutorials/widgets/plot_4_peaks_gallery.html
The feature for plotting and animating was already present. This PR adds support for the color bar which is not implemented.
Attached are the screenshot and gifs for the same tutorial when using




with_color_bar
andfixed_color_range
arguments.