utils

methods used in multiple classes

source

save_trial

 save_trial (trial)

Saves a pickle file in the root dir of a Trial. This file can be loaded using load_trial.


source

load_trial

 load_trial (tasks_dir, saved_file=None)

Loads a Trial, that was saved as a pickle file before using save_trial and returns it. Requires the trials’ root_dir as argument.


source

transcribe_audio_to_task

 transcribe_audio_to_task (task, r, file, trial, language)

source

get_duration_in_s_from_timestamps

 get_duration_in_s_from_timestamps (start_time_stamp, end_time_stamp=None)

source

get_colors

 get_colors (task_names:List, palette_name='colorblind')

Assigns a unique color to all tasks in task_names from the seaborn palette colorblind or if there are more than 20 tasks from husl.


source

create_cumulative_bar_plots

 create_cumulative_bar_plots (d, task_names, colors, bar_height=1)

source

create_histplot

 create_histplot (d)

source

create_cumulative_tie_plots

 create_cumulative_tie_plots (d, task_names, colors, bar_height=1)

source

create_cumulative_dataframe

 create_cumulative_dataframe (d, task_names=None)

source

create_timeline

 create_timeline (d, task_names, colors, bar_height=1)

source

create_cumulative_pie_plots_per_lane

 create_cumulative_pie_plots_per_lane (dataframe_per_subtasks)

source

create_cumulative_bar_plots_per_lane

 create_cumulative_bar_plots_per_lane (dataframe_per_subtasks)

source

get_number_of_columns

 get_number_of_columns (columns, plots_in_one_row=4)