utils
methods used in multiple classes
save_trial
save_trial (trial)
Saves a pickle file in the root dir of a Trial
. This file can be loaded using load_trial
.
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.
transcribe_audio_to_task
transcribe_audio_to_task (task, r, file, trial, language)
get_duration_in_s_from_timestamps
get_duration_in_s_from_timestamps (start_time_stamp, end_time_stamp=None)
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.
create_cumulative_bar_plots
create_cumulative_bar_plots (d, task_names, colors, bar_height=1)
create_histplot
create_histplot (d)
create_cumulative_tie_plots
create_cumulative_tie_plots (d, task_names, colors, bar_height=1)
create_cumulative_dataframe
create_cumulative_dataframe (d, task_names=None)
create_timeline
create_timeline (d, task_names, colors, bar_height=1)
create_cumulative_pie_plots_per_lane
create_cumulative_pie_plots_per_lane (dataframe_per_subtasks)
create_cumulative_bar_plots_per_lane
create_cumulative_bar_plots_per_lane (dataframe_per_subtasks)
get_number_of_columns
get_number_of_columns (columns, plots_in_one_row=4)