fooof-tools / fooof_mat

A Matlab wrapper for spectral parameterization.
MIT License
39 stars 19 forks source link

Error in fooof() line 59 #33

Open SusLop opened 3 months ago

SusLop commented 3 months ago

Dear all, I am trying to run FOOOF from eeglab but I get an error at line 59 saying:

"Same base class matlab.mixin.internal.indexing.Paren specified more than once for class py.foof.data.data.FOOOFResults. Specify each class only once."

Any help would be really appreciated!

MATLAB is correctly seeing the python version installed and all the libraries have been already installed.

Thank you for your help!

bli40 commented 2 months ago

got the same error. It seemed like some wrapper translation bug.

I wrote this function in MATLAB and it spits out the same thing as what is documented. Hope it works for you!

function model_fit = fooof_get_params(fm) model_fit = struct();

model_fit.aperiodic_params = double(py.array.array('d',fm.aperiodic_params_));
model_fit.peak_params = double(fm.get_params('peak_params'));
model_fit.error = double(fm.get_params('error'));
model_fit.r_squared = double(fm.get_params('r_squared'));
model_fit.n_peaks = double(fm.get_params('n_peaks'));

end

SusLop commented 2 months ago

Thank you so much for your kind reply! Where should I put this function?

Thanks! :)

bli40 commented 2 months ago

I popped it in the //fooof_mat/fooof_mat/ directory wherever you cloned the repository.