Skip to content

Commit

Permalink
Update nilearn imports in doc building
Browse files Browse the repository at this point in the history
  • Loading branch information
emdupre committed Jan 19, 2024
1 parent 9ac4521 commit e956fdb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fmralign/fetch_example_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os

import pandas as pd
from nilearn.datasets._utils import fetch_files, get_dataset_dir
from nilearn.datasets.utils import _fetch_files, _get_dataset_dir


def fetch_ibc_subjects_contrasts(subjects, data_dir=None, verbose=1):
Expand Down Expand Up @@ -34,7 +34,7 @@ def fetch_ibc_subjects_contrasts(subjects, data_dir=None, verbose=1):
Path to the mask to be used on the data
Notes
------
This function is a caller to nilearn.datasets._utils.fetch_files in order
This function is a caller to nilearn.datasets.utils._fetch_files in order
to simplify examples reading and understanding for fmralign.
See Also
---------
Expand All @@ -45,11 +45,11 @@ def fetch_ibc_subjects_contrasts(subjects, data_dir=None, verbose=1):
if subjects == "all":
subjects = ["sub-{i:02d}" for i in [1, 2, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15]]
dataset_name = "ibc"
data_dir = get_dataset_dir(dataset_name, data_dir=data_dir, verbose=verbose)
data_dir = _get_dataset_dir(dataset_name, data_dir=data_dir, verbose=verbose)

# download or retrieve metadatas, put it in a dataframe,
# list all condition and specify path to the right directory
metadata_path = fetch_files(
metadata_path = _fetch_files(
data_dir,
[
(
Expand All @@ -67,7 +67,7 @@ def fetch_ibc_subjects_contrasts(subjects, data_dir=None, verbose=1):
metadata_df = metadata_df[metadata_df.subject.isin(subjects)]

# download / retrieve mask niimg and find its path
mask = fetch_files(
mask = _fetch_files(
data_dir,
[("gm_mask_3mm.nii.gz", "https://osf.io/yvju3/download", {"uncompress": True})],
verbose=verbose,
Expand Down Expand Up @@ -106,5 +106,5 @@ def fetch_ibc_subjects_contrasts(subjects, data_dir=None, verbose=1):
for condition in conditions
]
)
files.append(fetch_files(data_dir, filenames, verbose=verbose))
files.append(_fetch_files(data_dir, filenames, verbose=verbose))
return files, metadata_df, mask

0 comments on commit e956fdb

Please sign in to comment.