Skip to content

Commit 825c4a4

Browse files
committed
propagate modes when extracting sub-object from group
1 parent c5c9736 commit 825c4a4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fooof/objs/group.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ def get_fooof(self, ind, regenerate=True):
458458

459459
# Initialize a FOOOF object, with same settings & check data mode as current FOOOFGroup
460460
fm = FOOOF(*self.get_settings(), verbose=self.verbose)
461-
fm.set_check_data_mode(self._check_data)
461+
fm.set_check_modes(self._check_freqs, self._check_data)
462+
fm.set_debug_mode(self._debug)
462463

463464
# Add data for specified single power spectrum, if available
464465
# The power spectrum is inverted back to linear, as it is re-logged when added to FOOOF
@@ -496,6 +497,8 @@ def get_group(self, inds):
496497

497498
# Initialize a new FOOOFGroup object, with same settings as current FOOOFGroup
498499
fg = FOOOFGroup(*self.get_settings(), verbose=self.verbose)
500+
fg.set_check_modes(self._check_freqs, self._check_data)
501+
fg.set_debug_mode(self._debug)
499502

500503
# Add data for specified power spectra, if available
501504
# The power spectra are inverted back to linear, as they are re-logged when added to FOOOF

0 commit comments

Comments
 (0)