Skip to content

Commit

Permalink
Remove extraneous hash symbols (nilearn#4096)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymzayek authored and Remi-Gau committed Nov 9, 2023
1 parent f4f3606 commit 7cc1d7d
Show file tree
Hide file tree
Showing 26 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion examples/02_decoding/plot_haxby_glm_decoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
memory="nilearn_cache",
)

# %%#
# %%
# Run the :term:`GLM` on data from each session
# ---------------------------------------------
events[session].trial_type.unique()
Expand Down
2 changes: 1 addition & 1 deletion examples/02_decoding/plot_haxby_multiclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# Sort the conditions by the order of appearance
unique_conditions = unique_conditions[np.argsort(order)]

# %%#
# %%
# Prepare the :term:`fMRI` data
# -----------------------------
from nilearn.maskers import NiftiMasker
Expand Down
2 changes: 1 addition & 1 deletion examples/02_decoding/plot_miyawaki_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
plt.title(f"Run {3}, Stimulus {102}")
plt.subplots_adjust(wspace=0.5)

# %%#
# %%
# We now stack the :term:`fMRI` and stimulus data and remove an offset in the
# beginning/end.

Expand Down
2 changes: 1 addition & 1 deletion examples/02_decoding/plot_oasis_vbm.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
# decoding process
mask = nifti_masker.inverse_transform(variance_threshold.get_support())

# %%#
# %%
# Prediction pipeline with :term:`ANOVA` and SVR using
# :class:`nilearn.decoding.DecoderRegressor` Object
#
Expand Down
2 changes: 1 addition & 1 deletion examples/03_connectivity/plot_compare_decomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
`preprint <https://hal.inria.fr/hal-00489507/>`_
"""
# %%##
# %%
# Load brain development :term:`fMRI` dataset
# -------------------------------------------
from nilearn import datasets
Expand Down
2 changes: 1 addition & 1 deletion examples/03_connectivity/plot_data_driven_parcellations.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
in the documentation section :ref:`parcellating_brain`.
"""

# %%####
# %%
# Download a brain development fMRI dataset and turn it to a data matrix
# ----------------------------------------------------------------------
#
Expand Down
2 changes: 1 addition & 1 deletion examples/03_connectivity/plot_group_level_connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"""

# %%##
# %%
# Load brain development :term:`fMRI` dataset and MSDL atlas
# ----------------------------------------------------------
# We study only 30 subjects from the dataset, to save computation time.
Expand Down
2 changes: 1 addition & 1 deletion examples/03_connectivity/plot_signal_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
fmri_filenames = data.func[0]
reduced_confounds = data.confounds[0] # This is a preselected set of confounds

# %%#
# %%
# Extract signals on a :term:`parcellation` defined by labels
# -----------------------------------------------------------
# Using the NiftiLabelsMasker
Expand Down
2 changes: 1 addition & 1 deletion examples/03_connectivity/plot_sphere_based_connectome.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"""

# %%#
# %%
# Retrieve the brain development :term:`fMRI` dataset
# ---------------------------------------------------
#
Expand Down
2 changes: 1 addition & 1 deletion examples/04_glm_first_level/plot_bids_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"""


# %%#
# %%
# Fetch openneuro :term:`BIDS` dataset
# ------------------------------------
# We download one subject from the stopsignal task
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
events_file = data.events
events = pd.read_table(events_file)

# %%##
# %%
# Project the :term:`fMRI` image to the surface
# ---------------------------------------------
#
Expand All @@ -66,7 +66,7 @@

fsaverage = nilearn.datasets.fetch_surf_fsaverage()

# %%##
# %%
# The projection function simply takes the :term:`fMRI` data and the mesh.
# Note that those correspond spatially, are they are both in :term:`MNI` space.
from nilearn import surface
Expand Down Expand Up @@ -202,7 +202,7 @@
# Note that re-creating the above analysis for the left hemisphere requires
# little additional code!

# %%##
# %%
# We project the :term:`fMRI` data to the mesh.
texture = surface.vol_to_surf(fmri_img, fsaverage.pial_left)

Expand Down
4 changes: 2 additions & 2 deletions examples/05_glm_second_level/plot_oasis.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@
design_matrix=design_matrix,
)

# %%##
# %%
# Estimating the :term:`contrast` is very simple.
# We can just provide the column name of the design matrix.
z_map = second_level_model.compute_contrast(
second_level_contrast=[1, 0, 0],
output_type="z_score",
)

# %%##
# %%
# We threshold the second level :term:`contrast`
# at FDR-corrected p < 0.05 and plot it.
from nilearn.glm import threshold_stats_img
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
second_level_input, design_matrix=design_matrix
)

# %%#
# %%
# To estimate the :term:`contrast` is very simple.
# We can just provide the column name of the design matrix.
z_map = second_level_model.compute_contrast(output_type="z_score")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
model = SecondLevelModel(smoothing_fwhm=5.0)
model.fit(contrast_map_filenames, design_matrix=design_matrix)

# %%#
# %%
# To estimate the :term:`contrast` is very simple.
# We can just provide the column name of the design matrix.
z_map = model.compute_contrast("fluency", output_type="z_score")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
output_type="z_score",
)

# %%##
# %%
# We threshold the second level :term:`contrast`
# at uncorrected p < 0.001 and plot it.
from scipy.stats import norm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
second_level_input, design_matrix=paired_design_matrix
)

# %%#
# %%
# Estimating the :term:`contrast` is simple. To do so, we provide the column
# name of the design matrix. The argument 'output_type' is set to return all
# available outputs so that we can compare differences in the effect size,
Expand Down
2 changes: 1 addition & 1 deletion examples/06_manipulating_images/plot_compare_mean_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""


# %%##
# %%
# Fetching 2 subject movie watching brain development :term:`fMRI` datasets.
from nilearn import datasets

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using :class:`nilearn.regions.RegionExtractor` from regions module
"""

# %%#
# %%
# Fetching the smith :term:`ICA` 10 RSN by importing datasets utilities
from nilearn import datasets

Expand Down
2 changes: 1 addition & 1 deletion examples/06_manipulating_images/plot_negate_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# %%
from nilearn import datasets, image, plotting

# %%##
# %%
# Retrieve the data: a motor :term:`contrast` map.

stat_img = datasets.load_sample_motor_activation_image()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

stat_img = load_sample_motor_activation_image()

# %%##
# %%
# Now, the motor :term:`contrast` map image can be resampled
# to the :term:`MNI` template image.
from nilearn.image import resample_to_img
Expand Down
2 changes: 1 addition & 1 deletion examples/06_manipulating_images/plot_roi_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
cut_coords=cut_coords,
)

# %%#
# %%
# We can post-process the results obtained with simple operations
# such as mask intersection and :term:`dilation<Dilation>`
# to regularize the mask definition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"""

# %%##
# %%
# Load brain development :term:`fMRI` dataset and MSDL atlas
# ----------------------------------------------------------
# We study only 60 subjects from the dataset, to save computation time.
Expand Down
2 changes: 1 addition & 1 deletion examples/07_advanced/plot_bids_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
images were already normalized to the same :term:`MNI` space.
"""

# %%#
# %%
# Fetch example :term:`BIDS` dataset
# ----------------------------------
# We download a simplified :term:`BIDS` dataset made available for illustrative
Expand Down
2 changes: 1 addition & 1 deletion examples/07_advanced/plot_ica_neurovault.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
X = np.vstack(X)
term_weights = term_weights[is_usable, :]

# %%##
# %%
# Run :term:`ICA` and map components to terms
# -------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion examples/07_advanced/plot_surface_bids_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
images were already normalized to the same :term:`MNI` space.
"""

# %%#
# %%
# Fetch example :term:`BIDS` dataset
# ----------------------------------
# We download a simplified :term:`BIDS` dataset made available for illustrative
Expand Down
6 changes: 3 additions & 3 deletions examples/08_experimental/plot_surface_image_and_maskers.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def plot_surf_img(
plot_surf_img(mean_img)
plotting.show()

# %%##
# %%
# Connectivity with a surface atlas and `SurfaceLabelsMasker`
# -----------------------------------------------------------
from nilearn import connectome, plotting
Expand All @@ -91,7 +91,7 @@ def plot_surf_img(
plotting.show()


# %%##
# %%
# Using the `Decoder`
# -------------------
import numpy as np
Expand Down Expand Up @@ -137,7 +137,7 @@ def check_embedded_nifti_masker(estimator, *args, **kwargs):
plot_surf_img(decoder.coef_img_[0], threshold=1e-6)
plotting.show()

# %%##
# %%
# Decoding with a scikit-learn `Pipeline`
# ---------------------------------------
import numpy as np
Expand Down

0 comments on commit 7cc1d7d

Please sign in to comment.