eelbrain.load.update_subjects_dir

eelbrain.load.update_subjects_dir(obj, subjects_dir, depth=0)

Update FreeSurfer subjects_dir on source-space data

Operates in-place.

Parameters:
  • obj (object) – Object on which to replace subjects_dir.

  • subjects_dir (Path | str) – New values for subjects_dir.

  • depth (int) – Depth for visiting obj content and attributes. Default (0) only applies the function to obj without recursion, assuming that obj is itself an NDVar or SourceSpace. Use depth to replace subjects_dir on, e.g., NDVars in a list, dict values, or on object attributes. Use a negative number for an exhaustive search.

Return type:

None

Notes

Use the depth parameter to recursively update content and attributes in obj, for example, obj may be a list or dict containing NDVars, or a BoostingResult object.

The following elements are searched:

  • Attributes of objects that have a __dict__.

  • dict values.

  • list and tuple items.