[WIP] GUI: average spectrogram across trials instead of using first dipole#1215
[WIP] GUI: average spectrogram across trials instead of using first dipole#1215Tusharjamdade wants to merge 5 commits intojonescompneurolab:masterfrom
Conversation
|
Thanks for your PR Tushar, we will try to get to this PR (and your others) when we can; things are particularly busy right now. We appreciate your patience. |
|
Hi maintainers, this PR is for GSoC 2026. Could you please add the |
| ax=ax, | ||
| colorbar_inside=True, | ||
| show=False, | ||
| for dpl in dpls_copied: |
There was a problem hiding this comment.
Hey @Tusharjamdade this is a great solution!
I wanted to draw your attention to the plot_tfr_morlet() function. As you have seen, there is indeed a method attached to the Dipole class that calls this function. However, if you import the function directly from viz.py, you can see that it accept a list of dipoles, and computes the average TFR similar to what you have done here
Line 956 in 1d878ed
Ultimately the line change will be much more subtle and look like
plot_tfr_morlet(dpls_copied, ...)e8f1f7f to
1f66984
Compare
1f66984 to
12d4ee8
Compare
|
Hi @ntolley, Thank you for the review and for pointing me to the existing Please let me know if any further changes or refinements are needed. |
|
Hello Tushar, Can you please write a test for your changes in
Be warned that the code for |
|
@asoplata, thank you for suggesting the test for this functionality. I have implemented it as per your suggestions. It also helped me gain a better understanding of the |
|
Hello Tushar, In the interest of merging work by other GSOC candidates, we've made the decision that we will not be merging this PR into Nonetheless, we will take your demonstration of technical and communication abilities in this and other PRs into account during our GSOC review process :) ! |
Fixes #1166
This PR fixes the spectrogram behavior in the GUI when a simulation contains multiple trials
(n_trials > 1). Previously, only the first Dipole instance was used to compute the spectrogram, which did not accurately represent multi-trial simulations.