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

Conversation

dylansdaniels
Copy link
Collaborator

Update PSD plot in gui _viz_manager so that min/max frequency are set… according to the plot config rather than being hard coded

See issue #910

… according to the plot config rather than being hard coded
@dylansdaniels dylansdaniels changed the title Fix Freq in GUI PSD Plot [WIP] Fix Freq in GUI PSD Plot Oct 18, 2024
@dylansdaniels dylansdaniels self-assigned this Oct 18, 2024
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 😄

@gtdang
Copy link
Collaborator

gtdang commented Oct 18, 2024

Might consider renaming the widgets to remove the 'spectral' from the widget names. Before they were specific to the spectrogram plots, but with this change they are not.

Copy link
Collaborator

@asoplata asoplata left a comment

Choose a reason for hiding this comment

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

Tested it myself and LGTM. I'll note that for the PSD plot, changing the Min or Max Spectral Frequency then clicking "Add plot" does successfully update the view. However, for the spectrogram, the view is not updated. This may be a separate bug.

@gtdang
Copy link
Collaborator

gtdang commented Oct 22, 2024

Tested it myself and LGTM. I'll note that for the PSD plot, changing the Min or Max Spectral Frequency then clicking "Add plot" does successfully update the view. However, for the spectrogram, the view is not updated. This may be a separate bug.

I think it's over-plotting a new line when you click add-plot and then updating the axis. There's no over plotting functionality with the spectrogram, so you need to clear then "add plot" to re-plot the axis.

@asoplata
Copy link
Collaborator

Yep, you're right, clearing the axis and then re-adding the plot successfully changes the frequency range for the spectrogram too.

Because this is needed for Thursday's gamma tutorial and I can't find problems with it, merging.

@asoplata asoplata merged commit 8643a04 into jonescompneurolab:master Oct 22, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants