Skip to content

Commit afdea16

Browse files
Merge pull request #9 from fooof-tools/developments
Developments
2 parents 05aa1d9 + d403bf0 commit afdea16

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

Output/EOP_demo.pdf

15 Bytes
Binary file not shown.

Python/02-GroupPSDs.ipynb

100644100755
Lines changed: 11 additions & 17 deletions
Large diffs are not rendered by default.

R/03-R_GroupPSDs.Rmd

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ m2_freq, m2_spectra = trim_spectrum(freqs, spectra_subsample, m2_PSD_range)
225225

226226
#### Fit models, with different settings
227227
```{python, message = FALSE}
228-
# Fit a model object with model 1 settings
228+
# Fit model object with model 1 settings
229229
fg1 = FOOOFGroup(peak_width_limits = m1_peak_width, max_n_peaks = m1_n_peaks, min_peak_height = m1_peak_height)
230230
fg1.fit(m1_freq, m1_spectra)
231231
@@ -237,7 +237,7 @@ for ind in range(len(fg1)):
237237
```
238238

239239
```{python, message = FALSE}
240-
# Fit a model object with model 2 settings
240+
# Fit model object with model 2 settings
241241
fg2 = FOOOFGroup(peak_width_limits = m2_peak_width, max_n_peaks = m2_n_peaks, min_peak_height = m2_peak_height)
242242
fg2.fit(m2_freq, m2_spectra)
243243
@@ -262,6 +262,12 @@ settings2 = FOOOFSettings(peak_width_limits = m2_peak_width, max_n_peaks = m2_n_
262262
aperiodic_mode = 'fixed')
263263
```
264264

265+
```{python, message = FALSE}
266+
# Initialize model object for spectral parameterization, with some settings
267+
fg1 = FOOOFGroup(*settings1)
268+
fg2 = FOOOFGroup(*settings2)
269+
```
270+
265271
#### Fit models with group model object
266272
Note that when fitting power spectra, you can specify a fit range to fit the model to, so you don't have to explicitly trim the spectra. Here we will refit the example data, specifying the fit range, and then save the group reports.
267273
```{python, message = FALSE}

R/04-R_ExampleAnalysis.Rmd

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ from fooof.plts import plot_spectrum
3939
from fooof.plts.periodic import plot_peak_fits, plot_peak_params
4040
from fooof.plts.aperiodic import plot_aperiodic_params, plot_aperiodic_fits
4141
42-
# # Import utility functions that manipulate FOOOF objects
43-
# from fooof.objs.utils import average_fg
44-
4542
# Import functions to examine frequency-by-frequency error of model fits
4643
from fooof.analysis.error import compute_pointwise_error_fg
4744
```

0 commit comments

Comments
 (0)