-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
484ea2e
commit 61911d0
Showing
5 changed files
with
87 additions
and
14 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
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,9 +1,29 @@ | ||
% fooof_get_model() - Return the model fit values from a FOOOF object | ||
% | ||
% Usage: | ||
% >> model_fit = fooof_get_model(fm) | ||
% | ||
% Inputs: | ||
% fm = FOOOF object | ||
% | ||
% Outputs: | ||
% model_fit = model results, in a struct, including: | ||
% model_fit.freqs | ||
% model_fit.power_spectrum | ||
% model_fit.fooofed_spectrum | ||
% model_fit.bg_fit | ||
% | ||
% Notes | ||
% This function is mostly an internal function, but can be called | ||
% directly by the user if you are interacting with FOOOF objects | ||
% directly. | ||
|
||
% Get the actual fit model from a FOOOF object | ||
function model_out = fooof_get_model(fm) | ||
function model_fit = fooof_get_model(fm) | ||
|
||
model_out = struct(); | ||
model_fit = struct(); | ||
|
||
model_out.freqs = double(py.array.array('d',fm.freqs)); | ||
model_out.power_spectrum = double(py.array.array('d', fm.power_spectrum)); | ||
model_out.fooofed_spectrum = double(py.array.array('d', fm.fooofed_spectrum_)); | ||
model_out.bg_fit = double(py.array.array('d', py.getattr(fm, '_bg_fit'))); | ||
model_fit.freqs = double(py.array.array('d',fm.freqs)); | ||
model_fit.power_spectrum = double(py.array.array('d', fm.power_spectrum)); | ||
model_fit.fooofed_spectrum = double(py.array.array('d', fm.fooofed_spectrum_)); | ||
model_fit.bg_fit = double(py.array.array('d', py.getattr(fm, '_bg_fit'))); |
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