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] Combine similar two-runs GLM examples #3191

Merged
merged 26 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e618fdd
Combine plot_fiac_analysis and plot_fixed_effects.
tsalo Mar 24, 2022
1a603a9
Update link to example.
tsalo Mar 24, 2022
4576c6e
Switch example to a t contrast.
tsalo Mar 25, 2022
7851e11
Merge remote-tracking branch 'upstream/main' into combine-glm-examples
Remi-Gau Jan 10, 2024
06f5f94
lint
Remi-Gau Jan 10, 2024
2663ff0
use cell separators
Remi-Gau Jan 10, 2024
550aef8
remove padding helper function and fix bugs in nilearn internal paddi…
Remi-Gau Jan 10, 2024
9cb0a94
enforce semantic line break
Remi-Gau Jan 10, 2024
fb6294a
use run instead osf sessions and fix citaions
Remi-Gau Jan 10, 2024
a1f550a
use runs instead of sessions
Remi-Gau Jan 11, 2024
ee4784f
change stacklevel for warnings in padding
Remi-Gau Jan 11, 2024
0e6088f
change session to run
Remi-Gau Jan 11, 2024
fc237ec
update example
Remi-Gau Jan 11, 2024
5a353c5
print output dir
Remi-Gau Jan 11, 2024
836cc22
__file__ cannot be used in examples
Remi-Gau Jan 11, 2024
fc3f558
update changelog
Remi-Gau Jan 11, 2024
cf128da
style fix
Remi-Gau Jan 12, 2024
0d5238a
fix contrast padding
Remi-Gau Jan 16, 2024
1b7030d
add test for contrast padding and update doc string
Remi-Gau Jan 16, 2024
bfb005d
refactor
Remi-Gau Jan 16, 2024
310de33
add title
Remi-Gau Jan 16, 2024
eb0e462
fix test
Remi-Gau Jan 16, 2024
ae8e0d9
typo
Remi-Gau Jan 16, 2024
ae2d58d
Apply suggestions from code review
Remi-Gau Jan 16, 2024
0058d7f
Apply suggestions from code review
Remi-Gau Jan 16, 2024
256bfff
reorganize ref
Remi-Gau Jan 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ doc/building_blocks/generated/
doc/datasets/generated/
doc/generated/
doc/modules/generated/
doc/themes/nilearn/static/jquery.js
doc/sg_execution_times.rst
doc/themes/nilearn/static/jquery.js
Copy link
Collaborator

@Remi-Gau Remi-Gau Jan 11, 2024

Choose a reason for hiding this comment

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

alphabetical sorting


# examples
examples/**/*.pdf
Expand Down
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ exclude: |
| examples/01_plotting/plot_surf_atlas.py
| examples/01_plotting/plot_surf_stat_map.py
| examples/01_plotting/plot_surface_projection_strategies.py
| examples/04_glm_first_level/plot_fiac_analysis.py
| examples/04_glm_first_level/plot_fixed_effects.py
| examples/04_glm_first_level/plot_localizer_surface_analysis.py
| examples/07_advanced/plot_surface_bids_analysis.py
| nilearn/_utils/helpers.py
Expand Down
1 change: 1 addition & 0 deletions doc/changes/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ Changes
- :bdg-danger:`Deprecation` :func:`~plotting.plot_surf_roi` will raise a warning if ``roi_map`` contains negative or non-integer values; in version 0.13 this will be a ``ValueError`` (:gh:`4131` by `Michelle Wang`_).
- :bdg-dark:`Code` Remove leading underscore from non private functions to align with PEP8 (:gh:`4086` by `Rémi Gau`_).
- :bdg-dark:`Code` Make ``decoding/proximal_operator`` explicitly private to align with PEP8 (:gh:`4153` by `Rémi Gau`_).
- :bdg-primary:`Doc` Combine GLM examples ``plot_fixed_effect`` and ``plot_fiac_analysis`` into a a single example ``plot_two_runs_model`` (:gh:`3191` by `Taylor Salo`_ and `Rémi Gau`_).
- :bdg-dark:`Code` Make private functions public when used outside of their module ``nilearn.interface`` to align with PEP8 (:gh:`4168` by `Rémi Gau`_).
2 changes: 1 addition & 1 deletion doc/glm/first_level_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ The activation maps from these 3 contrasts is presented below:
:scale: 60


Additional example: :ref:`sphx_glr_auto_examples_04_glm_first_level_plot_fiac_analysis.py`
Additional example: :ref:`sphx_glr_auto_examples_04_glm_first_level_plot_two_runs_model.py`


Extracting predicted time series and residuals
Expand Down
6 changes: 3 additions & 3 deletions doc/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,13 @@ For new-comers, we recommend going through the following examples in the suggest
.. only:: html

.. image:: /auto_examples/04_glm_first_level/images/thumb/sphx_glr_plot_fiac_analysis_thumb.png
:alt: Simple example of two-session fMRI model fitting
:alt: Simple example of two-runs fMRI model fitting

:ref:`sphx_glr_auto_examples_04_glm_first_level_plot_fiac_analysis.py`
:ref:`sphx_glr_auto_examples_04_glm_first_level_plot_two_runs_model.py`

.. raw:: html

<div class="sphx-glr-thumbnail-title">Simple example of two-session fMRI model fitting</div>
<div class="sphx-glr-thumbnail-title">Simple example of two-runs fMRI model fitting</div>
</div>


Expand Down
11 changes: 11 additions & 0 deletions doc/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,17 @@ @article{Craddock2012
year = {2012}
}

@article{dehaene2006functional,
Copy link
Member

Choose a reason for hiding this comment

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

since we alphabetized this list this should move to after Davidson2004

Copy link
Collaborator

Choose a reason for hiding this comment

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

good catch

thanks!!!

title={Functional segregation of cortical language areas by sentence repetition},
author={Dehaene-Lambertz, Ghislaine and Dehaene, Stanislas and Anton, Jean-Luc and Campagne, Aurelie and Ciuciu, Philippe and Dehaene, Guillaume P and Denghien, Isabelle and Jobert, Antoinette and LeBihan, Denis and Sigman, Mariano and others},
journal={Human brain mapping},
volume={27},
number={5},
pages={360--371},
year={2006},
publisher={Wiley Online Library}
}

@article{Dadi2020,
title = {Fine-grain atlases of functional modes for fMRI analysis},
journal = {NeuroImage},
Expand Down
180 changes: 0 additions & 180 deletions examples/04_glm_first_level/plot_fiac_analysis.py

This file was deleted.

119 changes: 0 additions & 119 deletions examples/04_glm_first_level/plot_fixed_effects.py

This file was deleted.