Skip to content
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

about plot waveforms #3594

Open
ohkoibln opened this issue Dec 20, 2024 · 7 comments
Open

about plot waveforms #3594

ohkoibln opened this issue Dec 20, 2024 · 7 comments
Labels
widgets Related to widgets module

Comments

@ohkoibln
Copy link

I already had my sorting results unit_1_waveforms.npy,unit_2_waveforms.npy .How could I use the sw.plot_unit_waveforms(sorting_analyzer, unit_ids=unit_ids, figsize=(16, 4)) directly?

@ohkoibln
Copy link
Author

您好,我们尝试解决了这个问题。

我们是这样做的:

修改了 UnitWaveformsWidget,以接受预先计算的波形作为输入。这允许用户直接将 plot_unit_waveforms 与自己的波形文件一起使用,而无需 SortingAnalyzer 或 Templates 对象。

您可以在此提交中查看更改:wwqwq2313@c2f8448

谨慎

免责声明:解决方案的概念是由 AI 创建的,在检查生成的代码的正确性之前,切勿复制粘贴此代码。解决方案可能不完整,您应该仅将此代码用作灵感。

如果您不再希望 Latta AI 尝试解决存储库中的问题,则可以阻止此账户。
Thanks, I will try!

@ohkoibln
Copy link
Author

could I draw waveforms of all units in a figure

@alejoe91
Copy link
Member

You need to load the sorting analyzer with the si.load_sorting_analyzer() function. Then you can use the sw.plot_unit_waveforms(sorting_analyzer), which will plot all units!

@alejoe91 alejoe91 added the widgets Related to widgets module label Dec 20, 2024
@ohkoibln
Copy link
Author

You need to load the sorting analyzer with the si.load_sorting_analyzer() function. Then you can use the sw.plot_unit_waveforms(sorting_analyzer), which will plot all units!

ok, I also want to plot some units with different colors in one axis,not in different axises.

@alejoe91
Copy link
Member

then you can use the same_axis=True argument: sw.plot_unit_waveforms(sorting_analyzer, same_axis=True)

@ohkoibln
Copy link
Author

load_sorting_analyzer()

Thanks a lot!

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

No branches or pull requests

3 participants
@alejoe91 @ohkoibln and others