Data collection and analysis routines for project: Intraoperative studies of flexible decision making
Includes two tasks:
- Visual/Memory guided saccades
- Reaction-time random-dot motion direction discrimination (with speed/accuracy and bias manipulations)
** GET/UPDATE THE CODE
-
Get Lab-Matlab-Control from the GoldLab gitHub repository (https://github.com/TheGoldLab/Lab-Matlab-Control)
For now, the code is in a development branch (eyeDev). On our machines, open the Terminal application and type:
-> cd /Users/Lab/ActiveFiles/Matlab/Lab-Matlab-Control
-> git pull origin eyeDev
-
Install dependencies
a. QUEST: https://github.com/BrainardLab/mQUESTPlus
b. CLIENT/SERVER COMMUNICATION (for remote graphics): https://www.mathworks.com/matlabcentral/fileexchange/345-tcp-udp-ip-toolbox-2-0-6
c. ZeroMQ for Matlab (asynchronous communication protocol, for communicating with the pupil-labs eye tracking device): https://github.com/fagg/matlab-zmq
** ON THE SERVER (the Mac Mini in our setup)
-
Start Matlab server
a. type: -> runServer
b. To force quit when the screen is blank (will have to re-start Matlab): --
c. To force quit script when the command window is available: -c
** ON THE CLIENT (the laptop in our setup)
-
Start Pupil labs.
a. Make sure the glasses are plugged into the USB port
b. Open the "Pupil Capture" app (green outer circle, black inner circle)
c. Three windows should open up, labeled: Pupil Capture - World Pupil Capture - Eye 0 Pupil Capture - Eye 1
If the "World" window does not open or the world view is not showing, try fiddlig with the USB cable to the glasses. If one or both of the Eye windows does not open, go to the World window, click on the button on the upper-right corner, and make sure <Direct eye 0>�and <Direct eye 1> both have greenish buttons next to them (if not, click on the button).
d. Make sure calibration (the "bullseye"�icon to the right) is set to Manual Marker Calibration.
-
Start Matlab client
a. type: -> DBSrun() where can be one of these strings: 'Office' -- configured to run in the office (no TTL signals, full task suite) 'OR' --- configured to run in the OR (TTL signals, full task suite) 'Search' --- configured to run in the OR while searching for neurons (TTL signals, only VGS and high-coherence dots) 'Debug' --- no remote graphics, other test setttings
b. Using the GUI
- click "Push to begin" to begin
- that button then changes to pause/continue (dark green when running, light green when paused)
- "Recalibrate" to force eye calibration
- "Skip task" to stop the current task and move on to the next (tasks are listed just below the buttons)
- "Abort" to stop the experiment
- Note that all buttons register only between trials ... it is fine to click them during a trial, but nothing will (apparently) happen. This is normal. Internally, it sets a flag that is read only between trials.
- Eye offsets: click to change eye calibration offsets U
, D, L, R. These have not been fully tested so probably best to avoid right now.
- Gaze windows: Size is the diameter, in degrees visual angle. Time is the time, in sec, that the eye needs to be in (or out of) the window to register. the "fix" button means that the values in the Size/Time fields should be fixed across tasks; otherwise they are loaded in separately for each task.
- Note that on the screen, for the gaze windows (blue circles), a solid line means that the window is activated when the gaze enters it, whereas a dashed line means that the window is active when the gaze exits it.
c. To force quit when the screen is blank (will have to re-start Matlab): --
d. To force quit script when the command window is available: -c
** DATA FILES
-
There are two data files created: a. the topsDataLog file: .mat b. the pupilLabs file: _pupilLabs.mat
Default paths are in DBSfilepath.
The default filename has the form: data_YYYY_MM_DD_HH_NN
where YYYY = four-digit year MM = two-digit month DD = two-digit day HH = two-digit hour NN = two-digit minute
-
Move them to a separate hard drive or Penn Box