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.
3.1.3. nistats.datasets.select_from_index¶
-
nistats.datasets.
select_from_index
(urls, inclusion_filters=[], exclusion_filters=[], n_subjects=None)¶ Select subset of urls with given filters.
- Parameters
- urls: list of str
List of dataset urls obtained from index download
- inclusion_filters: list 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_filters: list 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_subjects: int, optional
number of subjects to download from the dataset. All by default.
- Returns
- urls: list of string
Sorted list of filtered dataset directories