brainstat.datasets.base.fetch_mask

brainstat.datasets.base.fetch_mask(template, join=True, data_dir=None, overwrite=False)[source]

Fetches midline masks.

Parameters
  • template (str) – Name of the surface template. Valid templates are: “fsaverage5”, “fsaverage”, “fslr32k”, “civet41k”, and “civet164k”.

  • join (bool, optional) – If true, returns a numpy array containing the mask. If false, returns a tuple containing the left and right hemispheric masks, respectively, by default True

  • data_dir (str, pathlib.Path, optional) – Directory to save the data, by default $HOME_DIR/brainstat_data/surface_data.

Returns

numpy.ndarray or tuple of numpy.ndarray – Midline mask, either as a single array or a tuple of a left and right hemispheric array.