{"id":19214659,"url":"https://github.com/garethjns/spatialtaskv2","last_synced_at":"2026-05-04T00:35:00.579Z","repository":{"id":111936953,"uuid":"79127191","full_name":"garethjns/SpatialTaskV2","owner":"garethjns","description":"Code for SpatialTaskV2","archived":false,"fork":false,"pushed_at":"2017-09-01T12:29:22.000Z","size":710,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T08:26:16.477Z","etag":null,"topics":["eye-tracker","matlab","multisensory-integration","psychetoolbox3","psychophysics","pupil-labs","python","temporal-integration"],"latest_commit_sha":null,"homepage":null,"language":"Matlab","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garethjns.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-16T14:37:08.000Z","updated_at":"2017-01-23T18:05:31.000Z","dependencies_parsed_at":"2023-03-13T13:31:06.321Z","dependency_job_id":null,"html_url":"https://github.com/garethjns/SpatialTaskV2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/garethjns/SpatialTaskV2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garethjns%2FSpatialTaskV2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garethjns%2FSpatialTaskV2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garethjns%2FSpatialTaskV2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garethjns%2FSpatialTaskV2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garethjns","download_url":"https://codeload.github.com/garethjns/SpatialTaskV2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garethjns%2FSpatialTaskV2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32590456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eye-tracker","matlab","multisensory-integration","psychetoolbox3","psychophysics","pupil-labs","python","temporal-integration"],"created_at":"2024-11-09T14:10:53.042Z","updated_at":"2026-05-04T00:35:00.561Z","avatar_url":"https://github.com/garethjns.png","language":"Matlab","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpatialTaskV2 - draft\n\n# Requirements\n- Eye tracker computer:\n\t- Linux (Ubuntu 16.10)\n\t- [Pupil labs hardware and software](https://github.com/pupil-labs/pupil) ([v0.8.7](https://github.com/pupil-labs/pupil/releases/tag/v0.8.7)).\n\t- Python 2.7\n- Task computer\n\t- Windows 7\n\t- MATLAB 2013b\n\t- [PyscheToolBox-3](http://psychtoolbox.org/)\n\t- ASIO Soundcard \n\n# Instructions\n\n1. Set up Linux/Python computer and eye tracker\n2. Set up Windows/MATLAB computer and task\n3. Introduce subject\n4. Calibrate and start eye tracker recording\n5. Start task\n6. Monitor task\n7. Save data and Shutdown\n\n\u003cbr\u003e\n\n### 1. Set up Linux/Python computer\n- Open terminal.\n\t- cd anaconda2\n- Run Spyder (Python 2.7).\n\t- Open EyeTracker/Run.py.\n- Open eye tracker software.\n\t- Turn on detection of both eyes.\n\t- Check pupil remote plugin is loaded\n\t- Find server port number under \"Pupil Remote\" menu.\n- In run.py in Spyder:\n\t- Set port number for the pupil remote server (**port**).\n\t- Set address and port of TCP server (**TCPAddr**, **TCPPort**). Address should be Linux computers adress on network.\n\t- Set filename name for pickle file (use subject ID).\n\n### 2. Set up Windows/MATLAB computer.\n- Check cable 7 is plugged in at back of MOTU and cable 16 isn't.\n- Turn on MOTU. Check that sampling rate indicator light on front settles on a value. If it doesn't, restart the Windows computer.\n- Turn on both amplifiers.\n- Run testSpeakersLights.m to check all speakers and lights are working as expected. Each speaker/light pair should come on one by one.\n\t- If multiple speakers/lights don't work, check amplifiers are both on.\n\t- If light/sound are sperated, check cable mapping.\n\t- If audible clicks, LED output is going to a speakers. Check cable mapping (specifically switching channels 7 and 16).\n- Set up touch screen.\n\t- Check it's plugged in.\n\t- Check it's virtually located to the bottom right of the main monitor.\n- Open MATLAB 2013b.\n\t- Set working directory to C:\\Gareth\\SpatialTaskV2\\MATLABTask\\.\n\t- Open run.m in editor.\n\t- Set temporary subject ID\n\t- Set TCP address and port (**params.TCPAddr**, **params.TCPPort**) to match Python values.\n\t- On Python computer click run in run.py\n\t- On MALAB computer click run for run.m\n\t- Check touchscreen figure is aligned with monitor.\n\t- Check touchscreen figure calibration is correct (do the plotted dots align with the red dots?) If yes, enter 'y' and press enter.\n\t\t- If not:\n\t\t\t- Press crtl+c to stop the task.\n\t\t\t- dbquit if necessary.\n\t\t\t- Enable calibration in run.m's parameters.\n\t\t\t- Run run.m and re-calibrate.\n\t- Check the touchscreen's touch calibration is correct (does pressing on the screen click in the correct place?).\n\t\t- If not, double click eGalaxTouch icon in system tray and run monitor mapping.\n\t\t- Check touchscreen again, if calibration is still wrong, right click eGalaxTouch icon and run 4 point calibration. \n\t- Enter chamber and check stimuli are working.\n\t- End test by pressing ctrl+c.\n\t\t- Type dbquit if in debug mode (indicated by K\u003e\u003e in command window).\n\t- Set parameters for task in run.m.\n\t\t- Set subject ID.\n\t\t- Set nBlocks to ~8 (1 block = 100 trials = ~250 S).\n\t\t- Set nBreaks to ~4.\n\t\t- exchangeTime to 1.\n\t\t- PTSKip to 0.\n\t\n\n\n### 3. Introduce subject\n- Give information sheet to subject to keep.\n- Get subject to read and sign consent form.\n- Explain eye tracker and basic task requirements. \n\t- Keep gaze fixated on target during stimulation.\n \t- Respond on touchscreen.\n- Explain paradigm.\n\t- Pre-training phase (\u003c5 mins).\n\t\t- AV stimuli will come from same location, subject has to indicate loaction with one press on touchscreen.\n\t\t- They can look around after stimuli before responding to orientate themselves, but should look back to red fixation LED after responding. This will be tracked.\n\t\t- Pre-training will continue until a threshold of localisation accuray is reached.\n\t\t- When finished, a message will appear on touch screen saying ready to begin main task.\n\t\t- When ready, press screen again to continue.\n\t- Actual task (~1 hour).\n\t\t- Subject needs to keep eyes on fixation LED while stimuli are playing (~1s).\n\t\t- Subject needs to respond on touchscreen twice:\n\t\t\t- First to indicate auditory location.\n\t\t\t- Second to indicate visual location.\n\t\t- If the task stops, check touchscreen message to see if it's a break.\n\t\t- Touchscreen messages will guide subject with what to do.\n- Outside booth:\n\t- Place eyetracker on subject and position eye cameras.\n\t- Unplug eye tracker.\n- Move subject inside booth.\n\t- Plug eyetracker in inside booth and re-enable eye detection.\n\t- Check eye tracker camera pupil detection and adjust as required. Make sure detect pupil 0 and 1 are both enabled in pupil app.\n\t- Check world camera alignment.\n\t- Show subject expected fixation LED location.\n\t- Raise/lower chair so subject's head is vertically level with fixation LED.\n\t- Hand subject touchscreen. Make sure the cables don't drop out.\n\n\n### 4. Calibrate and start eye tracker recording.\n- On the Linux computer select the eye tracker software. If it's already running, ***don't** click the taskbar shortcut again*.\n- In the world window:\n\t- Ensure the target surface markers are detected (green boxes around markers). \n\t\t- If not, adjust \"min_marker_perimeter\" in \"Surface Tracker\" menu.\n\t- Ensure surface is defined, detected, and named \"Target\".\n\t\t- If not defined, add and name as \"Target\" in Surface Tracker menu.\n\t\t- If not detected, check markers are being detected.\n\t- In the \"Calibration\" menu select \"Natural Features Calibration\".\n\t- Begin calibration by clicking (C) in the top left.\n\t- Ask subject to look at each world marker in turn and click to make these in the world.\n\t- Press C key to end calibration.\n\t- Check calibration accuracy.\n\t- Press (R) to begin recording video/gaze data.\n- In Spyder:\n\t- Click in run.py and click green run button.\n\t- Check Python connects to ZMQ server and waits for MATLAB to connect to TCP server.\n\n### 5. Start task\n- On the Windows/MATLAB computer:\n\t- Run run.m.\n\t\t- Respond 'y' to calibration question.\n- On Linux computer \n\t- Check MATLAB has successfully connected to TCP server and Python has begun collecting data from eyetracker.\n\n### 6. Monitor task\n- Tell subject to press touchscreen when ready to start (twice).\n- Monitor pre-training.\n\t- Check subject is looking at fixation light when trials start.\n\t- Subject should pass quickly, if not, re-explain task!\n- Monitor task.\n\t- Check subject is returning gaze to fixation LED/Target surface before each trial starts.\n\t- Hope Windows computer doesn't bluescreen randomly.\n- MATLAB task can be stopped with ctrl+c.\n\t- If task is stopped, or crashes for another reason, MATLAB enters debug mode.\n\t- If there is data that needs to be saved, save the workspace manually (data is only automatically saved during each break, but not after every trial).\n- When finished, untangle subject from cables and debrief.\n\n### 7. Save data and shutdown\n- On Linux computer:\n\t- In world view click (R) in world window to stop recording.\n\t- In Python click stop to stop collection.\n\t\t- This raises an exception, which will be caught.\n\t\t- Python will then automatically convert the saved pickle file to a .mat file.\n\t- Copy the directory containing the eyetracker video from /Home/recordings/ to /Home/recordings/SpatialTaskV2 Recordings/.\n\t\t- Rename the backed up directory from the date to the subject ID.\n\t- Close eye tracker software.\n\t- Unplug eye tracker.\n- On Windows computer:\n\t- When the task completes, MATLAB saves its data automatically.\n\t- In ...\\Data\\[SubjectID]\\[Datetime]\\TeComplete.mat.\n\t- Copy ...\\Data\\[SubjectID]\\ directory to external backup.\n\t- Close MATLAB editor (to prevent open files automatically re-opening next time someone starts MATLAB).\n\t- Close MATLAB.\n\t- Turn off amplifiers.\n\t- Turn off MOTU soundcard.\n\n# To do\n - Add live functionality\n\t- Via TCP server?\n\t- Minor modification to MATLAB code also required to monitor and act on online eye data.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarethjns%2Fspatialtaskv2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarethjns%2Fspatialtaskv2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarethjns%2Fspatialtaskv2/lists"}