eelbrain.load.update_subjects_dir

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

Update NDVar SourceSpace.subjects_dir attributes in place

Examine elements of obj recursively and replace subjects_dir on all NDVars with SourceSpace dimension that are found.

Parameters:
  • obj (object) – Object to examine.

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

  • depth (int) – Recursion depth for examining attributes (default 0, i.e. only apply to obj without recursion). Negative number for exhaustive search.

Return type:

None

Notes

The following elements are searched:

  • Attributes of objects that have a __dict__.

  • dict values.

  • list/tuple items.