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

[DOC] - Add tutorials for aperiodic sub-module #231

Merged
merged 12 commits into from
Jan 26, 2021
Merged

[DOC] - Add tutorials for aperiodic sub-module #231

merged 12 commits into from
Jan 26, 2021

Conversation

TomDonoghue
Copy link
Member

@TomDonoghue TomDonoghue commented Dec 31, 2020

This is a placeholder / WIP PR for adding tutorials for the aperiodic module.

@ryanhammonds : can you have a first go at developing these tutorials? They can start as pretty simple, showing code application, and then I can check and fill in any details later.

@TomDonoghue TomDonoghue added the 2.2 Updates to go into a 2.2.0 release label Dec 31, 2020
@TomDonoghue TomDonoghue changed the title [WIP/DOC] Add tutorials for aperiodic sub-module [WIP/DOC] - Add tutorials for aperiodic sub-module Dec 31, 2020
@neurodsp-tools neurodsp-tools deleted a comment from codecov-io Dec 31, 2020
@ryanhammonds
Copy link
Member

Hi @TomDonoghue, these tutorials should be ready for review.

  • DFA: Compares DFA exponent between white noise and power law signals.
  • IRASA: Runs algorithm on a 10hz oscillation + -2 exp powerlaw.
    • I added a relative threshold to IRASA that allows cleaner separation of aperiodic/periodic components in some cases. This may need to be reworked or can be removed if not appropriate. I thought it was useful but there may be implications I haven't considered.
  • Autocorr: Computes autocorrs of a sine wave and white noise.
    • I updated the module func to include max_lag. Before, if max_lag == 1000, the func would compute up to the 999 lag. I've changed this so the func is inclusive of max_lag. If this isn't what we want, I can change it back.

@ryanhammonds ryanhammonds changed the title [WIP/DOC] - Add tutorials for aperiodic sub-module [DOC] - Add tutorials for aperiodic sub-module Jan 19, 2021
@neurodsp-tools neurodsp-tools deleted a comment from codecov-io Jan 21, 2021
@neurodsp-tools neurodsp-tools deleted a comment from codecov-io Jan 21, 2021
@neurodsp-tools neurodsp-tools deleted a comment from codecov-io Jan 21, 2021
@TomDonoghue
Copy link
Member Author

@ryanhammonds - awesome, thanks for your work on this one!

In terms of code updates, the autocorr lag length is a good catch! The threshold for IRASA is interesting, I'm not sure if it might have some quirks in some cases, but given it defaults to off, and helps in some cases, then I think it's a cool / useful things to keep.

For the tutorials, I went through and did direct edits, and added a bit of stuff. The only major change is the autocorr, in that I wasn't really clear where the phase comparisons were going, so I switched that up (if I seem to have missed something there, let me know, and we can perhaps add some stuff back).

When you get a chance, can you review the updates to the tutorials? If they look good to you, then I think this one is done!

@neurodsp-tools neurodsp-tools deleted a comment from codecov-io Jan 21, 2021
Copy link
Member

@ryanhammonds ryanhammonds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @TomDonoghue, I found a few typos but other than that it looks good.

The phase comparison tried to show how the phase changes as a result of lagging the signal. The second removed plot was representative of the correlation between lags at difference points on the first plot. No worries about removing it though. If it wasn't clear it shouldn't go in.

tutorials/aperiodic/plot_Fluctuations.py Outdated Show resolved Hide resolved
tutorials/aperiodic/plot_Fluctuations.py Outdated Show resolved Hide resolved
tutorials/aperiodic/plot_Fluctuations.py Outdated Show resolved Hide resolved
tutorials/aperiodic/plot_Fluctuations.py Show resolved Hide resolved
tutorials/aperiodic/plot_IRASA.py Outdated Show resolved Hide resolved
tutorials/aperiodic/plot_IRASA.py Outdated Show resolved Hide resolved
Base automatically changed from master to main January 25, 2021 21:17
@neurodsp-tools neurodsp-tools deleted a comment from codecov-io Jan 26, 2021
@TomDonoghue
Copy link
Member Author

Thanks for the review @ryanhammonds! I've updated the files, and I think this one is good to go now.

Also: ahhh, I think I've just tracked the phase delay thing of the autocorr example - showing different delays of the same signal. I think that's an interesting demo, that would perhaps just need a bit more explanation. If you ever feel like integrating it back in, feel free to update & PR!

@TomDonoghue TomDonoghue merged commit 8803220 into main Jan 26, 2021
@TomDonoghue TomDonoghue deleted the ap_docs branch January 26, 2021 17:00
@ryanhammonds ryanhammonds mentioned this pull request May 3, 2021
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.2 Updates to go into a 2.2.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants