Skip to content

Fitting fooof.FOOOFGroup when dataset includes NaN spectra #175

@mwprestonjr

Description

@mwprestonjr

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions