SMITE is a toolbox for using eye trackers from SMI with Python, specifically offering integration with PsychoPy.
Project description
SMITE is a toolbox for using eye trackers from SMI GmbH with Python, specifically offering integration with PsychoPy. A Matlab version that integrates with Psychtoolbox is also available from https://github.com/dcnieho/SMITE
For questions, bug reports or to check for updates, please visit www.github.com/marcus-nystrom/SMITE.
SMITE is licensed under the Creative Commons Attribution 4.0 (CC BY 4.0) license.
demos/read_me.py
shows a minimal example of using the toolbox's
functionality.
To run the toolbox, it is required to PsychoPy 1.90.1 standalone is recommended.
Tested on Windows PsychoPy using Python 2.7. Also tested with PsychoPy3 (Python 3.6, but see issues below)
To get started (Windows)
- Install the SMI iViewX SDK version 4.4.26.
- Download PsychoPy (e.g., StandalonePsychoPy3_PY2-3.2.3-win32.exe )
- Download and install git
- Open the command window
- Go the the PsychoPy folder (e.g., C:\Program Files (x86)\PsychoPy)
- type 'python -m pip install git+https://github.com/marcus-nystrom/SMITE.git#egg=SMITE'
- Download the 'examples' folder and run read_me.py (first change the monitor settings and the eye tracker name in read_me.py).
Alternatively:
- Install the SMI iViewX SDK version 4.4.26.
- Download PsychoPy (e.g., StandalonePsychoPy3_PY2-3.2.3-win32.exe )
- Download or clone the SMITE folder
- Add the downloaded SMITE-folder to path in PsychoPy (under file->preferences)
- Run read_me.py (first change the monitor settings and the eye tracker name in read_me.py).
Usage
As demonstrated in the demo scripts, the toolbox is configured through the following interface:
- retrieve (default) settings for eye tracker of interest:
settings = SMITE.get_defaults('trackerName');
Supported tracker Names areHiSpeed
,RED
,REDm
,RED250mobile
,REDn_Scientific
, andREDn_Professional
. - edit settings if wanted
- initialize SMITE using this settings struct: `EThndl = SMITE(settings)
API
Methods
The following method calls are available on a SMITE instance
Call | inputs | outputs | description |
---|---|---|---|
get_options() |
|
Get settings | |
init() |
Connect to the SMI eye tracker and initialize it according to the requested settings | ||
is_connected() |
|
Report status of the connection to the eye tracker | |
calibrate() |
|
Do participant setup, calibration and validation | |
start_recording() |
|
Start recording eye-movement data to idf file | |
start_buffer() |
|
Start recording eye-movement data into buffer for online use | |
send_message() |
|
Insert message into idf file | |
get_latest_sample() |
sample :struct array |
Get most recent data sample | |
consume_buffer_data() |
list of samples | Get data from the online buffer. The returned samples are removed from the buffer | |
peek_buffer_data() |
list of samples | Get data from the online buffer. The returned samples remain in the buffer | |
stop_buffer() |
|
Stop recording data into buffer | |
stop_recording() |
Stop recording data into idf file | ||
save_data() |
|
Save idf file to specified location | |
de_init() |
|
Close connection to the eye tracker and clean up | |
set_begaze_trial_image() |
|
Put specially prepared message in idf file to notify BeGaze what stimulus image/video belongs to a trial | |
set_begaze_key_press() |
|
Put specially prepared message in idf file that shows up as keypress in BeGaze | |
set_begaze_mouse_click() |
|
Put specially prepared message in idf file that shows up as mouse click in BeGaze | |
start_eye_image_recording() |
|
Start recording eye images to file. Not supported on RED250mobile , REDn Scientific , and REDn Professional |
|
stop_eye_image_recording() |
Stop recording eye images to file | ||
set_dummy_mode() |
Enable dummy mode, which allows running the program without an eye tracker connected |
ToDos (current discrepancies between the paper and the toolbox):
- File transfer in two computer setups not implemented
- do_flip_eye not implemented (fixes a bug in older versions of iViewX, e.g., v. 2.7.13, where left and right eyes are flipped)
- get_options returns all settings. set_options does nothing. This means that it's currently up to the user not to use functionally that is not available during recording (for instance changing the sampling frequency of the eye tracker).
- Images returned from the API look strange when using PsychoPy3. Affects validation screen and eye images.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file py-smite-1.0.0rc1.tar.gz
.
File metadata
- Download URL: py-smite-1.0.0rc1.tar.gz
- Upload date:
- Size: 55.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bae94f51d24b67281f7361d6919dfd5029f412f918eeb71df8d9eea792945d16 |
|
MD5 | 4787a304fc9f9701c65beb58567a8949 |
|
BLAKE2b-256 | ce41e6a936219830caab6a7cd154ced9d6f763c28486167d67439fa2609926c3 |
File details
Details for the file py_smite-1.0.0rc1-py3-none-any.whl
.
File metadata
- Download URL: py_smite-1.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 61.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa6ac9669d5cfea8070ca32e23d6fcab0a1440f2d5236f6cf2c67c243b3b153b |
|
MD5 | 559ec4e664a8131180715cf7a94cfc11 |
|
BLAKE2b-256 | f77251f1b0bc1d61c7208230d9d0ca4eae2a4a13c309f651d83700984b3cebc9 |