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

Update NDVar SourceSpace.subjects_dir attributes

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

  • obj (object) – Object to examine.

  • subjects_dir (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.


The following elements are searched:

  • Attributes of objects that have a __dict__.

  • dict values.

  • list/tuple items.