gumbi.utils.generic_utils

Functions

savefig(filename[, fig, path, silent])

Saves figure as .png (300 dpi, transparent) and .svg

setup_paths([make_missing])

Gathers paths of expected directories in experiment structure

gumbi.utils.generic_utils.savefig

gumbi.utils.generic_utils.savefig(filename: str, fig=None, path=None, silent=False, **kwargs)

Saves figure as .png (300 dpi, transparent) and .svg

Parameters:
  • filename (str) – Name of file to save (without extension)

  • fig (mpl.figures.Figure, optional) – Figure object to save. If None, calls plt.gcf()

  • path (pl.Path, optional) – Directory in which to save figure

  • silent (bool, default False) – Whether to display figure saving progress

  • **kwargs – Additional arguments passed to mpl.figures.Figure.savefig()

gumbi.utils.generic_utils.setup_paths

gumbi.utils.generic_utils.setup_paths(make_missing=True)

Gathers paths of expected directories in experiment structure

Parameters:

make_missing (bool, default True) – Whether to create directories that are expected but not found

Returns:

Pathlib objects for each directory: ‘Base’ (root directory for experiment), ‘Code’, ‘Data’, ‘Results’, and ‘Figures’

Return type:

dict