Skip to content

Commit f01399c

Browse files
authored
Merge pull request #280 from fooof-tools/null
[MNT] - Small fix up for null models
2 parents dcb5d6f + b277a7e commit f01399c

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

fooof/core/strings.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,6 @@ def gen_results_fg_str(fg, concise=False):
356356
kns = fg.get_params('aperiodic_params', 'knee') \
357357
if fg.aperiodic_mode == 'knee' else np.array([0])
358358

359-
# Check if there are any power spectra that failed to fit
360-
n_failed = sum(np.isnan(exps))
361-
362359
str_lst = [
363360

364361
# Header
@@ -369,7 +366,7 @@ def gen_results_fg_str(fg, concise=False):
369366

370367
# Group information
371368
'Number of power spectra in the Group: {}'.format(len(fg.group_results)),
372-
*[el for el in ['{} power spectra failed to fit'.format(n_failed)] if n_failed],
369+
*[el for el in ['{} power spectra failed to fit'.format(fg.n_null_)] if fg.n_null_],
373370
'',
374371

375372
# Frequency range and resolution

fooof/objs/group.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ class FOOOFGroup(FOOOF):
6868
Whether model results are available in the object.
6969
n_peaks_ : int
7070
The number of peaks fit in the model.
71-
n_failed_fits_ : int
72-
The number of models that failed to fit.
73-
failed_fit_inds_ : list of int
74-
The indices of any models that failed to fit.
71+
n_null_ : int
72+
The number of models that failed to fit and/or that are marked as null.
73+
null_inds_ : list of int
74+
The indices of any models that are null.
7575
7676
Notes
7777
-----

0 commit comments

Comments
 (0)