When len(exp_data['sync_events']) != len(exp_data['bmi3d_events'], 'bmi3d_events' is more trustworthy.
But tabulate_behavior_data() uses 'sync_events' (i.e. 'events') to segment trials. Not sure what causes this bug in 'sync_events' - maybe related to pause bug or non-zero values in exp_data['sync_events']['data']?
To avoid the bug, get_ref_dis_frequencies() uses 'bmi3d_events' but then the number of trial segments doesn't match up with the df from tabulate_behavior_data(). Potential fixes: handle data differently when # of 'events' and 'bmi3d_events' doesn't match, or find another method for getting the frequencies that works either way