neuromaps.datasets.fetch_annotation

neuromaps.datasets.fetch_annotation(*, source=None, desc=None, space=None, den=None, res=None, hemi=None, tags=None, format=None, return_single=True, token=None, data_dir=None, verbose=1)[source]

Download files for brain annotations matching requested variables.

Parameters:
  • source (str or list-of-str) – Values on which to match annotations. If not specified annotations with any value for the relevant key will be matched. Default: None

  • desc (str or list-of-str) – Values on which to match annotations. If not specified annotations with any value for the relevant key will be matched. Default: None

  • space (str or list-of-str) – Values on which to match annotations. If not specified annotations with any value for the relevant key will be matched. Default: None

  • den (str or list-of-str) – Values on which to match annotations. If not specified annotations with any value for the relevant key will be matched. Default: None

  • res (str or list-of-str) – Values on which to match annotations. If not specified annotations with any value for the relevant key will be matched. Default: None

  • hemi (str or list-of-str) – Values on which to match annotations. If not specified annotations with any value for the relevant key will be matched. Default: None

  • tags (str or list-of-str) – Values on which to match annotations. If not specified annotations with any value for the relevant key will be matched. Default: None

  • format (str or list-of-str) – Values on which to match annotations. If not specified annotations with any value for the relevant key will be matched. Default: None

  • return_single (bool, optional) – If only one annotation is found matching input parameters return the list of filepaths instead of the standard dictionary. Default: True

  • token (str, optional) – OSF personal access token for accessing restricted annotations. Will also check the environmental variable ‘NEUROMAPS_OSF_TOKEN’ if not provided; if that is not set no token will be provided and restricted annotations will be inaccessible. Default: None

  • data_dir (str, optional) – Path to use as data directory. If not specified, will check for environmental variable ‘NEUROMAPS_DATA’; if that is not set, will use ~/neuromaps-data instead. Default: None

  • verbose (int, optional) – Modifies verbosity of download, where higher numbers mean more updates. Default: 1

Returns:

data – Dictionary of downloaded annotations where dictionary keys are tuples (source, desc, space, den/res) and values are lists of corresponding filenames

Return type:

dict