pyns.fetch_utils.fetch_images

pyns.fetch_utils.fetch_images(dataset_name, data_dir, no_get=False, datalad_jobs='auto', preproc_address=None, **kwargs)

Fetch preprocessed images from a Neuroscout dataset. Installs dataset using DataLad if not already installed.

Args:

dataset_name (str): Name of dataset to fetch. data_dir (str): Path to datasetim s directories. Dataset will be installed. in data_dir / dataset_name if not already installed. no_get (bool): Whether to skip fetching (i.e. dry run). datalad_jobs (int): Number of jobs to use for DataLad download. preproc_address (str): URL to install dataset from. Fetched from API if not provided. kwargs: Additional arguments to pass to get_paths, including filters (e.g. subjects, runs, tasks).

Returns:

preproc_dir (str): Path to preprocessed folder (i.e. fmriprep or preproc) paths (Path object): List of BIDSImageFile objects corresponding to fetched files

Examples:
>>> from pyns.fetch_utils import fetch_preproc
>>> preproc_dir, paths = fetch_preproc(
        'Budapest', '/tmp', subjects='sid000005', runs=[1, 2])
>>> paths
[<BIDSImageFile filename='/tmp/Budapest/fmriprep/sub-sid000005/\ 
func/sub-sid000005_task-movie_run-1_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz'>, 
...
]