Highlight duration offset or remove timestamps
I did an experiment in which participants listened to audio files. I would like to know
1). How can I highlight the offset of the audio file in the plots, i.e. mark the point in time at which listeners will have heard the audio file?
Since this might lead to potentially messy plots, perhaps a better alternative would be to remove timestamps before that time, hence question two:
2). How can I remove all timestamps in the trajectories that occur before the audio file has completed playing?
I assume 2). is also a bit tricky, as the duration of the audio file is different for each of the items.
Comments
Hi there,
I think this question is somewhat similar to the following thread: https://forum.cogsci.nl/discussion/4412/selecting-data-for-mouse-measures
However, here the difference is that the duration that should be excluded in a trial varies between trials. I have a potential workaround for implemeting 2 using mousetrap, assuming that the duration of the audio file is recorded in the trial data and stored within mt_data.
Here is an example script. Please make sure to run it with the most recent version of mousetrap (3.2.0 on CRAN at the time of this post).
Please note that this solution introduces an artifial constant interval of one logged position at the beginning of the trial (see last four lines of example code), however, assuming a constant high frequency recording of the cursor position (as is common in typical lab software like OpenSesame with the mousetrap plugin) this should not be an issue.
Hope this helps!
Best,
Pascal