brain_pipe.save.default.DefaultFilenameFn

class DefaultFilenameFn(path_keys=('data_path', 'stimulus_path'), other_keys=('event_info/snr',), separator='_-_', data_dict_extension='.data_dict', feature_extension='.npy')

Bases: Callable[[Dict[str, Any], str | None, str | None], str]

Default filename function to create paths to save data.

Attributes

SPLIT_CHAR

__init__(path_keys=('data_path', 'stimulus_path'), other_keys=('event_info/snr',), separator='_-_', data_dict_extension='.data_dict', feature_extension='.npy')

Create a new DefaultFilenameFn instance.

Parameters:
  • path_keys (Sequence[str]) – The keys of the paths to include in the filename.

  • other_keys (Sequence[str]) – The keys of other data to include in the filename.

  • separator (str) – The separator to use between parts of the filename.

  • data_dict_extension (str) – The extension to use when saving the entire data_dict.

  • feature_extension (str) – The extension to use when saving a single feature.

Methods

__init__([path_keys, other_keys, separator, ...])

Create a new DefaultFilenameFn instance.