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

[WIP] Fix Freq in GUI PSD Plot #914

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion hnn_core/gui/_viz_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,10 @@ def _update_ax(fig, ax, single_simulation, sim_name, plot_type, plot_config):

elif plot_type == 'PSD':
if len(dpls_copied) > 0:
min_f = plot_config['min_spectral_frequency']
max_f = plot_config['max_spectral_frequency']
color = ax._get_lines.get_next_color()
dpls_copied[0].plot_psd(fmin=0, fmax=50, ax=ax, color=color,
dpls_copied[0].plot_psd(fmin=min_f, fmax=max_f, ax=ax, color=color,
Copy link
Contributor

@ntolley ntolley Oct 18, 2024

Choose a reason for hiding this comment

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

This is great! Can you checkout the spectrogram tests associated with #894 to verify that the PSD plot is rendered correctly?

Copy link
Contributor

Choose a reason for hiding this comment

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

I just realized there's no test in that PR 😄

label=sim_name, show=False)

elif plot_type == 'spectrogram':
Expand Down
Loading