-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from fooof-tools/dev
Update for FOOOF 1.0
- Loading branch information
Showing
9 changed files
with
72 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
# FOOOF: Matlab -> Python -> Matlab | ||
|
||
This repository offers support and examples for how to integrate [FOOOF](https://github.com/fooof-tools/fooof) into a Matlab workflow. | ||
Using an integrated workflow in which using Matlab is combined with running FOOOF directly in Python. | ||
|
||
Note that this workflow does use Python directly. Alternatively there is a full [Matlab wrapper](https://github.com/fooof-tools/fooof_mat). The benefit of this approach, over using the [wrapper](https://github.com/fooof-tools/fooof_mat), is that you have full access to the FOOOF module in Python, which makes it easier to use utilities to plot outputs and see what's happening. This approach | ||
## Overview | ||
|
||
All [descriptions](https://github.com/fooof-tools/fooof/README.md) and [tutorials](https://github.com/fooof-tools/fooof/tutorial) for FOOOF are in the [main repository](https://github.com/fooof-tools/fooof), and a full description of the method is available in the [paper](https://www.biorxiv.org/content/early/2018/04/11/299859). | ||
This repository offers examples for how to integrate [FOOOF](https://github.com/fooof-tools/fooof) into a Matlab workflow. | ||
|
||
## Overview | ||
This approach does use Python directly, and seeks to demonstrate how to use a primarily Matlab based approach, using Python only as needed for fitting power spectrum models. The idea is that one can do all of the processing and analysis in Matlab, up to and including calculating power spectra. These power spectra can then be saved out. These files can then be loaded into Python, and FOOOF can be used to fit power spectrum, and do any model related processing needed using the FOOOF module. The model results can also be saved out, and loaded back into Matlab. | ||
|
||
The benefit of this approach, is that you have full access to the FOOOF module in Python. | ||
|
||
This repository includes example code for a potential workflow whereby most stuff is done in Matlab, only using Python for FOOOF fitting specifically. This approach does require that you have Python and FOOOF installed. You can follow the direction to do so from [here](https://github.com/fooof-tools/fooof_mat). | ||
Alternatively there is a [Matlab wrapper](https://github.com/fooof-tools/fooof_mat), which you can use to call FOOOF directly from Matlab, without having to interact directly with Python. | ||
|
||
The idea is that one can do all of the processing and analysis in Matlab, up to and including calculating power spectra. Power spectra are then saved out to mat files, and loaded into Python. You can the run and explore using FOOOF, in Python, fitting models, and then save out the model fit results, which can be loaded back into Matlab, if you prefer. | ||
This approach does require that you have Python and FOOOF installed. You can follow the directions to do so from [here](https://github.com/fooof-tools/fooof_mat). | ||
|
||
Note that the main documentation for the FOOOF module itself is on the [documentation site](https://fooof-tools.github.io/fooof/). | ||
|
||
## Workflow | ||
|
||
An example / template workflow for using this approach, including matlab and python scripts, is available here. This workflow is for using FOOOF in a Matlab pipeline, in which you process and analyze the data mostly in Matlab, but do the FOOOF fitting directly in Python. With this template, you should be able get working with this workflow without having to write almost any Python code. | ||
Some examples for using this approach, including Matlab and Python scripts, are available here. | ||
|
||
With this template, you should be able get running without having to write almost any Python code. | ||
|
||
This suggested workflow is to: | ||
- A) Pre-process all data in Matlab, up to the point of creating and saving out power spectra | ||
- A) Pre-process data in Matlab, including creating and saving out power spectra | ||
- B) Switch to Python, load these power spectra, explore and fit FOOOF models, then save out FOOOF results | ||
- C) Continue analysis of the FOOOF results in Matlab | ||
- C) Continue analysis of FOOOF results in Matlab | ||
|
||
In this folder you will find two examples of this workflow, one showing the outline with a single PSD, and another showing how you can update this workflow to analyze multiple power spectra. | ||
|
||
You can also use these files as templates - just download this folder, and update the files as you need to to use your data. | ||
You can also use these files as templates - just download this folder, and update the files as needed to use your own data. | ||
|
||
Note that as outlined the Python parts are done in notebooks, which allows for easy access to the plotting and exploration tools in FOOOF. When you have settled on parameters and so on, you can instead run this part as a Python script. | ||
Note that as outlined the Python parts are done using [Jupyter notebooks](https://jupyter.org/), which allow for interactive coding and integrated plotting, etc. Once you have checked the fitting, and settled on parameters and so on, you can instead run this part as a Python script. |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters