This function takes a trial results tibble as generated by read_study_data
and adds a number of trial-level variables and summary statistics used for
quality checks and analyses. Assumes that threat_appear_time has already
been computed (as this can be study- and threat-specific)
process_trial_results(trials_raw, buffer_time = 1.5, fade_time = 0.05)Requires the following columns:
threat, scenario_data_0, head_movement_data_0, threat_movement_data_0,
end_state, fruittask0.csv_data_0