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

Adding "fooof_get_model" to provide easier access to getting the actual model fit #7

Merged
merged 8 commits into from
Sep 25, 2018

Conversation

rajatsaxena
Copy link

updating the matlab wrapper to also return the values of:

  • fooofeed_freq
  • fooofed_spectrum

I also tried retrieving _bg_fit but since the variable name starts with _ ( not allowed in matlab); one cannot use it directly in the form of fm._bg_fit. Is there any other way to fetch it? maybe from flattened_spectrum

Rajat Saxena added 4 commits July 17, 2018 01:42
@TomDonoghue
Copy link
Member

Hey! Just wanted to say sorry that I've been super slow on responding / looking through this properly (I'm traveling a lot at the moment) - but thank you for taking the time to add to this wrapper, and I will give any real comments once I have a chance (probably next week) to go through this, and merge it in if everything looks good!

@TomDonoghue
Copy link
Member

Hey @rajatsaxena

Thanks for your work on this! I changed things up a little bit - to keep consistency with the prior version, and not change how "fooof_unpack_results" works, I moved your updates to a new function, now called "fooof_get_model". I think this is a useful, and more modular approach - often we want to just get results (so unpack_results is useful as it is), but when the model is needed get_model gives access to this part to. I also found a way to get _bg_fit - it turns out you need to use 'py.getattr' to make this work.

I'm going to merge this in now, and then probably add a little bit more to make it easier to use get_model.

Thanks for the submission!

@TomDonoghue TomDonoghue changed the title updates to fooof.m Adding "fooof_get_model" to provide easier access to getting the actual model fit Sep 25, 2018
@TomDonoghue TomDonoghue merged commit 71c96ee into fooof-tools:master Sep 25, 2018
@rajatsaxena
Copy link
Author

Hi @TomDonoghue

The changes look good. Thanks for updating and letting me know. Let me know if I can contribute in any other way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants