Welcome! Log In Create A New Profile

Advanced

eye data and joystick data length

Posted by rahim_hashim 
eye data and joystick data length
April 06, 2021 11:17AM
The task that I am running is acquiring both eye data (from EyeLink 1000+ via TCP/IP) and joystick data (via analog input channels on BNC-2090A for X and Y). Looking through the output .h5 file, I noticed that the length of the arrays of eye data and joystick data are different from each other frequently (every 2-3 trials) by 1-2 frames.

When comparing the length of the arrays to the length of the trial (using the timestamp for eventmarker 'End Trial'), the length of the trial is always shorter than the length of the eye data/joystick data by 2-5ms.

I have a few questions that I'd like to ask, to ensure that I'm analyzing properly shifted/adjusted eye and joystick data:

1) Eye data and joystick data could be truncated to match the length of the trial. Do you have an idea about whether those additional eye/joystick samples should be cut from the beginning or end of the array?

2) Do you know why the length of the eye data array is longer than the joystick data on some trials, and shorter on other trials?

The task is attached, as well as an example session output file with 100 trials (converted to a tab-delimited csv in output_data.txt given the size/filetype restriction).

Thanks for your help.
Attachments:
open | download - JoystickTask5_userloop.m (1.8 KB)
open | download - JoystickTask5_runscene.m (6.8 KB)
open | download - output_data.txt (57.5 KB)
Re: eye data and joystick data length
April 06, 2021 05:51PM
I don't understand what you mean by 1-2 frames. The output_data.txt file shows only the first 3 and last 3 data points in each array, so I cannot compare them. Since I do not know the configuration of your recording, the best is to send me the whole data file.

The timestamp of 'End Trial' is not the length of the trial. See the following manual page.
https://monkeylogic.nimh.nih.gov/docs_GettingStarted.html#AlignTimestampsAndAnalogData

----------

Did you record data during ITI as well?

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.