fooof-tools / DevelopmentalDemo

Tutorial for developmental data with spectral parameterization.
MIT License
7 stars 2 forks source link

Update data management in model comparisons #7

Closed TomDonoghue closed 3 years ago

TomDonoghue commented 3 years ago

This suggests a possible update of some of the code the section on comparing models.

It refers a bit back to a suggestion of possibly using trim_spectrum to sub-select frequency ranges. When poking at this, I realized doing so suggested a slightly broader update to the code in this section. Basically, I general woudn't recommend putting power spectra in dataframe, looping across them, and sub-selecting frequency ranges by manual indexing, as all of this add extra data-wrangling. The proposed edits conserve the functionality, but use a slightly different approach which is hopefully a little cleaner in data organization (and also shows some extra functionality, for example FOOOFSettings).

@bostlund : what do you think about this potential update? If you prefer the previous approach, we can also drop this and keep that!

Note: I only update the code in the Python examples. If we decide to keep this, then the equivalent code in the R examples should also be update.

ghost commented 3 years ago

This update looks great- clean and concise! I'll update the R scripts to match.