Skip to content

Commit 3f897db

Browse files
authored
Merge pull request #205 from fooof-tools/name
[MNT] - Name update for new version
2 parents 69a73f4 + 313fb23 commit 3f897db

File tree

160 files changed

+2605
-2615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+2605
-2615
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# When ready to drop 3.6, can revert from 'ubuntu-20.04' -> 'ubuntu-latest'
1717
runs-on: ubuntu-20.04
1818
env:
19-
MODULE_NAME: fooof
19+
MODULE_NAME: specparam
2020
strategy:
2121
matrix:
2222
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing Guidelines
22

3-
Thank you for your interest in contributing to `fooof`!
3+
Thank you for your interest in contributing to `specparam`!
44

55
We welcome all contributions to the project that extend or improve code and/or documentation!
66

@@ -55,7 +55,7 @@ and see if there is anything you would be interested in helping with. If so, joi
5555

5656
All contributions must be within the scope of the module.
5757

58-
`fooof` is a module for parameterizing neural power spectra. This includes model fitting, management and analysis of resulting parameters, and utilities to visualize power spectra and model results. This module also includes functionality to simulate power spectra based on the model.
58+
`specparam` is a module for parameterizing neural power spectra. This includes model fitting, management and analysis of resulting parameters, and utilities to visualize power spectra and model results. This module also includes functionality to simulate power spectra based on the model.
5959

6060
Procedures and utilities that do not deal with operating upon power spectra or on model outputs will most likely be considered out of scope. Notably, this model does not include doing spectral estimation or time-domain analysis. For approaches such as these, the [neurodsp](https://github.com/neurodsp-tools/neurodsp/) module may be a more appropriate target.
6161

@@ -120,8 +120,8 @@ All code contributed to the module should follow these conventions:
120120
* If a new approach is added, a new tutorial or example may be appropriate
121121
* To build and check the documentation locally:
122122
* Install the requirements for the docsite (`pip install -r requirements-doc.txt`)
123-
* Move to the `fooof/doc` directory (`cd doc`)
123+
* Move to the `specparam/doc` directory (`cd doc`)
124124
* Run `make html` to create a local copy of the documentation website
125-
* The documentation can then be opened in a web browser by opening the file `fooof/doc/_build/html/index.html`
125+
* The documentation can then be opened in a web browser by opening the file `specparam/doc/_build/html/index.html`
126126

127127
For more guidelines on how to write well formated and organized code, check out the [Python API Checklist](http://python.apichecklist.com).

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
##########################################################################
2121
## VARIABLES
2222

23-
MODULE = fooof
23+
MODULE = specparam
2424
LINT_FILE = _lint.txt
2525

2626
##########################################################################

README.rst

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
=========================================
2-
FOOOF - fitting oscillations & one over f
3-
=========================================
1+
=========================
2+
Spectral Parameterization
3+
=========================
44

55
|ProjectStatus|_ |Version|_ |BuildStatus|_ |Coverage|_ |License|_ |PythonVersions|_ |Paper|_
66

@@ -26,7 +26,7 @@ FOOOF - fitting oscillations & one over f
2626
.. _Paper: https://doi.org/10.1038/s41593-020-00744-x
2727

2828

29-
FOOOF is a fast, efficient, and physiologically-informed tool to parameterize neural power spectra.
29+
Spectral parameterization is a fast, efficient, and physiologically-informed tool to parameterize neural power spectra.
3030

3131
Overview
3232
--------
@@ -71,7 +71,7 @@ This documentation includes:
7171
Dependencies
7272
------------
7373

74-
FOOOF is written in Python, and requires Python >= 3.6 to run.
74+
SpecParam is written in Python, and requires Python >= 3.6 to run.
7575

7676
It has the following required dependencies:
7777

@@ -82,7 +82,7 @@ There are also optional dependencies, which are not required for model fitting i
8282

8383
- `matplotlib <https://github.com/matplotlib/matplotlib>`_ is needed to visualize data and model fits
8484
- `tqdm <https://github.com/tqdm/tqdm>`_ is needed to print progress bars when fitting many models
85-
- `pandas <https://github.com/pandas-dev/pandas>`_ is needed to for exporting model fit results to dataframes
85+
- `pandas <https://github.com/pandas-dev/pandas>`_ is needed for exporting model fit results to dataframes
8686
- `pytest <https://github.com/pytest-dev/pytest>`_ is needed to run the test suite locally
8787

8888
We recommend using the `Anaconda <https://www.anaconda.com/distribution/>`_ distribution to manage these requirements.
@@ -133,22 +133,21 @@ To install an editable version, download the development version as above, and r
133133
Other Language Support
134134
----------------------
135135

136-
The original implementation of FOOOF, available in this repository, is implemented in Python.
136+
The original implementation of `specparam`, available in this repository, is implemented in Python.
137137

138-
If you wish to run FOOOF from another language, there are a couple potential options:
138+
If you wish to run specparam from another language, there are a couple potential options:
139139

140140
- a `wrapper`, which allows for running the Python code from another language
141-
- a `reimplementation`, which reflects a new implementation of the fooof algorithm in another language
141+
- a `reimplementation`, which reflects a new implementation of the specparam algorithm in another language
142142

143143
Below are listed some examples of wrappers and/or reimplementations in other languages (non-exhaustive).
144144

145145
Matlab
146146
~~~~~~
147147

148148
In Matlab, there is a reimplementation available in common toolboxes:
149-
150-
- The `Brainstorm <https://neuroimage.usc.edu/brainstorm/Introduction>`_ toolbox has a reimplementation of fooof (see the `Brainstorm fooof tutorial <https://neuroimage.usc.edu/brainstorm/Tutorials/Fooof>`_)
151-
- The `Fieldtrip <https://www.fieldtriptoolbox.org/>`_ also uses the same reimplementation (see the `Fieldtrip fooof tutorial <https://www.fieldtriptoolbox.org/example/fooof/>`_)
149+
- The `Brainstorm <https://neuroimage.usc.edu/brainstorm/Introduction>`_ toolbox has a reimplementation of specparam (see the `Brainstorm fooof tutorial <https://neuroimage.usc.edu/brainstorm/Tutorials/Fooof>`_)
150+
- The `Fieldtrip <https://www.fieldtriptoolbox.org/>`_ toolbox also uses the same reimplementation (see the `Fieldtrip fooof tutorial <https://www.fieldtriptoolbox.org/example/fooof/>`_)
152151

153152
There is also a Matlab wrapper in the `fooof_mat <http://github.com/fooof-tools/fooof_mat>`_ repository.
154153

@@ -209,27 +208,27 @@ The algorithm works on frequency representations, that is power spectra in linea
209208
**Fitting a Single Power Spectrum**
210209

211210
With a power spectrum loaded (with 'freqs' storing frequency values, and 'spectrum' storing
212-
the power spectrum, both as 1D arrays in linear space) FOOOF can be used as follows:
211+
the power spectrum, both as 1D arrays in linear space) parameterization can be done as follows:
213212

214213
.. code-block:: python
215214
216-
# Import the FOOOF object
217-
from fooof import FOOOF
215+
# Import the model object
216+
from specparam import SpectralModel
218217
219-
# Initialize FOOOF object
220-
fm = FOOOF()
218+
# Initialize model object
219+
fm = SpectralModel()
221220
222221
# Define frequency range across which to model the spectrum
223222
freq_range = [3, 40]
224223
225-
# Model the power spectrum with FOOOF, and print out a report
224+
# Parameterize the power spectrum, and print out a report
226225
fm.report(freqs, spectrum, freq_range)
227226
228-
FOOOF.report() fits the model, plots the original power spectrum with the associated FOOOF model fit,
227+
SpectralModel.report() fits the model, plots the original power spectrum with the associated model fit,
229228
and prints out the parameters of the model fit for both the aperiodic component, and parameters for
230229
any identified peaks, reflecting periodic components.
231230

232-
Example output for the report of a FOOOF fit on an individual power spectrum:
231+
Example output for the report of a parameterized fit on an individual power spectrum:
233232

234233
.. image:: https://raw.githubusercontent.com/fooof-tools/fooof/main/doc/img/FOOOF_report.png
235234

@@ -247,9 +246,9 @@ These settings can be defined when initializing the model, for example:
247246

248247
.. code-block:: python
249248
250-
# Initialize a FOOOF model object with defined settings
251-
fm = FOOOF(peak_width_limits=[1.0, 8.0], max_n_peaks=6, min_peak_height=0.1,
252-
peak_threshold=2.0, aperiodic_mode='fixed')
249+
# Initialize a model object with defined settings
250+
fm = SpectralModel(peak_width_limits=[1.0, 8.0], max_n_peaks=6, min_peak_height=0.1,
251+
peak_threshold=2.0, aperiodic_mode='fixed')
253252
254253
**Fitting a Group of Power Spectra**
255254

@@ -259,19 +258,19 @@ We can fit the group of power spectra by doing:
259258

260259
.. code-block:: python
261260
262-
# Initialize a FOOOFGroup object, specifying some parameters
263-
fg = FOOOFGroup(peak_width_limits=[1.0, 8.0], max_n_peaks=8)
261+
# Initialize a SpectralGroupModel object, specifying some parameters
262+
fg = SpectralGroupModel(peak_width_limits=[1.0, 8.0], max_n_peaks=8)
264263
265-
# Fit FOOOF model across the matrix of power spectra
264+
# Fit models across the matrix of power spectra
266265
fg.fit(freqs, spectra)
267266
268267
# Create and save out a report summarizing the results across the group of power spectra
269268
fg.save_report()
270269
271-
# Save out FOOOF results for further analysis later
272-
fg.save(file_name='fooof_group_results', save_results=True)
270+
# Save out results for further analysis later
271+
fg.save(file_name='group_results', save_results=True)
273272
274-
Example output from using FOOOFGroup across a group of power spectra:
273+
Example output from using SpectralGroupModel across a group of power spectra:
275274

276275
.. image:: https://raw.githubusercontent.com/fooof-tools/fooof/main/doc/img/FOOOFGroup_report.png
277276

data/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Data
22
====
33

4-
Example data files for the FOOOF module.
4+
Example data files for the module.

doc/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# You can set these variables from the command line.
88
SPHINXOPTS =
99
SPHINXBUILD = sphinx-build
10-
SPHINXPROJ = fooof
10+
SPHINXPROJ = specparam
1111
SOURCEDIR = .
1212
BUILDDIR = _build
1313

@@ -44,7 +44,7 @@ check:
4444
make SPHINXOPTS="-n" html
4545
make linkcheck
4646

47-
# Create the plots used in the FOOOF documentation
47+
# Create the plots used in the documentation
4848
plots:
4949
python make_doc_plots.py
5050

0 commit comments

Comments
 (0)