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

Feature Request: Power Spectrum into Accusleep Viewer #6

Open
matiasandina opened this issue Apr 15, 2022 · 0 comments
Open

Feature Request: Power Spectrum into Accusleep Viewer #6

matiasandina opened this issue Apr 15, 2022 · 0 comments

Comments

@matiasandina
Copy link

matiasandina commented Apr 15, 2022

Not sure this is doable but it would also help to hand score if we had either of these two plots

  • pwelch plot for the epoch
  • Theta/Delta power ratio for epoch

Maybe something like

% line 29
F_welch = figure("Name", "Welch");
axes_welch = axes;
        % Plot welch --- Line 378
        % pwelch signal
        n = round((G.epochLen)/G.dt/2); % number of samples on either side to show
        i = round(tp / G.dt);
        ii = i-n:i+n; % choose indices to show
        st_EEG = standardizeSR(G.EEG(ii), G.originalSR, G.SR);
        [pxx,f] = pwelch(st_EEG);
        plot(axes_welch,f,10*log10(pxx))
        ylabel(axes_welch, "10*log10(pxx)")
        xlabel(axes_welch, "Frequency (Hz)")

This is working somewhat OK on my end (meaning it updates when moving the cursor). I am not familiar enough with the epochs variables and the indexing to be sure this is plotting the exact window that corresponds to the other figure. I would also like to have the x axis of the spectrum in frequency but haven't figured out the proper way to call pwelch in this scenario

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

1 participant