odynn.utils module

odynn.utils.bar(ax, var, good_val=None)[source]
odynn.utils.box(df, cols, labels)[source]
odynn.utils.boxplot(ax, var)[source]
odynn.utils.clamp(val, minimum=0, maximum=255)[source]
Clamp val between minimum and maximum
Parameters:
  • val (float) – value to clamp
  • minimum (int) – minimum
  • maximum (int) – maximum
Returns:

clamped value

Return type:

int

class odynn.utils.classproperty(fget)[source]

Bases: object

odynn.utils.colorscale(hexstr, scalefactor)[source]

Scales a hex string by scalefactor. Returns scaled hex string.

odynn.utils.plot(ax, var, good_val=None)[source]
odynn.utils.save_show(show, save, name='', dpi=500)[source]

Show and/or save the current plot in utils.current_dir/name :param show: If True, show the plot :type show: bool :param save: If True, save the plot :type save: bool :param name: Name for the saved file :type name: str :param dpi: quality :type dpi: int

odynn.utils.set_dir(subdir)[source]

Set directory for saving files to utils.RES_DIR`+`subdir and create subfolders

Parameters:subdir (str) – name of the directory
Returns:complete path to the new directory
Return type:str