Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #56

Merged
merged 21 commits into from
Dec 27, 2017
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update descriptions
  • Loading branch information
TomDonoghue committed Dec 27, 2017
commit 595e20323dae10b43394f84e696773587ceb2c94
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -23,7 +23,8 @@ FOOOF runs on Python 3.5 and 3.6.
- scipy >= 0.19
- matplotlib (optional)

That is, we assume [Anaconda](https://www.anaconda.com/download/) is installed.
That is, if you are using [Anaconda](https://www.anaconda.com/download/), then you are good to go.
If you aren't using Anaconda, it is one way to get and manage these dependencies).

## Install

@@ -69,13 +70,13 @@ FOOOF.report() fits the model, plots the original power spectrum with the associ
FOOOF also accepts parameters for fine-tuning the fit. For example:

```python
fm = FOOOF(peak_width_limits=[1.0, 8.0], max_n_peaks=6, min_peak_amplitude=0.1, min_peak_threshold=2.0)
fm = FOOOF(peak_width_limits=[1.0, 8.0], max_n_peaks=6, min_peak_amplitude=0.1, peak_threshold=2.0)
```

* _peak_width_limits_ sets the possible lower- and upper-bounds for the fitted peak widths.
* _max_n_peaks_ sets the maximum number of peaks to fit (in decreasing order of amplitude).
* _min_peak_amp_ sets an absolute limit on the minimum amplitude (above background) for any extracted peak.
* _min_peak_threshold_, also sets a threshold above which oscillation amplitude must cross to be included in the model. This parameter is in terms of standard deviation above the noise of the flattened spectrum.
* _peak_threshold_, also sets a threshold above which oscillation amplitude must cross to be included in the model. This parameter is in terms of standard deviation above the noise of the flattened spectrum.

FOOOF also has convenience methods for running the FOOOF model across matrices of multiple power spectra, as well as functionality for saving and loading results, creating reports from FOOOF outputs, and utilities to further analize FOOOF results.

24 changes: 13 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -17,19 +17,21 @@
========================================

FOOOF is a fast, efficient, physiologically-informed model to parameterize
neural power spectra, characterizing both oscillations and the background 1/f.
neural power spectra, characterizing both the 1/f background, and overlying
peaks (putative oscillations).

The model conceives of the neural power spectral density (PSD) as consisting
of two distinct functional processes:
- A 1/f background modeled as a line in log-log space with;
- Band-limited oscillatory "bumps" rising above this background, modeled as Gaussians in log(power) space.
The model conceives of the neural power spectrum as consisting of two distinct functional processes:
- A 1/f background, modeled with an exponential fit, with:
- Band-limited peaks rising above this background (modeled as Gaussians).

With regards to oscillations, the benefit of the FOOOF approach is to characterize
oscillations in terms of their center frequency, amplitude and bandwidth without
requiring predefining specific bands of interest. In particular, it separates oscillations
from a dynamic, and independently interesting 1/f background. This conception of the 1/f
as potentially functional (and therefore worth carefully modeling) is based on work from
the Voytek lab, and others suggesting that the 1/f slope may index excitation/inhibition balance.
With regards to examing peaks in the frequency domain, as putative oscillations, the benefit
of the FOOOF approach is that these peaks are characterized in terms of their specific center
frequency, amplitude and bandwidth without requiring predefining specific bands of interest.
In particular, it separates these peaks from a dynamic, and independently interesting 1/f
background. This conception of the 1/f as potentially functional (and therefore worth carefully
modeling) is based on work from the Voytek lab and others that collectively shows that 1/f changes
across task demands and participant demographics, and that it may index underlying
excitation/inhibition (EI) balance.
"""

setup(