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

add support for psd function to return the output result as variables or expose base function #18

Open
AbelHo opened this issue Dec 23, 2020 · 2 comments
Assignees

Comments

@AbelHo
Copy link

AbelHo commented Dec 23, 2020

psd function is useful for automated data analysis process the output as well, would be nice to have it as a function call instead of just a plot.

@mchitre
Copy link
Member

mchitre commented Dec 23, 2020

Just had a look at the psd() and specgram() code:

psd() is computed with essentially a single statement:
p = welch_pgram(x, nfft, noverlap; fs=framerate(x))
and freq(p) gives you the frequency bins and power(p) gives you the PSD value.

specgram() is computed with also essentially a single statement:
p = spectrogram(x, nfft, noverlap; fs=framerate(x))
and time(p), freq(p) and power(p) give you the time values, frequency bins and the spectrogram value respectively.

Both welch_pgram() and spectrogram() come from the DSP package, so you'll need using DSP.

Since these are single liner calls, we don't gain much by wrapping them further. Suggest using these directly instead.

@mchitre mchitre self-assigned this Dec 23, 2020
@mchitre mchitre added enhancement New feature or request wontfix This will not be worked on labels Dec 23, 2020
@mchitre mchitre closed this as completed Dec 23, 2020
@mchitre mchitre removed the wontfix This will not be worked on label Dec 25, 2020
@mchitre
Copy link
Member

mchitre commented Dec 25, 2020

As discussed with @AbelHo, there may be value in having this available for multichannel signals.

@mchitre mchitre reopened this Dec 25, 2020
@mchitre mchitre removed the enhancement New feature or request label Nov 1, 2024
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

No branches or pull requests

2 participants