amisepa / BrainBeats

The BrainBeats toolbox, implemented as an EEGLAB plugin, allows joint processing and analysis of EEG and cardiovascular signals (ECG/PPG).
GNU General Public License v3.0
5 stars 4 forks source link

Unable to process single subject #40

Closed jjpouliot closed 5 months ago

jjpouliot commented 5 months ago

I am able to open the toolbox, but after I select all of the desired parameters and click Ok, I get the error message "EEGLab error in function run_checks() at line 160: Unable to resolve the name 'parallel.Settings'." I ran into this issue when using the sample data provided and when using my own data.

I use MATLAB version 2023b, EEGLab version 2024.0, and MacOS Sonoma 14.4.1. Please let me know if you need any more information.

amisepa commented 5 months ago

Hi, Did you install Brainbeats via GitHub (download or cloning) or via the EEGLAB extension manager?

amisepa commented 5 months ago

And did you use the GUI or command line?

jjpouliot commented 5 months ago

I ran into the issue after trying to install both from GitHub and the EEGLab extension manager. The same error also came up when I used both the GUI and the command line.

amisepa commented 5 months ago

Interesting, I am having issues with the parallel toolbox after installing the new MATLAB 2024. Despite having the parallel toolbox installed, MATLAB cannot launch it.

if you type ver('parallel'), what do you get? And if you type gcpin the command window, do you get an error?

jjpouliot commented 5 months ago

When I type ver('parallel') I get an error saying "No properly formatted Contents.m file was found for 'parallel.'" gcp gives an error: "gcp requires Parallel Computing Toolbox." I do not have the parallel toolbox installed.

amisepa commented 5 months ago

Ok so didn't you receive the warning "You do not have the parallel toolbox. Turning parallel computing OFF." in the command window?

Good to know this check is not sufficient. Could you please type this now and tell me if returns a 0?

addons = ver; any(contains({addons.Name}, 'Parallel'))

jjpouliot commented 5 months ago

I entered the commands, it does return a 0.

amisepa commented 5 months ago

ok thanks. And lastly, does this work for you or do you get an error?

        ps = parallel.Settings;
        ps.Pool.AutoCreate = false;  
jjpouliot commented 5 months ago

ps = parallel.Settings gives me the following error: "Unable to resolve the name 'parallel.Settings'." The second line creates a mostly empty struct with only the fields mentioned.

amisepa commented 5 months ago

Ok thanks. I think I fixed it. Can you reinstall brainbeats from the github page (unzip it into eeglab > plugins folder)? or do a pull if you use git. And try again and let me know if it works for you now.

note that the nonlinear features for EEG can take a very long time without the parallel toolbox if your EEG data are big.

jjpouliot commented 5 months ago

I ran the Heartrate Evoked Potential functions and it appears to run without issue now, thanks for your help! One other thing that may be more of a question than an issue, I was not able to run the Extract Features functions because "Warning: File length is too short for estimating ULF power reliably. At least 1440.0 minutes are required. Cannot export this variable." The script crashes after this on line 757 of plomb.m in the parseAndValidateInputs function. I'm guessing this is because it could not estimate ULF power, but I'm only interested in HF power. Is there a way to only extract HF power using this toolbox?

amisepa commented 5 months ago

This is just a warning, it should still extract HF power. Must be something else. Can you give more detail on that error? What's your file lenght?

jjpouliot commented 5 months ago

My bad, I didn't see the message that said Brainbeats does not support epoched data, that may have caused the error. I don't think my dataset are compatible with Brainbeats after all. Thanks again for your help anyway!

amisepa commented 5 months ago

How long are your epochs? HRV should not be estimated on data shorter than 2-min long. Even <5 min is often not recommended. See https://www.frontiersin.org/journals/neuroscience/articles/10.3389/fnins.2020.594880/full

if they are long enough, you can convert your data back to continuous, if that makes sense.