hnn-core icon indicating copy to clipboard operation
hnn-core copied to clipboard

GUI: `PSD Layers` plot does not plot PSD of layers

Open asoplata opened this issue 1 year ago • 3 comments

In the original tutorials ( https://jonescompneurolab.github.io/hnn-tutorials/gamma/gamma ), we use the equivalent of the GUI's PSD Layers (3x1) Figure Layout template to illustrate some scientific points about the difference between the layers; see Figure 10 in that link.

However, in the current GUI, creating a PSD Layers (3x1) Figure shows layer-specific dipoles, NOT layer-specific PSDs, see below:

Screenshot_20241126_100743

I have been told that this is a known issue, and was expected to be implemented before the next official release of the Tutorials, but I couldn't find any pre-existing Issues/PRs that describe it.

asoplata avatar Nov 26 '24 15:11 asoplata

Agree we should do this before 0.4!

dylansdaniels avatar Nov 26 '24 17:11 dylansdaniels

may I work on this issue @ntolley ?

chelseace avatar Jan 28 '25 18:01 chelseace

Yes definitely! This will require using the plot_psd() function with the GUI code: https://jonescompneurolab.github.io/hnn-core/stable/generated/hnn_core.viz.plot_psd.html#hnn_core.viz.plot_psd

I'd start by trying to make the desired plot on it's own (just a regular simulation in a jupyter notebook). Additionally you should install the GUI so that you can try reproducing the issue above.

Once you're ready to start modifying the code, the best place to start will be here: https://github.com/jonescompneurolab/hnn-core/blob/1ef293bdd26bceae564d3c8ed4dda075d5fc2424/hnn_core/gui/_viz_manager.py#L133

and here: https://github.com/jonescompneurolab/hnn-core/blob/1ef293bdd26bceae564d3c8ed4dda075d5fc2424/hnn_core/gui/_viz_manager.py#L22

All of the plot_types have a corresponding line of code lower down which calls the appropriate plotting function. You will need to add two new plot_type which exclusively plot 1) layer2/3 PSD, 2) layer 5 PSD. The current PSD can be left as is since it plots the combination of the layers.

Don't hesitate to tag us if you have any questions!

ntolley avatar Jan 31 '25 17:01 ntolley

Hey @ntolley I'm interested in working on this project. I have gone through the tutorials, and for this particular issue, I am ready with the code changes. However, I am unable to run the GUI. Do you have any documentation for testing the GUI?

Additionally, I faced some issues while installing dependencies. I will track them down and find the necessary resolutions.

Praneetha-15 avatar Mar 09 '25 03:03 Praneetha-15

Hi @Praneetha-15. This has been removed as a 'good first issue' as we already have an open PR that solves this. Please select another one to get started!

dylansdaniels avatar Mar 12 '25 14:03 dylansdaniels

Connecting this to PR #957

dylansdaniels avatar Mar 12 '25 14:03 dylansdaniels

Resolved via #957 .

asoplata avatar Mar 17 '25 20:03 asoplata