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

Fitting fooof.FOOOFGroup when dataset includes NaN spectra #175

Closed
mwprestonjr opened this issue Jun 27, 2020 · 1 comment
Closed

Fitting fooof.FOOOFGroup when dataset includes NaN spectra #175

mwprestonjr opened this issue Jun 27, 2020 · 1 comment
Assignees
Labels
2.0 Targetted for the specparam 2.0 release. enhancement question

Comments

@mwprestonjr
Copy link
Contributor

I want to use FOOOFGroup, but the iEEG data files I'm working with have an idiosyncratic number of channels and epochs (as a results of artifact removal), and the package raises an error when there are NaN values in the data.

The check in the _prepare_data() function of fooof/objs/fit.py (lines 1186-1191) can be turned off, but an update in the fitting code is also needed to get things to run cleanly.

For my use case, I added the line 'if all(np.isnan(power_spectrum)): continue' at line 290 of fooof/objs/group.py.

@TomDonoghue
Copy link
Member

Forgot to close this before - but this is updated in #182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 Targetted for the specparam 2.0 release. enhancement question
Projects
None yet
Development

No branches or pull requests

2 participants