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

Plot recipes improvements #495

Merged
merged 4 commits into from
Dec 9, 2024
Merged

Plot recipes improvements #495

merged 4 commits into from
Dec 9, 2024

Conversation

gabrevaya
Copy link
Contributor

  • Added powerspectrumplot methods for plotting precomputed power spectra
  • Changed normalization (to dB) and offset (0 at the start of the plot) to match Adam et al. (2022), which seems more convenient for plotting multiple power spectra
  • Improved calculation of limits and band label positions

@helmutstrey, please let me know if these new plot recipes are what you need.

You can pass either a single power spectrum object (of type DSP.Periodograms.Periodogram) or a vector of them. For example:

powspec1 = powerspectrum(msn, sol, "G", method=welch_pgram, window=hanning)
powerspectrumplot(powspec1)

powspec2 = powerspectrum(msn, sol, "V", method=welch_pgram, window=hanning)
p = [powspec1, powspec2]
powerspectrumplot(p)

Helmut, you also suggested creating a plot recipe for individual neurons' voltages. I want to make sure I understood correctly: Would you like to pass a blox and a sol, similar to the other plot recipes, while indicating the indices of individual neurons to be plotted, all superimposed? So this should be similar to the stackplot but without the vertical shift and with selective neuron plotting, right?

@gabrevaya
Copy link
Contributor Author

gabrevaya commented Dec 6, 2024

@helmutstrey, would you like to modify anything from this, or should we already merge it?

@gabrevaya gabrevaya requested a review from harisorgn December 6, 2024 19:25
Copy link
Member

@harisorgn harisorgn left a comment

Choose a reason for hiding this comment

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

Nice one @gabrevaya

@gabrevaya
Copy link
Contributor Author

Thanks @harisorgn!

@gabrevaya gabrevaya merged commit 65152b3 into master Dec 9, 2024
6 checks passed
@gabrevaya gabrevaya deleted the plot_recipes_improvements branch December 9, 2024 11:28
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.

2 participants