mousetrap R package analyze mouse position data not using pix unit
Hello Pascal, thanks for the useful package. I have a question about analyzing my mousetrack data using mousetrap R package. My mouse position data was recorded using height unit (a normalised unit) but not pix unit by PsychoPy. I am not sure whether this type of data can be directly processed by mousetrap R package? Or it must be converted to pix unit data? I found there is a mt_align_start_end function in the package. Can I use this function to space-normalizing the position data and then processing the later analysis?
Thank you in advance for your help!
Bo
Comments
Hi Bo,
the mouse position data does not have to be in pixel data for the analysis, so in principle you should be able to import and work with the recorded trajectory data in mousetrap as is.
You can use the mt_align_start_end function if you want to align the start and end position across trials. Indirectly, this also transforms the trajectories into a new coordinate system (which you can influence by specifying start and end values via the corresponding arguments of the function).
In case you just want to transform the coordinates of your trajectories into different values, you can also do this directly, e.g., like this:
Hope this helps!
Best
Pascal
Thank you very much, Pascal. That is, I did not need to converted the mouse position data into pixel unit. A related questions is the coordinate in PsychoPy system is not the same as OpenSesame. The coordinate system is centered on the screen center, but the y coordinate values decrease as the mouse moves toward the bottom right (1, -1). So, is it more reasonable use the `mt_align_start_end` function to align the start and end position across trials into a new coordinate system? Or can I still use the original coordinate system?
Best
Bo
Hi Bo,
I think both options are possible.
If you want to use the original coordinate system but make the y coordinate values increase towards the top of the screen, you can transform them via:
Best,
Pascal