Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

nilearn.datasets.select_from_index#

nilearn.datasets.select_from_index(urls, inclusion_filters=None, exclusion_filters=None, n_subjects=None)[source]#

Select subset of urls with given filters.

Parameters:
urlslist of str

List of dataset urls obtained from index download.

inclusion_filterslist of str, optional

List of unix shell-style wildcard strings that will be used to filter the url list. If a filter matches the url it is retained for download. Multiple filters work on top of each other. Like an “and” logical operator, creating a more restrictive query. Inclusion and exclusion filters apply together. For example the filter ‘task-rest’’ would keep only urls that contain the ‘task-rest’ string.

exclusion_filterslist of str, optional

List of unix shell-style wildcard strings that will be used to filter the url list. If a filter matches the url it is discarded for download. Multiple filters work on top of each other. Like an “and” logical operator, creating a more restrictive query. Inclusion and exclusion filters apply together. For example the filter ‘task-rest’ would discard all urls that contain the ‘task-rest’ string.

n_subjectsint, optional

Number of subjects to download from the dataset. All by default.

Returns:
urlslist of str

Sorted list of filtered dataset directories.

Examples using nilearn.datasets.select_from_index#

First level analysis of a complete BIDS dataset from openneuro

First level analysis of a complete BIDS dataset from openneuro