Skip to content

Commit

Permalink
propagate modes when extracting sub-object from group
Browse files Browse the repository at this point in the history
  • Loading branch information
TomDonoghue committed Jul 22, 2023
1 parent c5c9736 commit 825c4a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fooof/objs/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ def get_fooof(self, ind, regenerate=True):

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

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

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

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

0 comments on commit 825c4a4

Please sign in to comment.