├── .gitattributes ├── .gitignore ├── MANIFEST.in ├── README.md ├── demos ├── BASIC │ ├── keyboard │ │ └── run.py │ ├── lauchHubServer │ │ └── run.py │ └── mouse │ │ └── run.py └── EXTENDED │ ├── eye_tracker │ ├── experiment_config.yaml │ ├── eyetracker_configs │ │ ├── eyegaze_config.yaml │ │ ├── eyelink_config.yaml │ │ ├── iviewx_config.yaml │ │ └── tobii_config.yaml │ ├── images │ │ ├── desert.png │ │ ├── jellyfish.png │ │ ├── lighthouse.png │ │ ├── party.png │ │ └── swimming.png │ ├── iohub_config.yaml │ ├── iohub_config.yaml.part │ └── run.py │ └── keyboard_rt │ └── run.py ├── docs ├── Makefile ├── _static │ ├── fav_io_32.ico │ ├── favio16.ico │ ├── iofav.ico │ ├── logo_io.png │ └── my-styles.css ├── _templates │ └── layout.html ├── _themes │ ├── LICENSE.txt │ └── bootstrap │ │ ├── globaltoc.html │ │ ├── layout.html │ │ ├── localtoc.html │ │ ├── relations.html │ │ ├── searchbox.html │ │ ├── sourcelink.html │ │ ├── static │ │ ├── bootstrap-2.3.1 │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ └── bootstrap.min.css │ │ │ ├── img │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ └── bootstrap.min.js │ │ ├── bootstrap-sphinx.css_t │ │ ├── bootstrap-sphinx.js │ │ └── js │ │ │ ├── jquery-1.9.1.js │ │ │ ├── jquery-1.9.1.min.js │ │ │ └── jquery-fix.js │ │ └── theme.conf ├── build_all.bat ├── conf.py ├── index.rst ├── iohub │ ├── api_and_manual │ │ ├── datastore │ │ │ └── iodatastore_api.rst │ │ ├── device_details │ │ │ ├── computer.rst │ │ │ ├── daq.rst │ │ │ ├── daq_interface │ │ │ │ ├── LabJack_Implementation_Notes.rst │ │ │ │ └── MeasurementComputing_Implementation_Notes.rst │ │ │ ├── default_yaml_configs │ │ │ │ ├── default_display.yaml │ │ │ │ ├── default_experiment.yaml │ │ │ │ ├── default_eyegaze_eyetracker.yaml │ │ │ │ ├── default_eyelink_eyetracker.yaml │ │ │ │ ├── default_gamepad.yaml │ │ │ │ ├── default_iviewx_eyetracker.yaml │ │ │ │ ├── default_keyboard.yaml │ │ │ │ ├── default_labjack_ai.yaml │ │ │ │ ├── default_measurement_computing_ai.yaml │ │ │ │ ├── default_mouse.yaml │ │ │ │ ├── default_tobii_eyetracker.yaml │ │ │ │ └── default_xinput.yaml │ │ │ ├── display.rst │ │ │ ├── experiment.rst │ │ │ ├── eyetracker.rst │ │ │ ├── eyetracker_interface │ │ │ │ ├── LC_Technologies_Implementation_Notes.rst │ │ │ │ ├── SMI_Implementation_Notes.rst │ │ │ │ ├── SR_Research_Implementation_Notes.rst │ │ │ │ └── Tobii_Implementation_Notes.rst │ │ │ ├── keyboard.rst │ │ │ ├── mouse.rst │ │ │ └── xinput_gamepad.rst │ │ ├── devices.rst │ │ ├── iohub_process │ │ │ ├── config_files.rst │ │ │ ├── getting_connected.rst │ │ │ ├── ioHubExperimentRuntime.rst │ │ │ ├── iohub_event_model.rst │ │ │ ├── iohub_process.rst │ │ │ └── launchHubServer.rst │ │ ├── start_here.rst │ │ ├── utilities.rst │ │ └── utilities │ │ │ ├── condition_definitions.rst │ │ │ ├── coord_gen_and_transform.rst │ │ │ ├── dialogs.rst │ │ │ ├── exception.rst │ │ │ ├── iohub.util.ClearScreen.rst │ │ │ ├── iohub.util.DeviceEventTrigger.rst │ │ │ ├── iohub.util.ExperimentVariableProvider.rst │ │ │ ├── iohub.util.FileDialog.rst │ │ │ ├── iohub.util.FullScreenWindow.rst │ │ │ ├── iohub.util.ImageScreen.rst │ │ │ ├── iohub.util.InstructionScreen.rst │ │ │ ├── iohub.util.MessageDialog.rst │ │ │ ├── iohub.util.NumPyRingBuffer.rst │ │ │ ├── iohub.util.ProgressBarDialog.rst │ │ │ ├── iohub.util.ScreenState.rst │ │ │ ├── iohub.util.SinusoidalMotion.rst │ │ │ ├── iohub.util.TimeTrigger.rst │ │ │ ├── iohub.util.exception_tools.createErrorResult.rst │ │ │ ├── iohub.util.exception_tools.ioHubError.rst │ │ │ ├── iohub.util.exception_tools.print2err.rst │ │ │ ├── iohub.util.exception_tools.printExceptionDetailsToStdErr.rst │ │ │ ├── iohub.util.generatedPointGrid.rst │ │ │ ├── iohub.util.rotate2D.rst │ │ │ ├── iohub.util.win32MessagePump.rst │ │ │ ├── misc.rst │ │ │ └── visual_utils.rst │ ├── change_log.rst │ ├── credits.rst │ ├── installation.rst │ ├── iohubEventDelayTestResults_1.png │ ├── iohubEventDelayTestResults_2.png │ ├── iohubEventDelayTestResults_3.png │ ├── iohubEventDelayTestResults_4.png │ ├── license.rst │ ├── performance.rst │ ├── quickstart.rst │ ├── supported_devices.rst │ └── terminology.rst.maybenot ├── make.bat ├── searchindex.js └── template.py ├── iohub ├── LICENSE.txt ├── __init__.py ├── client.py ├── constants.py ├── datastore │ ├── __init__.py │ ├── default_datastore.yaml │ └── util.py ├── default_config.yaml ├── devices │ ├── __init__.py │ ├── daq │ │ ├── __init__.py │ │ └── hw │ │ │ ├── __init__.py │ │ │ ├── labjack │ │ │ ├── __init__.py │ │ │ ├── default_analoginput.yaml │ │ │ ├── supported_config_settings.yaml │ │ │ └── win32 │ │ │ │ ├── python26 │ │ │ │ └── pylabjack │ │ │ │ │ ├── LabJackPython.py │ │ │ │ │ ├── Modbus.py │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── skymote.py │ │ │ │ │ ├── u12.py │ │ │ │ │ ├── u3.py │ │ │ │ │ ├── u6.py │ │ │ │ │ └── ue9.py │ │ │ │ └── python27 │ │ │ │ └── pylabjack │ │ │ │ ├── LabJackPython.py │ │ │ │ ├── Modbus.py │ │ │ │ ├── __init__.py │ │ │ │ ├── skymote.py │ │ │ │ ├── u12.py │ │ │ │ ├── u3.py │ │ │ │ ├── u6.py │ │ │ │ └── ue9.py │ │ │ └── mc │ │ │ ├── __init__.py │ │ │ ├── constants.py │ │ │ ├── default_analoginput.yaml │ │ │ └── supported_config_settings.yaml │ ├── default_device.yaml │ ├── deviceConfigValidation.py │ ├── display │ │ ├── __init__.py │ │ ├── default_display.yaml │ │ ├── supported_config_settings.yaml │ │ └── unit_conversions.py │ ├── experiment │ │ ├── __init__.py │ │ ├── default_experiment.yaml │ │ └── supported_config_settings.yaml │ ├── eyetracker │ │ ├── __init__.py │ │ ├── checkConsistancy.py │ │ ├── default_eyetracker.yaml │ │ ├── eye_events.py │ │ ├── hw │ │ │ ├── __init__.py │ │ │ ├── lc_technologies │ │ │ │ ├── __init__.py │ │ │ │ └── eyegaze │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── default_eyetracker.yaml │ │ │ │ │ ├── eyetracker.py │ │ │ │ │ ├── pEyeGaze.py │ │ │ │ │ ├── pegTest.py │ │ │ │ │ └── supported_config_settings.yaml │ │ │ ├── smi │ │ │ │ ├── __init__.py │ │ │ │ └── iviewx │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── default_eyetracker.yaml │ │ │ │ │ ├── eyetracker.py │ │ │ │ │ ├── pyViewX.py │ │ │ │ │ └── supported_config_settings.yaml │ │ │ ├── sr_research │ │ │ │ ├── __init__.py │ │ │ │ └── eyelink │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── default_eyetracker.yaml │ │ │ │ │ ├── eyeLinkCoreGraphicsIOHubPsychopy.py │ │ │ │ │ ├── eyetracker.py │ │ │ │ │ ├── supported_config_settings.yaml │ │ │ │ │ ├── wav │ │ │ │ │ ├── error.wav │ │ │ │ │ ├── qbeep.wav │ │ │ │ │ └── type.wav │ │ │ │ │ └── win32 │ │ │ │ │ ├── python26 │ │ │ │ │ └── pylink │ │ │ │ │ │ ├── SDL.dll │ │ │ │ │ │ ├── SDL_mixer.dll │ │ │ │ │ │ ├── SDL_ttf.dll │ │ │ │ │ │ ├── eyelink_core.dll │ │ │ │ │ │ ├── eyelink_core_graphics.dll │ │ │ │ │ │ ├── libogg-0.dll │ │ │ │ │ │ ├── libvorbis-0.dll │ │ │ │ │ │ ├── libvorbisfile-3.dll │ │ │ │ │ │ ├── msvcr71.dll │ │ │ │ │ │ ├── pylink.pyd │ │ │ │ │ │ ├── sdl_gfx.dll │ │ │ │ │ │ └── smpeg.dll │ │ │ │ │ └── python27 │ │ │ │ │ └── pylink │ │ │ │ │ ├── SDL.dll │ │ │ │ │ ├── SDL_mixer.dll │ │ │ │ │ ├── SDL_ttf.dll │ │ │ │ │ ├── eyelink_core.dll │ │ │ │ │ ├── eyelink_core_graphics.dll │ │ │ │ │ ├── libogg-0.dll │ │ │ │ │ ├── libvorbis-0.dll │ │ │ │ │ ├── libvorbisfile-3.dll │ │ │ │ │ ├── msvcr71.dll │ │ │ │ │ ├── pylink.pyd │ │ │ │ │ ├── sdl_gfx.dll │ │ │ │ │ └── smpeg.dll │ │ │ └── tobii │ │ │ │ ├── __init__.py │ │ │ │ ├── default_eyetracker.yaml │ │ │ │ ├── eyetracker.py │ │ │ │ ├── supported_config_settings.yaml │ │ │ │ ├── tobiiCalibrationGraphics.py │ │ │ │ └── tobiiclasses.py │ │ └── supported_config_settings.yaml │ ├── keyboard │ │ ├── __init__.py │ │ ├── darwin.py │ │ ├── default_keyboard.yaml │ │ ├── iohub2xk_names.py │ │ ├── keysym2ucs.py │ │ ├── linux2.py │ │ ├── supported_config_settings.yaml │ │ ├── win32.py │ │ └── win32_vk.py │ ├── mouse │ │ ├── __init__.py │ │ ├── darwin.py │ │ ├── default_mouse.yaml │ │ ├── linux2.py │ │ ├── supported_config_settings.yaml │ │ └── win32.py │ ├── pyXHook.py │ ├── supported_config_settings.yaml │ └── xinput │ │ ├── __init__.py │ │ ├── default_gamepad.yaml │ │ ├── supported_config_settings.yaml │ │ ├── xinput.py │ │ └── xinput_h.py ├── net.py ├── ordereddict.py ├── ordereddict_LICENSE.txt ├── server.py ├── timebase.py └── util │ ├── __init__.py │ ├── dialogs.py │ ├── exception_tools.py │ ├── fix_encoding.py │ ├── images.py │ ├── variableProvider.py │ └── visualUtil.py └── setup.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled python modules. 2 | *.pyc 3 | 4 | # Setuptools distribution folder. 5 | /dist/ 6 | 7 | # Python egg metadata, regenerated from source files by setuptools. 8 | /*.egg-info 9 | 10 | # Others 11 | [Bb]in 12 | [Oo]bj 13 | sql 14 | TestResults 15 | *.Cache 16 | ClientBin 17 | stylecop.* 18 | ~$* 19 | *.dbmdl 20 | 21 | 22 | ############ 23 | ## Windows 24 | ############ 25 | 26 | # Windows image file caches 27 | Thumbs.db 28 | 29 | # Folder config file 30 | Desktop.ini 31 | 32 | 33 | ############# 34 | ## Python 35 | ############# 36 | 37 | *.py[co] 38 | 39 | # Packages 40 | *.egg 41 | *.egg-info 42 | dist 43 | build 44 | eggs 45 | parts 46 | bin 47 | var 48 | sdist 49 | develop-eggs 50 | .installed.cfg 51 | *__pycache__* 52 | 53 | # Installer logs 54 | pip-log.txt 55 | 56 | # Unit test / coverage reports 57 | .coverage 58 | .tox 59 | 60 | # Mac crap 61 | .DS_Store 62 | 63 | # Others 64 | .*spyder* 65 | *.spyderproject 66 | .iohpid 67 | *.paths 68 | *.hdf5 69 | *.ba[ck] 70 | non-GPL3-libs/ 71 | */dev_resources_temp/ 72 | docs/*.txt 73 | docs/_build 74 | docs/make_*.bat 75 | *.log 76 | *.orig 77 | .hg* 78 | .coverage 79 | .idea 80 | dist 81 | build 82 | old 83 | nonSVN 84 | nonSphinx 85 | appData.cfg 86 | *.edf 87 | *.zip 88 | *.bat -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst 2 | recursive-include iohub *.yaml 3 | include iohub/LICENSE.txt 4 | recursive-include iohub *LICENSE.* 5 | global-exclude *.hdf5 *.bak *.bak *.old *.exp *.iopid -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ioHub 2 | 3 | ioHub is not a complete experiment design and runtime API. It's main focus is on device event monitoring, 4 | real-time reporting, and persistant storage of input device events on a system wide basis. When ioHub is used 5 | for experiment device monitoring during a psychopolgy or neuroscience type study, ioHub is designed to be used 6 | with the most excellent [PsychoPy](http://www.psychopy.org). 7 | 8 | >> Note: **ioHub has merged with PsychoPy ( psychopy.iohub )**, so it can be used 9 | >> out of the box with a PsychoPy installation, even if the desire is to use the ioHub event reporting 10 | >> features in a 'headless' mode that does not create any windows or graphics. 11 | >> 12 | >> Please visit the [PsychoPy website](http://www.psychopy.org) for download and support options. 13 | >> 14 | >> This GitHub project will remain active so existing bugs and feature requests can continue to be tracked, 15 | >> and as a source for the latest non-psychopy integrated version of the code. This code base will not longer be 16 | >> updated. Future ioHub updates will be done within the PsychoPy GitHub project, in the psychopy.iohub submodule. 17 | 18 | ## Documentation 19 | 20 | The documentation for ioHub functionality can be found [online here](http://www.isolver-solutions.com/iohubdocs/index.html), until it has been merged with the PsychoPy documentation. 21 | 22 | ## License 23 | 24 | ioHub and the Python Common Eye Tracker Interface are Copyright (C) 2012-2013 iSolver Software Solutions, except for files or modules where otherwise noted. 25 | 26 | ioHub is distributed under the terms of the GNU General Public License (GPL version 3 or any later version). See the LICENSE file for details. 27 | 28 | Python module dependancies and other 3rd party libraries are copyright their respective copyright holders. Any trademarked names used are owned by their trademark owners and use of any such names is not an endorsement of ioHub by the trademark owner. 29 | -------------------------------------------------------------------------------- /demos/EXTENDED/eye_tracker/experiment_config.yaml: -------------------------------------------------------------------------------- 1 | # experiment_config.yaml: settings related to the experiment being run when the run.py script is launched, 2 | # any custom session variables you want displayed in a dialog for input at the start of the experiment 3 | 4 | title: smiTrackerTest 5 | code: smi_t1 6 | version: '1.0' 7 | description: User looks at an image and program counts fixations and dwell times. 8 | session_defaults: 9 | name: Session Name 10 | code: E1S01 11 | comments: None 12 | user_variables: 13 | participant_age: Unknown 14 | participant_gender: [ Select, Male, Female ] 15 | glasses: [Select, Yes, No ] 16 | contacts: [Select, Yes, No ] 17 | eye_color: Unknown 18 | session_variable_order: [ name, code, comments, participant_age, participant_gender, glasses, contacts, eye_color ] 19 | event_buffer_length: 2048 20 | process_affinity: [] 21 | remaining_processes_affinity: [] 22 | ioHub: 23 | enable: True 24 | process_affinity: [] 25 | config: ioHub_config.yaml 26 | 27 | 28 | -------------------------------------------------------------------------------- /demos/EXTENDED/eye_tracker/eyetracker_configs/eyegaze_config.yaml: -------------------------------------------------------------------------------- 1 | monitor_devices: 2 | - eyetracker.hw.lc_technologies.eyegaze.EyeTracker: 3 | # Indicates if the device should actually be loaded at experiment runtime. 4 | enable: True 5 | # The variable name of the device that will be used to access the ioHub Device class 6 | # during experiment run-time, via the devices.[name] attribute of the ioHub 7 | # connection or experiment runtime class. 8 | name: tracker 9 | # Should eye tracker events be saved to the ioHub DataStore file when the device 10 | # is recording data ? 11 | save_events: True 12 | # Should eye tracker events be sent to the Experiment process when the device 13 | # is recording data ? 14 | stream_events: True 15 | # The EyeGaze EyeTracker class uses the polling method to 16 | # check for new events received from the EyeTracker device. device_timer.interval 17 | # specifies the sec.msec time between device polls. 0.004 = 4 msec, so the device will 18 | # be polled at a maxximum rate of 250 Hz. This polling rate is a 'target' value, 19 | # and may not always be achieved depending on your computer specifications and the 20 | # number and type of other devices being used. This can be checked by reviewing the 21 | # confidence_interval column of any of the eye event tables saved to the DataStore 22 | device_timer: 23 | interval: 0.002 24 | # How many eye events (including samples) should be saved in the ioHub event buffer before 25 | # old eye events start being replaced my new events when the event buffer reaches 26 | # the maximum event length of the buffer defined here. 27 | event_buffer_length: 512 28 | # Tell Eyegaze whether to display the full 640x480 camera image in a separate window. 29 | display_camera_image: True 30 | # Tell Eyegaze where to display the camera image window on the scrren. 31 | # Options are UPPER_RIGHT or UPPER_LEFT 32 | camera_image_screen_position: UPPER_RIGHT 33 | # connection_type: Possible values for the EyeGaze are one of three config lists: 34 | # [LOCAL, SOCKET, SERIAL] 35 | # If type != LOCAL, a 'parameter' setting must also be provided. 36 | host_connection: 37 | type: LOCAL 38 | # The EyeGaze implementation of the common eye tracker interface supports the 39 | # following event types. If you would like to exclude certain events from being 40 | # saved or streamed during runtime, remove them from the list below. 41 | monitor_event_types: [ MonocularEyeSampleEvent, BinocularEyeSampleEvent] 42 | 43 | -------------------------------------------------------------------------------- /demos/EXTENDED/eye_tracker/eyetracker_configs/tobii_config.yaml: -------------------------------------------------------------------------------- 1 | monitor_devices: 2 | - eyetracker.hw.tobii.EyeTracker: 3 | # Indicates if the device should actually be loaded at experiment runtime. 4 | enable: True 5 | 6 | # The variable name of the device that will be used to access the ioHub Device class 7 | # during experiment run-time, via the devices.[name] attribute of the ioHub 8 | # connection or experiment runtime class. 9 | name: tracker 10 | 11 | # The model name of the Tobii device that you wish to connect to can be specified here, 12 | # and only Tobii systems matching that model name will be considered as possible candidates for connection. 13 | # If you only have one Tobii system connected to the computer, this field can just be left empty. 14 | model_name: 15 | 16 | # The serial number of the Tobii device that you wish to connect to can be specified here, 17 | # and only the Tobii system matching that serial number will be connected to, if found. 18 | # If you only have one Tobii system connected to the computer, this field can just be left empty, 19 | # in which case the first Tobii device found will be connected to. 20 | serial_number: 21 | 22 | calibration: 23 | # The Tobii ioHub Common Eye Tracker Interface currently support 24 | # a 3, 5 and 9 point calibration mode. 25 | # THREE_POINTS,FIVE_POINTS,NINE_POINTS 26 | type: FIVE_POINTS 27 | 28 | # Should the target positions be randomized? 29 | randomize: True 30 | 31 | # auto_pace can be True or False. If True, the eye tracker will 32 | # automatically progress from one calibration point to the next. 33 | # If False, a manual key or button press is needed to progress to 34 | # the next point. 35 | auto_pace: False 36 | 37 | # pacing_speed is the number of sec.msec that a calibration point should 38 | # be displayed before moving onto the next point when auto_pace is set to true. 39 | # If auto_pace is False, pacing_speed is ignored. 40 | pacing_speed: 1.5 41 | 42 | # screen_background_color specifies the r,g,b background color to 43 | # set the calibration, validation, etc, screens to. Each element of the color 44 | # should be a value between 0 and 255. 0 == black, 255 == white. 45 | screen_background_color: [128,128,128] 46 | 47 | # Target type defines what form of calibration graphic should be used 48 | # during calibration, validation, etc. modes. 49 | # Currently the Tobii implementation supports the following 50 | # target type: CIRCLE_TARGET. 51 | # To do: Add support for other types, etc. 52 | target_type: CIRCLE_TARGET 53 | 54 | # The associated target attribute properties can be supplied 55 | # for the given target_type. 56 | target_attributes: 57 | # the outer diameter of the circle 58 | outer_diameter: 35 59 | 60 | # the inner diameter of the circle 61 | inner_diameter: 5 62 | 63 | # The color to use for the outer target 'ring'. 64 | outer_color: [255,255,255] 65 | 66 | # The color to use for the center of the target. 67 | inner_color: [0,0,0] 68 | 69 | runtime_settings: 70 | # The supported sampling rates for Tobii are model dependent. 71 | # Using a defualt of 60 Hz, with the assumption it is the most common. 72 | sampling_rate: 60 73 | -------------------------------------------------------------------------------- /demos/EXTENDED/eye_tracker/images/desert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/demos/EXTENDED/eye_tracker/images/desert.png -------------------------------------------------------------------------------- /demos/EXTENDED/eye_tracker/images/jellyfish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/demos/EXTENDED/eye_tracker/images/jellyfish.png -------------------------------------------------------------------------------- /demos/EXTENDED/eye_tracker/images/lighthouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/demos/EXTENDED/eye_tracker/images/lighthouse.png -------------------------------------------------------------------------------- /demos/EXTENDED/eye_tracker/images/party.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/demos/EXTENDED/eye_tracker/images/party.png -------------------------------------------------------------------------------- /demos/EXTENDED/eye_tracker/images/swimming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/demos/EXTENDED/eye_tracker/images/swimming.png -------------------------------------------------------------------------------- /demos/EXTENDED/eye_tracker/iohub_config.yaml: -------------------------------------------------------------------------------- 1 | data_store: {enable: true} 2 | monitor_devices: 3 | - Display: 4 | default_eye_distance: {surface_center: 500, unit_type: mm} 5 | device_number: 1 6 | name: display 7 | physical_dimensions: {height: 340, unit_type: mm, width: 590} 8 | psychopy_monitor_name: default 9 | reporting_unit_type: pix 10 | - Keyboard: {name: kb} 11 | - Mouse: {name: mouse} 12 | - Experiment: {name: experimentRuntime} 13 | - eyetracker.hw.tobii.EyeTracker: 14 | calibration: 15 | auto_pace: false 16 | pacing_speed: 1.5 17 | randomize: true 18 | screen_background_color: [128, 128, 128] 19 | target_attributes: 20 | inner_color: [0, 0, 0] 21 | inner_diameter: 5 22 | outer_color: [255, 255, 255] 23 | outer_diameter: 35 24 | target_type: CIRCLE_TARGET 25 | type: FIVE_POINTS 26 | enable: true 27 | model_name: null 28 | name: tracker 29 | runtime_settings: {sampling_rate: 60} 30 | serial_number: null 31 | -------------------------------------------------------------------------------- /demos/EXTENDED/eye_tracker/iohub_config.yaml.part: -------------------------------------------------------------------------------- 1 | monitor_devices: 2 | - Display: 3 | name: display 4 | reporting_unit_type: pix 5 | device_number: 1 6 | physical_dimensions: 7 | width: 590 8 | height: 340 9 | unit_type: mm 10 | default_eye_distance: 11 | surface_center: 500 12 | unit_type: mm 13 | psychopy_monitor_name: default 14 | - Keyboard: 15 | name: kb 16 | - Mouse: 17 | name: mouse 18 | - Experiment: 19 | name: experimentRuntime 20 | data_store: 21 | enable: True -------------------------------------------------------------------------------- /demos/EXTENDED/keyboard_rt/run.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | keyboard_rt.run.py 4 | 5 | Keyboard Reaction Time Calulation shown within a line length matching task. 6 | 7 | Inital Version: May 6th, 2013, Sol Simpson 8 | """ 9 | from psychopy import visual, core 10 | from iohub import launchHubServer,EventConstants 11 | from math import fabs 12 | 13 | io=launchHubServer(psychopy_monitor_name='default') 14 | #window=FullScreenWindow(io.devices.display) 15 | display = io.devices.display 16 | window=visual.Window(display.getPixelResolution(), monitor=display.getPsychopyMonitorName(), 17 | units=display.getCoordinateType(), 18 | color=[128,128,128], colorSpace='rgb255', 19 | fullscr=True, allowGUI=False, 20 | screen=display.getIndex() 21 | ) 22 | 23 | # save some 'dots' during the trial loop 24 | keyboard = io.devices.keyboard 25 | 26 | # constants for use in example 27 | line_size_match_delay=5+int(core.getTime()*1000)%5 28 | full_length=window.size[0]/2 29 | latest_length=0 30 | # Store the RT calculation here 31 | spacebar_rt=0.0 32 | 33 | static_bar = visual.ShapeStim(win=window, lineColor='Firebrick', fillColor='Firebrick', vertices= [[0,0],[full_length,0],[full_length,5],[0,5]], pos=(-window.size[0]/4, window.size[1]/24)) 34 | expanding_line = visual.ShapeStim(win=window, lineColor='Firebrick', fillColor='Firebrick', vertices= [[0,0],[0,0],[1,0],[0,0]], pos=(-window.size[0]/4, -window.size[1]/24)) 35 | text = visual.TextStim(window, text='Press Spacebar When Line Lengths Match', pos = [0,0], height=24, 36 | color=[-1,-1,-1], colorSpace='rgb',alignHoriz='center', alignVert='center',wrapWidth=window.size[0]*.8) 37 | stim=[static_bar,expanding_line,text] 38 | 39 | # Draw and Display first frame of screen 40 | [s.draw() for s in stim] 41 | flip_time=window.flip() 42 | 43 | # Clear all events from all ioHub event buffers. 44 | io.clearEvents('all') 45 | 46 | # Run until space bar is pressed 47 | while spacebar_rt == 0.0: 48 | #check for RT 49 | for kb_event in keyboard.getEvents(): 50 | if kb_event.key == ' ': 51 | spacebar_rt=kb_event.time-flip_time 52 | break 53 | # Update visual stim as needed 54 | time_passed=core.getTime()-flip_time 55 | latest_length = time_passed/line_size_match_delay*full_length 56 | expanding_line.setPos((-latest_length/2, -window.size[1]/24)) 57 | expanding_line.setVertices([[0,0],[latest_length,0],[latest_length,5],[0,5]]) 58 | 59 | if latest_length >= window.size[0]: 60 | # user must have fallen asleep. 61 | break 62 | 63 | [s.draw() for s in stim] 64 | # Clear all events from the ioHub Global event buffer only. 65 | io.clearEvents() 66 | window.flip() 67 | 68 | io.clearEvents('all') 69 | 70 | results="Did you Forget to Press the Spacebar?\n" 71 | if spacebar_rt > 0.0: 72 | results= "RT: %.4f sec ||| Perc. Length Diff: %.2f ||| RT Error: %.4f sec\n"%(spacebar_rt,fabs(latest_length-full_length)/full_length*100.0,spacebar_rt-line_size_match_delay) 73 | 74 | exitStr="Press Any Key To Exit" 75 | results=results+exitStr.center(len(results)) 76 | text.setText(results) 77 | [s.draw() for s in stim] 78 | window.flip() 79 | 80 | # Exit after next KEYBOARD_PRESS is received. 81 | # * If we exited on the next keyboard event of any type, we would likely 82 | # exit when the user 'released' the space button after pressing it above. 83 | while not keyboard.getEvents(event_type_id=EventConstants.KEYBOARD_PRESS): 84 | io.wait(0.05) 85 | io.clearEvents() 86 | 87 | # Quit the ioHub Process 88 | io.quit() 89 | core.quit() -------------------------------------------------------------------------------- /docs/_static/fav_io_32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/docs/_static/fav_io_32.ico -------------------------------------------------------------------------------- /docs/_static/favio16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/docs/_static/favio16.ico -------------------------------------------------------------------------------- /docs/_static/iofav.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/docs/_static/iofav.ico -------------------------------------------------------------------------------- /docs/_static/logo_io.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/docs/_static/logo_io.png -------------------------------------------------------------------------------- /docs/_static/my-styles.css: -------------------------------------------------------------------------------- 1 | a{color:#005e68;text-decoration:none} 2 | a:hover,a:focus{color: #007784;text-decoration:underline} 3 | 4 | h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#350052} 5 | h1,h2,h3{line-height:40px; color:#350052;} 6 | h1{font-size:20px}h2{font-size:18px}h3{font-size:16px}h4{font-size:14px}h5{font-size:12px}h6{font-size:11px} 7 | 8 | .alert-info{color:#002b2f;background-color:#d3e9eb;border-color:#350052} 9 | 10 | .navbar{*position:relative;*z-index:2;border-bottom: 5px solid #350052; margin-bottom:20px;overflow:visible} 11 | 12 | .navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#005e68;background-image:-moz-linear-gradient(top,#005e68,#007784);background-image:-webkit-gradient(linear,0 0,0 100%,from(#007784),to(#005e68));background-image:-webkit-linear-gradient(top,#007784,#005e68);background-image:-o-linear-gradient(top,#007784,#005e68);background-image:linear-gradient(to bottom,#007784,#005e68);background-repeat:repeat-x; border:1px solid #350052;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)} 13 | 14 | .navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#fff;text-decoration:none;background-color:#005e68} 15 | 16 | .navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#fff;text-decoration:none;background-color:#005e68;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)} 17 | 18 | .navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#005e68} 19 | 20 | .navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#fff;text-decoration:none;text-shadow:0 1px 0 #005e68} 21 | 22 | .dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#005e68;background-image:-moz-linear-gradient(top,#007784,#005e68);background-image:-webkit-gradient(linear,0 0,0 100%,from(#007784),to(#005e68));background-image:-webkit-linear-gradient(top,#007784,#005e68);background-image:-o-linear-gradient(top,#007784,#005e68);background-image:linear-gradient(to bottom,#007784,#005e68);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)} 23 | 24 | .dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#005e68;white-space:nowrap} 25 | 26 | .navbar .brand{background-image: url(logo_io.png); background-repeat:no-repeat; width: 80px;display:block;float:left; padding:5px 0px 5px 0px;margin-left:10px; margin-top: 5px;font-size:0px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff} 27 | 28 | .navbar .brand:hover,.navbar .brand:focus{text-decoration:none} 29 | .navbar-text{margin-bottom:0;line-height:40px;color:#777} 30 | .navbar-link{color:#777} 31 | .navbar-link:hover,.navbar-link:focus{color:#333} 32 | 33 | .navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #005e68;border-left:1px solid #005e68} 34 | 35 | .navbar .btn-navbar{background-color:#002b2f;*background-color:#007784;background-image:-moz-linear-gradient(top,#002b2f,#007784);background-image:-webkit-gradient(linear,0 0,0 100%,from(#002b2f),to(#007784));background-image:-webkit-linear-gradient(top,#002b2f,#007784);background-image:-o-linear-gradient(top,#002b2f,#007784);background-image:linear-gradient(to bottom,#002b2f,#007784);background-repeat:repeat-x;border-color:#007784 #007784 #002b2f;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)} 36 | 37 | .navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#007784;*background-color:#002b2f} 38 | 39 | 40 | -------------------------------------------------------------------------------- /docs/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {# Import the theme's layout. #} 2 | {% extends "!layout.html" %} 3 | 4 | {# Include our new CSS file into existing ones. #} 5 | {% set css_files = css_files + ['_static/my-styles.css']%} -------------------------------------------------------------------------------- /docs/_themes/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2013 Ryan Roemer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /docs/_themes/bootstrap/globaltoc.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /docs/_themes/bootstrap/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "basic/layout.html" %} 2 | 3 | {% set script_files = script_files + [ 4 | '_static/js/jquery-1.9.1.min.js', 5 | '_static/js/jquery-fix.js', 6 | '_static/bootstrap-2.3.1/js/bootstrap.min.js', 7 | '_static/bootstrap-sphinx.js' 8 | ] 9 | %} 10 | {% set css_files = [ 11 | '_static/bootstrap-2.3.1/css/bootstrap.min.css' 12 | ] + css_files 13 | %} 14 | {% if theme_bootswatch_theme %} 15 | {% set css_files = css_files + [ 16 | 'http://netdna.bootstrapcdn.com/bootswatch/2.3.1/' + theme_bootswatch_theme + '/bootstrap.min.css' 17 | ] 18 | %} 19 | {% endif %} 20 | {% set css_files = css_files + [ 21 | '_static/bootstrap-sphinx.css', 22 | '_static/bootstrap-2.3.1/css/bootstrap-responsive.min.css' 23 | ] 24 | %} 25 | {% set css_files = css_files + [ 26 | '_static/my-styles.css' 27 | ] 28 | %} 29 | 30 | {%- block doctype -%} 31 | 32 | {%- endblock %} 33 | 34 | {# Sidebar: Rework into our Boostrap nav section. #} 35 | {% macro navBar() %} 36 | 69 | {% endmacro %} 70 | 71 | {%- block extrahead %} 72 | 73 | 74 | 75 | 76 | {% endblock %} 77 | 78 | {# Silence the sidebar's, relbar's #} 79 | {% block header %}{% endblock %} 80 | {% block sidebar1 %}{% endblock %} 81 | {% block sidebar2 %}{% endblock %} 82 | {% block relbar1 %}{% endblock %} 83 | {% block relbar2 %}{% endblock %} 84 | {% block sidebarsourcelink %}{% endblock %} 85 | 86 | {%- block content %} 87 |
88 | {{ navBar() }} 89 | {% block body %}{% endblock %} 90 |
91 | {%- endblock %} 92 | 93 | {%- block footer %} 94 | 120 | {%- endblock %} 121 | -------------------------------------------------------------------------------- /docs/_themes/bootstrap/localtoc.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /docs/_themes/bootstrap/relations.html: -------------------------------------------------------------------------------- 1 | {%- if prev %} 2 |
  • {{ "«"|safe }} {{ prev.title }}
  • 4 | {%- endif %} 5 | {%- if next %} 6 |
  • {{ next.title }} {{ "»"|safe }}
  • 8 | {%- endif %} 9 | -------------------------------------------------------------------------------- /docs/_themes/bootstrap/searchbox.html: -------------------------------------------------------------------------------- 1 | {%- if pagename != "search" %} 2 | 7 | {%- endif %} 8 | -------------------------------------------------------------------------------- /docs/_themes/bootstrap/sourcelink.html: -------------------------------------------------------------------------------- 1 | {%- if show_source and has_source and sourcename %} 2 | {{ _('Source') }} 4 | {%- endif %} 5 | -------------------------------------------------------------------------------- /docs/_themes/bootstrap/static/bootstrap-2.3.1/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/docs/_themes/bootstrap/static/bootstrap-2.3.1/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/_themes/bootstrap/static/bootstrap-2.3.1/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/docs/_themes/bootstrap/static/bootstrap-2.3.1/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/_themes/bootstrap/static/bootstrap-sphinx.css_t: -------------------------------------------------------------------------------- 1 | /* 2 | * bootstrap-sphinx.css 3 | * ~~~~~~~~~~~~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- Twitter Bootstrap theme. 6 | */ 7 | 8 | .navbar-inverse .brand { 9 | color: #FFF; 10 | } 11 | 12 | .page-top { 13 | top: 0px; 14 | } 15 | 16 | {% if theme_navbar_fixed_top == 'true' %} 17 | body { 18 | {% if theme_bootswatch_theme %} 19 | padding-top: 50px; 20 | {% else %} 21 | padding-top: 40px; 22 | {% endif %} 23 | } 24 | .page-top { 25 | {% if theme_bootswatch_theme %} 26 | top: 50px; 27 | {% else %} 28 | top: 40px; 29 | {% endif %} 30 | } 31 | 32 | .navbar-inner { 33 | padding-left: 12px !important; 34 | padding-right: 12px !important; 35 | } 36 | {% endif %} 37 | 38 | 39 | {%- block sidebarlogo %} 40 | {%- if logo %} 41 | @media (min-width: 980px) { 42 | .navbar h3 a, .navbar .brand { 43 | background: transparent url("{{ logo }}") no-repeat 22px 3px; 44 | padding-left: 62px; 45 | } 46 | } 47 | {%- endif %} 48 | {%- endblock %} 49 | 50 | table { 51 | border: 0; 52 | } 53 | 54 | .footer { 55 | width: 100%; 56 | border-top: 1px solid #ccc; 57 | padding-top: 10px; 58 | } 59 | -------------------------------------------------------------------------------- /docs/_themes/bootstrap/static/bootstrap-sphinx.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | /** 3 | * Patch TOC list. 4 | * 5 | * Will mutate the underlying span to have a correct ul for nav. 6 | * 7 | * @param $span: Span containing nested UL's to mutate. 8 | * @param minLevel: Starting level for nested lists. (1: global, 2: local). 9 | */ 10 | var patchToc = function ($ul, minLevel) { 11 | var findA, 12 | patchTables, 13 | $localLi; 14 | 15 | // Find all a "internal" tags, traversing recursively. 16 | findA = function ($elem, level) { 17 | level = level || 0; 18 | var $items = $elem.find("> li > a.internal, > ul, > li > ul"); 19 | 20 | // Iterate everything in order. 21 | $items.each(function (index, item) { 22 | var $item = $(item), 23 | tag = item.tagName.toLowerCase(), 24 | $childrenLi = $item.children('li'), 25 | $parentLi = $($item.parent('li'), $item.parent().parent('li')); 26 | 27 | // Add dropdowns if more children and above minimum level. 28 | if (tag === 'ul' && level >= minLevel && $childrenLi.length > 0) { 29 | $parentLi 30 | .addClass('dropdown-submenu') 31 | .children('a').first().attr('tabindex', -1); 32 | 33 | $item.addClass('dropdown-menu'); 34 | } 35 | 36 | findA($item, level + 1); 37 | }); 38 | }; 39 | 40 | findA($ul); 41 | }; 42 | 43 | /** 44 | * Patch all tables to remove ``docutils`` class and add Bootstrap base 45 | * ``table`` class. 46 | */ 47 | patchTables = function () { 48 | $("table.docutils") 49 | .removeClass("docutils") 50 | .addClass("table") 51 | .attr("border", 0); 52 | }; 53 | 54 | $(document).ready(function () { 55 | // Add styling, structure to TOC's. 56 | $(".dropdown-menu").each(function () { 57 | $(this).find("ul").each(function (index, item){ 58 | var $item = $(item); 59 | $item.addClass('unstyled'); 60 | }); 61 | }); 62 | 63 | // Global TOC. 64 | if ($("ul.globaltoc li").length) { 65 | patchToc($("ul.globaltoc"), 1); 66 | } else { 67 | // Remove Global TOC. 68 | $(".globaltoc-container").remove(); 69 | } 70 | 71 | // Local TOC. 72 | patchToc($("ul.localtoc"), 2); 73 | 74 | // Mutate sub-lists (for bs-2.3.0). 75 | $(".dropdown-menu ul").not(".dropdown-menu").each(function () { 76 | var $ul = $(this), 77 | $parent = $ul.parent(), 78 | tag = $parent[0].tagName.toLowerCase(), 79 | $kids = $ul.children().detach(); 80 | 81 | // Replace list with items if submenu header. 82 | if (tag === "ul") { 83 | $ul.replaceWith($kids); 84 | } else if (tag === "li") { 85 | // Insert into previous list. 86 | $parent.after($kids); 87 | $ul.remove(); 88 | } 89 | }); 90 | 91 | // Add divider in page TOC. 92 | $localLi = $("ul.localtoc li"); 93 | if ($localLi.length > 2) { 94 | $localLi.first().after('
  • '); 95 | } 96 | 97 | // Enable dropdown. 98 | $('.dropdown-toggle').dropdown(); 99 | 100 | // Patch tables. 101 | patchTables(); 102 | 103 | // Add Note, Warning styles. 104 | $('div.note').addClass('alert').addClass('alert-info'); 105 | $('div.warning').addClass('alert'); 106 | 107 | // Inline code styles to Bootstrap style. 108 | $('tt.docutils span.pre:first-child').each(function (i, e) { 109 | $(e).parent().replaceWith(function () { 110 | return $("").text($(this).text()); 111 | }); 112 | }); 113 | }); 114 | }($jqTheme || window.jQuery)); 115 | -------------------------------------------------------------------------------- /docs/_themes/bootstrap/static/js/jquery-fix.js: -------------------------------------------------------------------------------- 1 | // No Conflict in later (our) version of jQuery 2 | var $jqTheme = jQuery.noConflict(true); 3 | -------------------------------------------------------------------------------- /docs/_themes/bootstrap/theme.conf: -------------------------------------------------------------------------------- 1 | # Twitter Bootstrap Theme 2 | [theme] 3 | inherit = basic 4 | stylesheet = basic.css 5 | pygments_style = tango 6 | 7 | # Configurable options. 8 | [options] 9 | # Navigation bar title. (Default: ``project`` value) 10 | navbar_title = 11 | 12 | # Global TOC depth for "site" navbar tab. (Default: 1) 13 | # Switching to -1 shows all levels. 14 | globaltoc_depth = 1 15 | 16 | # Include hidden TOCs in Site navbar? 17 | # 18 | # Note: If this is "false", you cannot have mixed ``:hidden:`` and 19 | # non-hidden ``toctree`` directives in the same page, or else the build 20 | # will break. 21 | # 22 | # Values: "true" (default) or "false" 23 | globaltoc_includehidden = true 24 | 25 | # HTML navbar class (Default: "navbar") to attach to
    element. 26 | # For black navbar, do "navbar navbar-inverse" 27 | navbar_class = navbar 28 | 29 | # Fix navigation bar to top of page? 30 | # Values: "true" (default) or "false" 31 | navbar_fixed_top = true 32 | 33 | # Location of link to source. 34 | # Options are "nav" (default), "footer" or anything else to exclude. 35 | source_link_position = nav 36 | 37 | # Bootswatch (http://bootswatch.com/) theme. 38 | # 39 | # Options are nothing with "" (default) or the name of a valid theme such as 40 | # "amelia" or "cosmo". 41 | # 42 | # Note that this is served off CDN, so won't be available offline. 43 | bootswatch_theme = "" -------------------------------------------------------------------------------- /docs/build_all.bat: -------------------------------------------------------------------------------- 1 | call %~dp0..\..\..\env.bat 2 | cd %~dp0 3 | 4 | rm -r -f "%~dp0..\..\..\python-2.7.3\Lib\site-packages\iohub" 5 | rm -r -f "%~dp0..\..\..\python-2.7.3\Lib\site-packages\psychopy" 6 | rm -r -f "C:\Python26\Lib\site-packages\iohub" 7 | rm -r -f "C:\Python26\Lib\site-packages\psychopy" 8 | 9 | xcopy "%~dp0..\iohub" "%~dp0..\..\..\python-2.7.3\Lib\site-packages\iohub\" /E /H /J /EXCLUDE:xcopy_excludes.txt 10 | xcopy "D:\Dropbox\DEV\psychopy\psychopy" "%~dp0..\..\..\python-2.7.3\Lib\site-packages\psychopy\" /E /H /J /EXCLUDE:xcopy_excludes.txt 11 | xcopy "%~dp0..\iohub" "C:\Python26\Lib\site-packages\iohub\" /E /H /J /EXCLUDE:xcopy_excludes.txt 12 | xcopy "D:\Dropbox\DEV\psychopy\psychopy" "C:\Python26\Lib\site-packages\psychopy\" /E /H /J /EXCLUDE:xcopy_excludes.txt 13 | 14 | call make.bat html 15 | 16 | PAUSE 17 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/datastore/iodatastore_api.rst: -------------------------------------------------------------------------------- 1 | #################### 2 | The ioHub DataStore 3 | #################### 4 | 5 | The ioHub DataStore contains the fucntionality responsible for saving Device Events 6 | to the HDF5 file format used by the ioHub Process. The DataStore also includes 7 | a simple API to access the events and experiment information saved to it, but using 8 | the ExperimentDataAccessUtility class. 9 | 10 | Advantages of using the ioHub DataStore are: 11 | 12 | * Save all Device events received by the ioHub Process; regardless of whether the PsychoPy Process and your experiment script needs access to them in realtime. This saves on the number of events that need to be transfered to, and reduces filtering and processing time required by, the PsychoPy Process. 13 | * Send Experiment Message Events to the ioHub DataStore during your experiment, providing the dataStore file with necessary / important experiment events for use when performing data analysis. 14 | * The HDF5 file format and access API is well recognized for it's superior ability at providing access to very large datasets very quickly and with very good memory management. 15 | * Two open source, free to use, HDF5 file viewers are available and work with the files saved by the DataStore. 16 | * HDF5 files can be read directly within Matlab. 17 | * When using the ExperimentDataAccessUtility class, or the pytables HDF5 Python module directly, events are returned as numpy recarrays, allowing very fast, direct use of the data within packages like MatPlotLib and SciPy, or with the numpy module's processing capabilities as well. 18 | 19 | 20 | Data File Viewers 21 | ################### 22 | 23 | Both of these program's are very useful for openning the HDF5 files saved by 24 | the ioHub DataStore and viewing the data saved quickly and efficiently. 25 | Both programs are cross-platform, open source, and free to use. 26 | 27 | * `ViTables `_ : Written in Python using the PyQt GUI package. 28 | * `HDFView `_ : Written in Java, maybe a bit more up to date given it is written and maintained by the HDFGroup. 29 | 30 | Data File Access 31 | ################## 32 | 33 | ioHub DataStore data files are standard HDF5 formatted files with an experiment 34 | and session metadata, as well as device and experiment event structure specified. 35 | 36 | Therefore any HDF5 API can be used to read the files saved. 37 | For Python, these include: 38 | 39 | * `pytables `_ 40 | * `h5py `_ 41 | 42 | If you *need* to use Matlab, the files can also be read natively by using `information found here `_. 43 | 44 | You can also use the ExperimentDataAccessUtility class prodied as part of the ioHub DataStore 45 | to access the files based on experiment and session code(s), and retrieve 46 | event information based on ioHub Event Types. 47 | 48 | ioHub DataStore File Structure 49 | ################################ 50 | 51 | HDF5 Files saved by the ioHub DataStore all use a common structure for the data 52 | saved. 53 | 54 | **Structure Graph To be Added** 55 | 56 | The ExperimentDataAccessUtility Class 57 | ####################################### 58 | 59 | **Intro to be Added.** 60 | 61 | 62 | .. autoclass:: iohub.datastore.util.ExperimentDataAccessUtility 63 | 64 | 65 | Examples 66 | ######### 67 | 68 | **Intro to be added.** -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/device_details/computer.rst: -------------------------------------------------------------------------------- 1 | ############################ 2 | The ioHub Computer Device 3 | ############################ 4 | 5 | **Platforms:** Windows, OS X, Linux 6 | 7 | .. autoclass:: iohub.devices.Computer 8 | :exclude-members: processingUnitCount, system, globalClock, currentProcess, currentProcessID, inHighPriorityMode, ioHubServerProcess, ioHubServerProcessID, isIoHubProcess 9 | 10 | Computer Device Default Configuration Settings 11 | ############################################### 12 | 13 | The computer Device is enabled automatically and has no configuration settings 14 | in the iohub_config.yaml. 15 | 16 | Computer Device Events 17 | ####################### 18 | 19 | The Computer Device does not generate any ioHub Events. 20 | 21 | Notes and Considerations 22 | ########################### 23 | 24 | None at this time. 25 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/device_details/daq_interface/LabJack_Implementation_Notes.rst: -------------------------------------------------------------------------------- 1 | ################################### 2 | LabJack U6 AnalogInputDevice Class 3 | ################################### 4 | 5 | **Platforms:** Windows 6 | 7 | **Supported Models:** U6 8 | 9 | .. autoclass:: iohub.devices.daq.hw.labjack.AnalogInput 10 | :exclude-members: input_channel_count, ANALOG_RANGE, ANALOG_TO_DIGITAL_RANGE, DAQ_CHANNEL_MAPPING, DAQ_CONFIG_OPTIONS , DAQ_GAIN_OPTIONS,, ALL_EVENT_CLASSES, CLASS_ATTRIBUTE_NAMES, DEVICE_BUFFER_LENGTH_INDEX, DEVICE_CLASS_NAME_INDEX, DEVICE_MAX_ATTRIBUTE_INDEX, DEVICE_TIMEBASE_TO_SEC, DEVICE_TYPE_ID, DEVICE_TYPE_ID_INDEX, DEVICE_TYPE_STRING, DEVICE_USER_LABEL_INDEX, NUMPY_DTYPE, e, DEVICE_FIRMWARE_VERSION_INDEX, DEVICE_HARDWARE_VERSION_INDEX,DEVICE_MANUFACTURER_NAME_INDEX,DEVICE_MODEL_NAME_INDEX, DEVICE_MODEL_NUMBER_INDEX, DEVICE_NUMBER_INDEX, DEVICE_SERIAL_NUMBER_INDEX, DEVICE_SOFTWARE_VERSION_INDEX, EVENT_CLASS_NAMES 11 | :member-order: bysource 12 | 13 | Installing other Necessary LabJack Software 14 | ############################################### 15 | 16 | The ioHub AnalogInput Device - LabJack Implementation, uses the LabJack Python 17 | package, which in turns requires the LabJack Device software for the operating 18 | system being used. 19 | The LabJack Python package is bundled with the ioHub distribution, however 20 | the Operating System specific LackJack drivers still need to be installed. 21 | 22 | Please visit `LacbJack support `_ and sign into your 23 | LabJack account to download the latest drivers for your device is you do not already have them installed. 24 | 25 | Default LabJack AnalogInput Device Settings 26 | ############################################### 27 | 28 | .. literalinclude:: ../default_yaml_configs/default_labjack_ai.yaml 29 | :language: yaml 30 | 31 | General Considerations 32 | ######################## 33 | 34 | None at this time. 35 | 36 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/device_details/daq_interface/MeasurementComputing_Implementation_Notes.rst: -------------------------------------------------------------------------------- 1 | ######################################## 2 | Measurement Computing AnalogInput Class 3 | ######################################## 4 | 5 | **Platforms:** Windows 6 | 7 | **Supported Models:** 8 | 9 | * USB-1208FS 10 | * USB-1616FS 11 | 12 | .. autoclass:: iohub.devices.daq.hw.mc.AnalogInput 13 | :exclude-members: input_channel_count, options, ANALOG_RANGE, ANALOG_TO_DIGITAL_RANGE, DAQ_CHANNEL_MAPPING, DAQ_CONFIG_OPTIONS , DAQ_GAIN_OPTIONS, ALL_EVENT_CLASSES, CLASS_ATTRIBUTE_NAMES, DEVICE_BUFFER_LENGTH_INDEX, DEVICE_CLASS_NAME_INDEX, DEVICE_MAX_ATTRIBUTE_INDEX, DEVICE_TIMEBASE_TO_SEC, DEVICE_TYPE_ID, DEVICE_TYPE_ID_INDEX, DEVICE_TYPE_STRING, DEVICE_USER_LABEL_INDEX, NUMPY_DTYPE, e, DEVICE_FIRMWARE_VERSION_INDEX, DEVICE_HARDWARE_VERSION_INDEX,DEVICE_MANUFACTURER_NAME_INDEX,DEVICE_MODEL_NAME_INDEX, DEVICE_MODEL_NUMBER_INDEX, DEVICE_NUMBER_INDEX, DEVICE_SERIAL_NUMBER_INDEX, DEVICE_SOFTWARE_VERSION_INDEX, EVENT_CLASS_NAMES 14 | 15 | Installing other Necessary Measurement Computing Software 16 | ############################################################ 17 | 18 | The ioHub AnalogInput Device - Measurement Computing Implementation, 19 | requires that you installed the Measurement Computing Universal Library 20 | so that the necessary C DLL's are present for the ioHub AnalogInput Device 21 | to access. 22 | 23 | Please ensure you have installed a recent version of the 24 | Measurement Computing Universal Library and that the C DLLs for the library are 25 | in your system's path. 26 | 27 | Please also ensure that you have calibrated the device using the Measurement Computing 28 | Instacal program. The device number assigned to the device you want to use should 29 | be the number entered into the device_number parameter setting for the ioHub 30 | AnalogInput Device. 31 | 32 | Finally, the .cal file create for the device may need to be copied 33 | from the Measurement Comuping Program Files folder to the folder that contains 34 | your experiment script. 35 | 36 | Default LabJack AnalogInput Device Settings 37 | ############################################### 38 | 39 | .. literalinclude:: ../default_yaml_configs/default_measurement_computing_ai.yaml 40 | :language: yaml 41 | 42 | General Considerations 43 | ######################## 44 | 45 | None at this time. 46 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/device_details/default_yaml_configs/default_experiment.yaml: -------------------------------------------------------------------------------- 1 | # This file includes all valid Experiment Device 2 | # settings that can be specified in an iohub_config.yaml 3 | # or in a Python dictionary form and passed to the quickStartHubServer 4 | # method. Any device parameters not specified when the device class is 5 | # created by the ioHub Process will be assigned the default value 6 | # indicated here. 7 | # 8 | Experiment: 9 | # name: The unique name to assign to the evice instance created. 10 | # The device is accessed from within the PsychoPy script 11 | # using the name's value; therefore it must be a valid Python 12 | # variable name as well. 13 | # 14 | name: experiment 15 | 16 | # monitor_event_types: Specify which of the device's supported event 17 | # types you would like the ioHub to monitor for. 18 | # 19 | monitor_event_types: [MessageEvent, LogEvent] 20 | 21 | # enable: Specifies if the device should be enabled by ioHub and monitored 22 | # for events. 23 | # True = Enable the device on the ioHub Server Process 24 | # False = Disable the device on the ioHub Server Process. No events for 25 | # this device will be reported by the ioHub Server. 26 | # 27 | enable: True 28 | 29 | # saveEvents: *If* the ioHubDataStore is enabled for the experiment, then 30 | # indicate if events for this device should be saved to the 31 | # data_collection/keyboard event group in the hdf5 event file. 32 | # True = Save events for this device to the ioDataStore. 33 | # False = Do not save events for this device in the ioDataStore. 34 | # 35 | save_events: True 36 | 37 | # streamEvents: Indicate if events from this device should be made available 38 | # during experiment runtime to the PsychoPy Process. 39 | # True = Send events for this device to the PsychoPy Process in real-time. 40 | # False = Do *not* send events for this device to the PsychoPy Process in real-time. 41 | # 42 | stream_events: True 43 | 44 | # auto_report_events: Indicate if events from this device should start being 45 | # processed by the ioHub as soon as the device is loaded at the start of an experiment, 46 | # or if events should only start to be monitored on the device when a call to the 47 | # device's enableEventReporting method is made with a parameter value of True. 48 | # True = Automatically start reporting events for this device when the experiment starts. 49 | # False = Do not start reporting events for this device until enableEventReporting(True) 50 | # is set for the device during experiment runtime. 51 | # 52 | auto_report_events: True 53 | 54 | # event_buffer_length: Specify the maximum number of events (for each 55 | # event type the device produces) that can be stored by the ioHub Server 56 | # before each new event results in the oldest event of the same type being 57 | # discarded from the ioHub device event buffer. 58 | # 59 | event_buffer_length: 128 60 | 61 | # The device manufacturer's name. 62 | # It is not used by the ioHub, so is FYI only. 63 | # 64 | manufacturer_name: N/A 65 | 66 | # The device number to assign to the device. 67 | # Device_number is not used by this device type. 68 | # 69 | device_number: 0 70 | 71 | # The serial number for the specific isnstance of device used 72 | # can be specified here. It is not used by the ioHub, so is FYI only. 73 | # 74 | serial_number: N/A 75 | 76 | # manufacture_date: The date of manufactiurer of the device 77 | # can be specified here. It is not used by the ioHub, 78 | # so is FYI only. 79 | # 80 | manufacture_date: DD-MM-YYYY 81 | 82 | # The device model name can be specified here. 83 | # It is not used by the ioHub, so is FYI only. 84 | # 85 | model_name: N/A 86 | 87 | # The device model number can be specified here. 88 | # It is not used by the ioHub, so is FYI only. 89 | # 90 | model_number: N/A 91 | 92 | # The device driver and / or SDK software version number. 93 | # This field is not used by ioHub, so is FYI only. 94 | software_version: N/A 95 | 96 | # The device's hardware version can be specified here. 97 | # It is not used by the ioHub, so is FYI only. 98 | # 99 | hardware_version: N/A 100 | 101 | # If the device has firmware, its revision number 102 | # can be indicated here. It is not used by the ioHub, so is FYI only. 103 | # 104 | firmware_version: N/A 105 | 106 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/device_details/default_yaml_configs/default_keyboard.yaml: -------------------------------------------------------------------------------- 1 | # This file includes all valid Keyboard Device 2 | # settings that can be specified in an iohub_config.yaml 3 | # or in Python dictionary form and passed to the launchHubServer 4 | # method. Any device parameters not specified when the device class is 5 | # created by the ioHub Process will be assigned the default value 6 | # indicated here. 7 | # 8 | Keyboard: 9 | # name: The name you want to assign the keyboard device for the experiment 10 | # This name is what will be used to access the device within the experiment 11 | # script via the devices.[device_name] property of the ioHubConnection or 12 | # ioHubExperimentRuntime classes. 13 | # 14 | name: keyboard 15 | 16 | # enable: Specifies if the device should be enabled by ioHub and monitored 17 | # for events. 18 | # True = Enable the device on the ioHub Server Process 19 | # False = Disable the device on the ioHub Server Process. No keyboard events will 20 | # be reported by the ioHub Server. 21 | # 22 | enable: True 23 | 24 | 25 | # monitor_event_types: Specified which device event types that should be monitored 26 | # and therefore saved to the DataStore or sent to the Experiment Process. 27 | # 28 | monitor_event_types: [KeyboardPressEvent, KeyboardReleaseEvent, KeyboardCharEvent] 29 | 30 | # report_auto_repeat_press_events: Should the keyboard report key press events 31 | # that are generated by the OS when a key is held down for an extended 32 | # period of time. 33 | # 34 | report_auto_repeat_press_events: False 35 | 36 | # saveEvents: *If* the ioHubDataStore is enabled for the experiment, then 37 | # indicate if events for this device should be saved to the 38 | # data_collection/keyboard event group in the hdf5 event file. 39 | # True = Save events for this device to the ioDataStore. 40 | # False = Do not save events for this device in the ioDataStore. 41 | # 42 | save_events: True 43 | 44 | # streamEvents: Indicate if events from this device should be made available 45 | # during experiment runtime to the Experiment / PsychoPy Process. 46 | # True = Send events for this device to the Experiment Process in real-time. 47 | # False = Do *not* send events for this device to the Experiment Process in real-time. 48 | # 49 | stream_events: True 50 | 51 | # auto_report_events: Indicate if events from this device should start being 52 | # processed by the ioHub as soon as the device is loaded at the start of an experiment, 53 | # or if events should only start to be monitored on the device when a call to the 54 | # device's enableEventReporting method is made with a parameter value of True. 55 | # True = Automatically start reporting events for this device when the experiment starts. 56 | # False = Do not start reporting events for this device until enableEventReporting(True) 57 | # is set for the device during experiment runtime. 58 | # 59 | auto_report_events: True 60 | 61 | # event_buffer_length: Specify the maximum number of events (for each 62 | # event type the device produces) that can be stored by the ioHub Server 63 | # before each new event results in the oldest event of the same type being 64 | # discarded from the ioHub device event buffer. 65 | # 66 | event_buffer_length: 256 67 | 68 | # The device manufacturer's name. 69 | # It is not used by the ioHub, so is FYI only. 70 | # 71 | manufacturer_name: N/A 72 | 73 | # The device number to assign to the device. 74 | # Device_number is not used by this device type. 75 | # 76 | device_number: 0 77 | 78 | # The serial number for the specific isnstance of device used 79 | # can be specified here. It is not used by the ioHub, so is FYI only. 80 | # 81 | serial_number: N/A 82 | 83 | # manufacture_date: The date of manufactiurer of the device 84 | # can be specified here. It is not used by the ioHub, 85 | # so is FYI only. 86 | # 87 | manufacture_date: DD-MM-YYYY 88 | 89 | # The device model name can be specified here. 90 | # It is not used by the ioHub, so is FYI only. 91 | # 92 | model_name: N/A 93 | 94 | # The device model number can be specified here. 95 | # It is not used by the ioHub, so is FYI only. 96 | # 97 | model_number: N/A 98 | 99 | # The device driver and / or SDK software version number. 100 | # This field is not used by ioHub, so is FYI only. 101 | # 102 | software_version: N/A 103 | 104 | # The device's hardware version can be specified here. 105 | # It is not used by the ioHub, so is FYI only. 106 | # 107 | hardware_version: N/A 108 | 109 | # If the device has firmware, its revision number 110 | # can be indicated here. It is not used by the ioHub, so is FYI only. 111 | # 112 | firmware_version: N/A 113 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/device_details/default_yaml_configs/default_mouse.yaml: -------------------------------------------------------------------------------- 1 | # This file includes all valid Mouse Device 2 | # settings that can be specified in an iohub_config.yaml 3 | # or in Python dictionary form and passed to the launchHubServer 4 | # method. Any device parameters not specified when the device class is 5 | # created by the ioHub Process will be assigned the default value 6 | # indicated here. 7 | # 8 | Mouse: 9 | # name: The name you want to assign the Mouse device for the experiment 10 | # This name is what will be used to access the device within the experiment 11 | # script via the devices.[device_name] property of the ioHubConnection or 12 | # ioHubExperimentRuntime classes. 13 | # 14 | name: mouse 15 | 16 | # enable: Specifies if the device should be enabled by ioHub and monitored 17 | # for events. 18 | # True = Enable the device on the ioHub Server Process 19 | # False = Disable the device on the ioHub Server Process. No mouse events will 20 | # be reported by the ioHub Server. 21 | # 22 | enable: True 23 | 24 | # monitor_event_types: *If* the ioHubDataStore is enabled for the experiment, then 25 | # indicate if events for this device should be saved to the 26 | # monitor_event_types: Specified which Mouse Event types should be monitored 27 | # for and therefore saved to the DataStore or sent to the Experiment Process. 28 | # 29 | monitor_event_types: [MouseMoveEvent, MouseDragEvent, MouseScrollEvent, MouseButtonPressEvent, MouseButtonReleaseEvent, MouseMultiClickEvent] 30 | 31 | # save_events: Save Mouse events to the data_collection/Mouse event 32 | # group in the hdf5 event file. 33 | # True = Save events for this device to the ioDataStore. 34 | # False = Do not save events for this device in the ioDataStore. 35 | # 36 | save_events: True 37 | 38 | # streamEvents: Indicate if events from this device should be made available 39 | # during experiment runtime to the Experiment / PsychoPy Process. 40 | # True = Send events for this device to the Experiment Process in real-time. 41 | # False = Do *not* send events for this device to the Experiment Process in real-time. 42 | # 43 | stream_events: True 44 | 45 | # auto_report_events: Indicate if events from this device should start being 46 | # processed by the ioHub as soon as the device is loaded at the start of an experiment, 47 | # or if events should only start to be monitored on the device when a call to the 48 | # device's enableEventReporting method is made with a parameter value of True. 49 | # True = Automatically start reporting events for this device when the experiment starts. 50 | # False = Do not start reporting events for this device until enableEventReporting(True) 51 | # is set for the device during experiment runtime. 52 | # 53 | auto_report_events: True 54 | 55 | # event_buffer_length: Specify the maximum number of events (for each 56 | # event type the device produces) that can be stored by the ioHub Server 57 | # before each new event results in the oldest event of the same type being 58 | # discarded from the ioHub device event buffer. 59 | # 60 | event_buffer_length: 256 61 | 62 | # device_number: The device number to assign to the device. 63 | # Device_number is not used by this device type. 64 | # 65 | device_number: 0 66 | 67 | # serial_number: The serial number for the specific isnstance of device used 68 | # can be specified here. It is not used by the ioHub, so is FYI only. 69 | # 70 | serial_number: N/A 71 | 72 | # manufacture_date: The date of manufactiurer of the device 73 | # can be specified here. It is not used by the ioHub, 74 | # so is FYI only. 75 | # 76 | manufacture_date: DD-MM-YYYY 77 | 78 | # The device manufacturer's name. 79 | # It is not used by the ioHub, so is FYI only. 80 | # 81 | manufacturer_name: N/A 82 | 83 | # model_name: The device model name can be specified here. 84 | # It is not used by the ioHub, so is FYI only. 85 | # 86 | model_name: N/A 87 | 88 | # model_number: The device model number can be specified here. 89 | # It is not used by the ioHub, so is FYI only. 90 | # 91 | model_number: N/A 92 | 93 | # software_version: The device driver and / or SDK software version number. 94 | # This field is not used by ioHub, so is FYI only. 95 | # 96 | software_version: N/A 97 | 98 | # hardware_version: The device's hardware version can be specified here. 99 | # It is not used by the ioHub, so is FYI only. 100 | # 101 | hardware_version: N/A 102 | 103 | # firmware_version: If the device has firmware, its revision number 104 | # can be indicated here. It is not used by the ioHub, so is FYI only. 105 | # 106 | firmware_version: N/A -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/device_details/display.rst: -------------------------------------------------------------------------------- 1 | ############################## 2 | The ioHub Display Device 3 | ############################## 4 | 5 | **Platforms:** Windows, OS X, Linux 6 | 7 | .. autoclass:: iohub.devices.display.Display 8 | :exclude-members: clearEvents, enableEventReporting, ALL_EVENT_CLASSES, CLASS_ATTRIBUTE_NAMES, DEVICE_BUFFER_LENGTH_INDEX, DEVICE_CLASS_NAME_INDEX, DEVICE_MAX_ATTRIBUTE_INDEX, DEVICE_TIMEBASE_TO_SEC, DEVICE_TYPE_ID, DEVICE_TYPE_ID_INDEX, DEVICE_TYPE_STRING, DEVICE_USER_LABEL_INDEX, NUMPY_DTYPE, e, DEVICE_FIRMWARE_VERSION_INDEX, DEVICE_HARDWARE_VERSION_INDEX,DEVICE_MANUFACTURER_NAME_INDEX,DEVICE_MODEL_NAME_INDEX, DEVICE_MODEL_NUMBER_INDEX, DEVICE_NUMBER_INDEX, DEVICE_SERIAL_NUMBER_INDEX, DEVICE_SOFTWARE_VERSION_INDEX, EVENT_CLASS_NAMES, event_buffer_length, getEvents, isReportingEvents, monitor_event_types 9 | :member-order: bysource 10 | 11 | Default Display Device Configuration Settings 12 | ############################################### 13 | 14 | .. literalinclude:: default_yaml_configs/default_display.yaml 15 | :language: yaml 16 | 17 | Display Device Events 18 | ####################### 19 | 20 | The Display Device does not generate any ioHub Events. 21 | 22 | Notes and Considerations 23 | ########################### 24 | 25 | None at this time. 26 | 27 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/device_details/experiment.rst: -------------------------------------------------------------------------------- 1 | ############################################ 2 | The ioHub Experiment Device 3 | ############################################ 4 | 5 | **Platforms:** Windows, OS X, Linux 6 | 7 | .. autoclass:: iohub.devices.experiment.Experiment 8 | :exclude-members: ALL_EVENT_CLASSES, CLASS_ATTRIBUTE_NAMES, DEVICE_BUFFER_LENGTH_INDEX, DEVICE_CLASS_NAME_INDEX, DEVICE_MAX_ATTRIBUTE_INDEX, DEVICE_TIMEBASE_TO_SEC, DEVICE_TYPE_ID, DEVICE_TYPE_ID_INDEX, DEVICE_TYPE_STRING, DEVICE_USER_LABEL_INDEX, NUMPY_DTYPE, e, DEVICE_FIRMWARE_VERSION_INDEX, DEVICE_HARDWARE_VERSION_INDEX,DEVICE_MANUFACTURER_NAME_INDEX,DEVICE_MODEL_NAME_INDEX, DEVICE_MODEL_NUMBER_INDEX, DEVICE_NUMBER_INDEX, DEVICE_SERIAL_NUMBER_INDEX, DEVICE_SOFTWARE_VERSION_INDEX, EVENT_CLASS_NAMES 9 | :member-order: bysource 10 | 11 | Experiment Device Default Settings 12 | ################################### 13 | 14 | .. literalinclude:: default_yaml_configs/default_experiment.yaml 15 | :language: yaml 16 | 17 | Experiment Event Types 18 | ####################### 19 | 20 | .. autoclass:: iohub.devices.experiment.MessageEvent 21 | :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass 22 | :member-order: bysource 23 | 24 | .. autoclass:: iohub.devices.experiment.LogEvent 25 | :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass 26 | :member-order: bysource 27 | 28 | Notes and Considerations 29 | ########################### 30 | 31 | None at this time. -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/device_details/keyboard.rst: -------------------------------------------------------------------------------- 1 | ########################### 2 | The ioHub Keyboard Device 3 | ########################### 4 | 5 | **Platforms:** Windows, OS X, Linux 6 | 7 | .. autoclass:: iohub.devices.keyboard.Keyboard 8 | :exclude-members: ALL_EVENT_CLASSES, CLASS_ATTRIBUTE_NAMES, DEVICE_BUFFER_LENGTH_INDEX, DEVICE_CLASS_NAME_INDEX, DEVICE_MAX_ATTRIBUTE_INDEX, DEVICE_TIMEBASE_TO_SEC, DEVICE_TYPE_ID, DEVICE_TYPE_ID_INDEX, DEVICE_TYPE_STRING, DEVICE_USER_LABEL_INDEX, NUMPY_DTYPE, e, DEVICE_FIRMWARE_VERSION_INDEX, DEVICE_HARDWARE_VERSION_INDEX,DEVICE_MANUFACTURER_NAME_INDEX,DEVICE_MODEL_NAME_INDEX, DEVICE_MODEL_NUMBER_INDEX, DEVICE_NUMBER_INDEX, DEVICE_SERIAL_NUMBER_INDEX, DEVICE_SOFTWARE_VERSION_INDEX, EVENT_CLASS_NAMES, WH_KEYBOARD, WH_KEYBOARD_LL, WH_MAX, WIN32_KEYBOARD_PRESS_EVENT_TYPES, WM_CHAR, WM_DEADCHAR, WM_KEYDOWN, WM_KEYFIRST, WM_KEYLAST, WM_KEYUP, WM_SYSCHAR, WM_SYSDEADCHAR, WM_SYSKEYDOWN, WM_SYSKEYUP 9 | :member-order: bysource 10 | 11 | Keyboard Device Configuration Settings 12 | ######################################## 13 | 14 | 15 | .. literalinclude:: default_yaml_configs/default_keyboard.yaml 16 | :language: yaml 17 | 18 | 19 | Keyboard Event Types 20 | ##################### 21 | 22 | .. autoclass:: iohub.devices.keyboard.KeyboardInputEvent 23 | :members: 24 | :inherited-members: 25 | :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass 26 | :member-order: bysource 27 | 28 | .. autoclass:: iohub.devices.keyboard.KeyboardPressEvent 29 | :members: 30 | :inherited-members: 31 | :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass 32 | :member-order: bysource 33 | 34 | .. autoclass:: iohub.devices.keyboard.KeyboardReleaseEvent 35 | :members: 36 | :inherited-members: 37 | :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass 38 | :member-order: bysource 39 | 40 | .. autoclass:: iohub.devices.keyboard.KeyboardCharEvent 41 | :members: 42 | :inherited-members: 43 | :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass 44 | :member-order: bysource 45 | 46 | Notes and Considerations 47 | ########################### 48 | 49 | None at this time. -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/device_details/xinput_gamepad.rst: -------------------------------------------------------------------------------- 1 | ########################### 2 | The XInput Gamepad Device 3 | ########################### 4 | 5 | **Platforms:** Windows 6 | 7 | .. autoclass:: iohub.devices.xinput.Gamepad 8 | :exclude-members: DEVICE_LABEL , ALL_EVENT_CLASSES, CLASS_ATTRIBUTE_NAMES, DEVICE_BUFFER_LENGTH_INDEX, DEVICE_CLASS_NAME_INDEX, DEVICE_MAX_ATTRIBUTE_INDEX, DEVICE_TIMEBASE_TO_SEC, DEVICE_TYPE_ID, DEVICE_TYPE_ID_INDEX, DEVICE_TYPE_STRING, DEVICE_USER_LABEL_INDEX, NUMPY_DTYPE, e, DEVICE_FIRMWARE_VERSION_INDEX, DEVICE_HARDWARE_VERSION_INDEX,DEVICE_MANUFACTURER_NAME_INDEX,DEVICE_MODEL_NAME_INDEX, DEVICE_MODEL_NUMBER_INDEX, DEVICE_NUMBER_INDEX, DEVICE_SERIAL_NUMBER_INDEX, DEVICE_SOFTWARE_VERSION_INDEX, EVENT_CLASS_NAMES 9 | :member-order: bysource 10 | 11 | GamePad Device Configuration Settings 12 | ######################################## 13 | 14 | .. literalinclude:: default_yaml_configs/default_xinput.yaml 15 | :language: yaml 16 | 17 | GamePad Event Types 18 | ######################## 19 | 20 | .. autoclass:: iohub.devices.xinput.GamepadStateChangeEvent 21 | :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass 22 | :member-order: bysource 23 | 24 | Notes and Considerations 25 | ########################### 26 | 27 | ..note:: If gamepad thumbstick position data is going to be used to control 28 | the position of a stim object on the PsychoPy Window, the following equation 29 | can be used to convert the normalized thumbstick data to Display coordinates:: 30 | 31 | 32 | def normalizedValue2Coord(normalized_position,normalized_magnitude,display_coord_dim_size): 33 | x,y=normalized_position[0]*normalized_magnitude,normalized_position[1]*normalized_magnitude 34 | w,h=display_coord_dim_size 35 | return x*(w/2.0),y*(h/2.0) 36 | 37 | # example usage: 38 | 39 | display=io.devices.display 40 | gamepad=io.devices.gamepad 41 | keyboard=io.devices.keyboard 42 | 43 | # create a PsychoPy stim to move with each thumb stick 44 | # 45 | # thumb_left_stim = ....... 46 | # thumb_right_stim = ....... 47 | 48 | dl,dt,dr,db=display.getCoordBounds() 49 | coord_size=dr-dl,dt-db 50 | 51 | io.clearEvents('all') 52 | 53 | while not keyboard.getEvents(): 54 | # thumb stick state is returned as a 3 item lists (x , y , magnitude) 55 | x,y,mag=gamepad.getThumbSticks()['right_stick'] 56 | xx,yy=self.normalizedValue2Coord((x,y),mag,coord_size) 57 | thumb_right_stim.setPos((xx, yy)) 58 | 59 | # thumb stick state is returned as a 3 item lists (x , y , magnitude) 60 | x,y,mag=gamepad.getThumbSticks()['left_stick'] # sticks are 3 item lists (x,y,magnitude) 61 | xx,yy=self.normalizedValue2Coord((x,y),mag,coord_size) 62 | thumb_left_stim.setPos((xx, yy)) 63 | 64 | thumb_right_stim.draw() 65 | thumb_left_stim.draw() 66 | 67 | io.clearEvents('all') 68 | 69 | window.flip() 70 | 71 | * Ensure that XInput version 1.3 is installed on your computer. 72 | * If using a wireless gamepad, ensure the gamepad has been powered on befor stating the experiment. 73 | * For the supported Logitech gamepads, be sure that the switch on the gamepad is set to the 'X' position, indicating that the gamepad will use the XInput protocal. 74 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/devices.rst: -------------------------------------------------------------------------------- 1 | ################################### 2 | ioHub Device and Device Event API 3 | ################################### 4 | 5 | Devices and DeviceEvents refer to the classes associated with monitoring both physical and 6 | virtual devices, and bundling these data for use by the ioHub Process for storage in the 7 | ioDataStore and/or by the PsychoPy process for event handling in the experiment script. 8 | 9 | The device and device event API has been designed to try and provide a consistent 10 | interface across different device and event types, only breaking from this common 11 | framework when required. 12 | Two abstract classes (i.e. you never get a instance of one of the classes directly) 13 | construct the basis for all Device and DeviceEvent classes used within 14 | the ioHub. 15 | 16 | In general, attributes of a class are named using '_' format (e.g., eventclass.device_time), 17 | while method names of a class use camel case format (i.e. deviceclass.getEvents() ). 18 | I find these notations make it very easy to distinguish attributes from methods or functions when scanning 19 | a code completion list for a class in your IDE of choice for example. 20 | 21 | If device events are being saved to the ioDataStore, the hdf5 table for a given event class 22 | contains columns with the same names as the attributes of the event object that is 23 | stored in the table. This makes it somewhat easier to remember both event object 24 | attributes and event data storage tables formats. 25 | 26 | .. note:: A user script never creates an instance of a Device or DeviceEvent class. 27 | The ioHub Event Framework creates all Device and DeviceEvent representations for 28 | PsychoPy Process as needed. 29 | 30 | .. note:: Technically, the Device and DeviceEvent classes documented here are used by 31 | the ioHub Process only. The PsychoPy Process accesses the Device class instances 32 | via a dynamically created PsychoPy Process side class called 33 | an ioHubDeviceView. However, the ioHubDeviceView instance created on the 34 | PsychoPy Process associated with an actual ioHub Process Device instance 35 | has an identical public interface that is used by the PsychoPy script. 36 | Therefore, providing documentation for the ioHub Process Devices and DeviceEvents 37 | is also providing the API specification that can be used by the PsychoPy Process 38 | ( and it is much easier to document classes that exist for a period longer than 39 | just when the PsychoPy process runs.) :) 40 | 41 | The Root Device and DeviceEvent Classes 42 | ######################################### 43 | 44 | All device and event types supported by the ioHub are extensions of two abstract 45 | class definitions. 46 | 47 | iohub.devices.Device 48 | ========================= 49 | 50 | The parent class of all supported ioHub Device types. 51 | 52 | .. autoclass:: iohub.devices.Device 53 | :exclude-members: ALL_EVENT_CLASSES, CLASS_ATTRIBUTE_NAMES, DEVICE_BUFFER_LENGTH_INDEX, DEVICE_CLASS_NAME_INDEX, DEVICE_MAX_ATTRIBUTE_INDEX, DEVICE_TIMEBASE_TO_SEC, DEVICE_TYPE_ID, DEVICE_TYPE_ID_INDEX, DEVICE_TYPE_STRING, DEVICE_USER_LABEL_INDEX, NUMPY_DTYPE, e, DEVICE_FIRMWARE_VERSION_INDEX, DEVICE_HARDWARE_VERSION_INDEX,DEVICE_MANUFACTURER_NAME_INDEX,DEVICE_MODEL_NAME_INDEX, DEVICE_MODEL_NUMBER_INDEX, DEVICE_NUMBER_INDEX, DEVICE_SERIAL_NUMBER_INDEX, DEVICE_SOFTWARE_VERSION_INDEX, EVENT_CLASS_NAMES 54 | :member-order: bysource 55 | 56 | iohub.devices.DeviceEvent 57 | ========================== 58 | 59 | The parent class of all ioHub DeviceEvents, regardless of the device type has 60 | generated the event. 61 | 62 | .. autoclass:: iohub.devices.DeviceEvent 63 | :exclude-members: filter_id, device_id, NUMPY_DTYPE, DEVICE_ID_INDEX, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass 64 | :member-order: bysource 65 | 66 | Device Type Constants 67 | ######################### 68 | 69 | .. autoclass:: iohub.constants.DeviceConstants 70 | :member-order: bysource 71 | 72 | Device Event Type Constants 73 | ############################ 74 | 75 | .. autoclass:: iohub.constants.EventConstants 76 | :member-order: bysource 77 | 78 | Available ioHub Device and DeviceEvent Types 79 | ############################################## 80 | 81 | Details on each supported ioHub Device, and associated DeviceEvent types, can be 82 | found in the following sections. 83 | 84 | .. toctree:: 85 | :maxdepth: 3 86 | 87 | Computer 88 | Display 89 | Experiment 90 | Keyboard 91 | Mouse 92 | XInput Gamepad 93 | Eye Tracker 94 | Analog to Digitial Input 95 | 96 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/iohub_process/getting_connected.rst: -------------------------------------------------------------------------------- 1 | ################# 2 | Getting Connected 3 | ################# 4 | 5 | Running an experiment using the ioHub Event Framework utilizes two Python processes. 6 | The first is for running the traditional PsychoPy coder experiment logic called the PsychoPy 7 | Process. The second is a separate process for device monitoring, event bundling, 8 | and data storage called the ioHub Process. 9 | 10 | The PsychoPy Process is established by the Python interpreter executing 11 | the experiment script. Therefore, the first thing that needs to be done when using 12 | the ioHub Event Framework is to have the PsychoPy Process establish and connect 13 | to a new ioHub Server process. 14 | 15 | The functionality for establishing and connecting to a new ioHub Process 16 | is provided in the iohub.client.ioHubConnection class. 17 | The experiment script should **indirectly** create **one instance** of the 18 | ioHubConnection class using one of the two methods discussed in the next section. 19 | That is, an instance of ioHubConnection should never be created *directly* by the 20 | experiment script. 21 | 22 | The ioHubConnection Class 23 | ############################### 24 | 25 | 26 | There are two ways to create an instance of the ioHubConnection class 27 | to use with a PsychoPy experiment: 28 | #. Calling the iohub.client.quickStartHubServer function. 29 | #. Extending the iohub.client.ioHubExperimentRuntime class. 30 | 31 | Each approach to creating the ioHubConnection instance has strengths and weaknesses, 32 | and the most appropriate approach for a given experiment depends 33 | primarily on the ioHub Device types used in the experiment. 34 | 35 | .. autoclass:: iohub.client.ioHubConnection 36 | :member-order: bysource 37 | 38 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/iohub_process/ioHubExperimentRuntime.rst: -------------------------------------------------------------------------------- 1 | ##################################################### 2 | The ioHubExperimentRuntime Class 3 | ##################################################### 4 | 5 | .. autoclass:: iohub.client.ioHubExperimentRuntime 6 | :exclude-members: start 7 | :member-order: bysource 8 | 9 | Example Usage 10 | ############## 11 | 12 | The Quickstart section of this manual contains an example of how to use the 13 | ioHubExperimentRuntime class and create the two .yaml configuration files. 14 | 15 | The ioHub examples folder also has many demos of how to use this class, as most 16 | of the demos were written using the ioHubExperimentRuntime class. 17 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/iohub_process/iohub_process.rst: -------------------------------------------------------------------------------- 1 | The ioHub Process 2 | ################## 3 | 4 | This section of documentation will help to familarize your with the basic usage of the 5 | ioHub Event Framework. 6 | 7 | How to create an ioHub Process is reviewed, including two different approaches for 8 | doing so: 9 | 10 | * The iohub.launchHubProcess function provides a quick way to get the ioHub Process up and running for simple device configurations. 11 | * The ioHubExperimentRuntime Class includes built-in support for experiment, session, and ioHub Device level configuartion using two external property files, providing a framework where device configuration is cleanly seperated from the python code defining experiment logic. This is benifical since the ioHub Event Framework provides a common propgramming interface to devices, even when multiple manufacturer's of a device type are supported. This promotes the reuse of experiment scripts across different device makes and models, by simply changing the device configuration files. 12 | 13 | Finally, a review of the lifecycle of an ioHub event is given, and some code examples 14 | for accessing event within your experiment script are given. 15 | 16 | .. toctree:: 17 | :maxdepth: 3 18 | 19 | * Getting Connected 20 | * The launchHubProcess Function 21 | * The ioHubExperimentRuntime Class 22 | * Experiment and Device Configuration 23 | * Using ioHub Devices and Events 24 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/iohub_process/launchHubServer.rst: -------------------------------------------------------------------------------- 1 | ################################# 2 | The launchHubServer Function 3 | ################################# 4 | 5 | Using the launchHubServer function to start the ioHub Process and gain access to 6 | the ioHub Event Framework is ideal when only the following ioHub Devices are 7 | 8 | * Keyboard 9 | * Mouse 10 | * Display 11 | * Experiment 12 | 13 | For details on each of these ioHub device types, please refer to the device's documentation page. 14 | 15 | .. autofunction:: iohub.client.launchHubServer -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/start_here.rst: -------------------------------------------------------------------------------- 1 | #################################### 2 | ioHub API Manual and Specification 3 | #################################### 4 | 5 | We believe ioHub users will benefit from big picture understanding of the ioHub Event Monitoring Framework 6 | along with descriptions of implemented functions and classes. The documentation within the API Manual describes how to 7 | maximze full functionality of the ioHub Event Monitoring Framework, from an overview of 8 | ioHub at the process level, to the ioHub Event Model, to data storage and utility 9 | classes, and finally to full integration of ioHub with PsychoPy. 10 | 11 | This User Manual does not cover *back-end* related API's that 12 | are only of importance to a developer working on the ioHub 13 | source code, or creating a new Device class or Common Eye Tracker 14 | Implementation. 15 | 16 | **The ioHub Event Framework can be broken down into four areas based on the functionality provided.** 17 | 18 | .. toctree:: 19 | :maxdepth: 3 20 | 21 | * Overview of the ioHub Process 22 | * Devices and DeviceEvents 23 | * ioHub DataStore 24 | * PsychoPy Coder *Extra's* API 25 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities.rst: -------------------------------------------------------------------------------- 1 | ================================================== 2 | PsychoPy Coder *Extra's* API 3 | ================================================== 4 | 5 | The iohub.util submodule of the ioHub Framework contains various classes and functions 6 | that I have found useful when writing experiments using PsychoPy and the ioHub. 7 | This section of the API is considered *experimental* and will be adjusted and 8 | improved based on time as well as user feedback and suggestions. 9 | 10 | ..note:: This section, and subsections, of the manual and API is not fully 11 | documented at this time. This will be fixed as time permits. 12 | 13 | .. toctree:: 14 | :maxdepth: 4 15 | 16 | Coordinate Creation and Transformation Related Utilities 17 | Simple Experiment Graphics Utilities 18 | GUI Dialog Extensions 19 | Independent and Dependent Variable Management with ioDataStore Integration 20 | Exception Reporting / Hack Debugging 21 | Misculanious Utility Classes / Functions 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/condition_definitions.rst: -------------------------------------------------------------------------------- 1 | Independent and Dependent Variable Management with ioDataStore Integration 2 | =========================================================================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autosummary:: 7 | :toctree: 8 | 9 | iohub.util.ExperimentVariableProvider -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/coord_gen_and_transform.rst: -------------------------------------------------------------------------------- 1 | Coordinate Creation and Transformation Helpers 2 | ================================================ 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autosummary:: 7 | :toctree: 8 | 9 | iohub.util.generatedPointGrid 10 | iohub.util.rotate2D 11 | iohub.util.SinusoidalMotion -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/dialogs.rst: -------------------------------------------------------------------------------- 1 | Dialogs 2 | ======= 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autosummary:: 7 | :toctree: 8 | 9 | iohub.util.ProgressBarDialog 10 | iohub.util.MessageDialog 11 | iohub.util.FileDialog -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/exception.rst: -------------------------------------------------------------------------------- 1 | Exception Reporting / Hack Debugging 'Helpers' 2 | =============================================== 3 | 4 | .. currentmodule:: iohub.util.exception_tools 5 | 6 | .. autosummary:: 7 | :toctree: 8 | 9 | iohub.util.exception_tools.print2err 10 | iohub.util.exception_tools.printExceptionDetailsToStdErr 11 | iohub.util.exception_tools.ioHubError 12 | iohub.util.exception_tools.createErrorResult -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.ClearScreen.rst: -------------------------------------------------------------------------------- 1 | iohub.util.ClearScreen 2 | ====================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: ClearScreen 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~ClearScreen.__init__ 17 | ~ClearScreen.addEventTrigger 18 | ~ClearScreen.build 19 | ~ClearScreen.flip 20 | ~ClearScreen.getCurrentScreenState 21 | ~ClearScreen.getEventTriggers 22 | ~ClearScreen.getStateStartTime 23 | ~ClearScreen.sendMessage 24 | ~ClearScreen.setEventTriggers 25 | ~ClearScreen.setScreenColor 26 | ~ClearScreen.setTimeout 27 | ~ClearScreen.switchTo 28 | 29 | 30 | 31 | 32 | 33 | .. rubric:: Attributes 34 | 35 | .. autosummary:: 36 | 37 | ~ClearScreen.experimentRuntime 38 | ~ClearScreen.window 39 | 40 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.DeviceEventTrigger.rst: -------------------------------------------------------------------------------- 1 | iohub.util.DeviceEventTrigger 2 | ============================= 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: DeviceEventTrigger 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~DeviceEventTrigger.__init__ 17 | ~DeviceEventTrigger.clearEventHistory 18 | ~DeviceEventTrigger.getTriggeredStateCallback 19 | ~DeviceEventTrigger.getTriggeringEvent 20 | ~DeviceEventTrigger.resetLastTriggeredInfo 21 | ~DeviceEventTrigger.resetTrigger 22 | ~DeviceEventTrigger.triggered 23 | 24 | 25 | 26 | 27 | 28 | .. rubric:: Attributes 29 | 30 | .. autosummary:: 31 | 32 | ~DeviceEventTrigger.device 33 | ~DeviceEventTrigger.event_attribute_conditions 34 | ~DeviceEventTrigger.event_type 35 | ~DeviceEventTrigger.repeat_count 36 | ~DeviceEventTrigger.trigger_function 37 | ~DeviceEventTrigger.triggerred_count 38 | ~DeviceEventTrigger.user_kwargs 39 | 40 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.ExperimentVariableProvider.rst: -------------------------------------------------------------------------------- 1 | iohub.util.ExperimentVariableProvider 2 | ===================================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: ExperimentVariableProvider 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~ExperimentVariableProvider.__init__ 17 | ~ExperimentVariableProvider.getData 18 | ~ExperimentVariableProvider.getExperimentBlocks 19 | ~ExperimentVariableProvider.getPracticeBlocks 20 | ~ExperimentVariableProvider.recycleTrial 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.FileDialog.rst: -------------------------------------------------------------------------------- 1 | iohub.util.FileDialog 2 | ===================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: FileDialog 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~FileDialog.Destroy 17 | ~FileDialog.__init__ 18 | ~FileDialog.set_frame_display 19 | ~FileDialog.show 20 | 21 | 22 | 23 | 24 | 25 | .. rubric:: Attributes 26 | 27 | .. autosummary:: 28 | 29 | ~FileDialog.ALL_FILES 30 | ~FileDialog.CANCEL_RESULT 31 | ~FileDialog.CONFIG_FILES 32 | ~FileDialog.EXCEL_FILES 33 | ~FileDialog.IODATA_FILES 34 | ~FileDialog.OK_RESULT 35 | ~FileDialog.PYTHON_SCRIPT_FILES 36 | ~FileDialog.TEXT_FILES 37 | ~FileDialog.wxapp 38 | 39 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.FullScreenWindow.rst: -------------------------------------------------------------------------------- 1 | iohub.util.FullScreenWindow 2 | =========================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: FullScreenWindow 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~FullScreenWindow.__init__ 17 | ~FullScreenWindow.callOnFlip 18 | ~FullScreenWindow.clearBuffer 19 | ~FullScreenWindow.close 20 | ~FullScreenWindow.flip 21 | ~FullScreenWindow.fps 22 | ~FullScreenWindow.getMovieFrame 23 | ~FullScreenWindow.logOnFlip 24 | ~FullScreenWindow.multiFlip 25 | ~FullScreenWindow.onResize 26 | ~FullScreenWindow.saveFrameIntervals 27 | ~FullScreenWindow.saveMovieFrames 28 | ~FullScreenWindow.setBuffer 29 | ~FullScreenWindow.setColor 30 | ~FullScreenWindow.setGamma 31 | ~FullScreenWindow.setMouseVisible 32 | ~FullScreenWindow.setRGB 33 | ~FullScreenWindow.setRecordFrameIntervals 34 | ~FullScreenWindow.setScale 35 | ~FullScreenWindow.update 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.ImageScreen.rst: -------------------------------------------------------------------------------- 1 | iohub.util.ImageScreen 2 | ====================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: ImageScreen 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~ImageScreen.__init__ 17 | ~ImageScreen.addEventTrigger 18 | ~ImageScreen.build 19 | ~ImageScreen.flip 20 | ~ImageScreen.getCurrentScreenState 21 | ~ImageScreen.getEventTriggers 22 | ~ImageScreen.getStateStartTime 23 | ~ImageScreen.sendMessage 24 | ~ImageScreen.setEventTriggers 25 | ~ImageScreen.setImage 26 | ~ImageScreen.setImagePosition 27 | ~ImageScreen.setImageSize 28 | ~ImageScreen.setScreenColor 29 | ~ImageScreen.setTimeout 30 | ~ImageScreen.switchTo 31 | 32 | 33 | 34 | 35 | 36 | .. rubric:: Attributes 37 | 38 | .. autosummary:: 39 | 40 | ~ImageScreen.experimentRuntime 41 | ~ImageScreen.window 42 | 43 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.InstructionScreen.rst: -------------------------------------------------------------------------------- 1 | iohub.util.InstructionScreen 2 | ============================ 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: InstructionScreen 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~InstructionScreen.__init__ 17 | ~InstructionScreen.addEventTrigger 18 | ~InstructionScreen.build 19 | ~InstructionScreen.flip 20 | ~InstructionScreen.getCurrentScreenState 21 | ~InstructionScreen.getEventTriggers 22 | ~InstructionScreen.getStateStartTime 23 | ~InstructionScreen.sendMessage 24 | ~InstructionScreen.setEventTriggers 25 | ~InstructionScreen.setScreenColor 26 | ~InstructionScreen.setText 27 | ~InstructionScreen.setTextColor 28 | ~InstructionScreen.setTextPosition 29 | ~InstructionScreen.setTextSize 30 | ~InstructionScreen.setTimeout 31 | ~InstructionScreen.switchTo 32 | 33 | 34 | 35 | 36 | 37 | .. rubric:: Attributes 38 | 39 | .. autosummary:: 40 | 41 | ~InstructionScreen.experimentRuntime 42 | ~InstructionScreen.window 43 | 44 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.MessageDialog.rst: -------------------------------------------------------------------------------- 1 | iohub.util.MessageDialog 2 | ======================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: MessageDialog 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~MessageDialog.Destroy 17 | ~MessageDialog.__init__ 18 | ~MessageDialog.set_frame_display 19 | ~MessageDialog.show 20 | 21 | 22 | 23 | 24 | 25 | .. rubric:: Attributes 26 | 27 | .. autosummary:: 28 | 29 | ~MessageDialog.CANCEL_BUTTON 30 | ~MessageDialog.CANCEL_RESULT 31 | ~MessageDialog.ERROR_DIALOG 32 | ~MessageDialog.IMPORTANT_DIALOG 33 | ~MessageDialog.INFORMATION_DIALOG 34 | ~MessageDialog.NO_BUTTON 35 | ~MessageDialog.NO_RESULT 36 | ~MessageDialog.OK_BUTTON 37 | ~MessageDialog.OK_RESULT 38 | ~MessageDialog.QUESTION_DIALOG 39 | ~MessageDialog.WARNING_DIALOG 40 | ~MessageDialog.YES_BUTTON 41 | ~MessageDialog.YES_NO_BUTTONS 42 | ~MessageDialog.YES_RESULT 43 | ~MessageDialog.wxapp 44 | 45 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.NumPyRingBuffer.rst: -------------------------------------------------------------------------------- 1 | iohub.util.NumPyRingBuffer 2 | ========================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: NumPyRingBuffer 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~NumPyRingBuffer.__init__ 17 | ~NumPyRingBuffer.append 18 | ~NumPyRingBuffer.clear 19 | ~NumPyRingBuffer.getElements 20 | ~NumPyRingBuffer.isFull 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.ProgressBarDialog.rst: -------------------------------------------------------------------------------- 1 | iohub.util.ProgressBarDialog 2 | ============================ 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: ProgressBarDialog 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~ProgressBarDialog.Destroy 17 | ~ProgressBarDialog.__init__ 18 | ~ProgressBarDialog.close 19 | ~ProgressBarDialog.getCurrentStatus 20 | ~ProgressBarDialog.set_frame_display 21 | ~ProgressBarDialog.updateStatus 22 | 23 | 24 | 25 | 26 | 27 | .. rubric:: Attributes 28 | 29 | .. autosummary:: 30 | 31 | ~ProgressBarDialog.wxapp 32 | 33 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.ScreenState.rst: -------------------------------------------------------------------------------- 1 | iohub.util.ScreenState 2 | ====================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: ScreenState 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~ScreenState.__init__ 17 | ~ScreenState.addEventTrigger 18 | ~ScreenState.build 19 | ~ScreenState.flip 20 | ~ScreenState.getCurrentScreenState 21 | ~ScreenState.getEventTriggers 22 | ~ScreenState.getStateStartTime 23 | ~ScreenState.sendMessage 24 | ~ScreenState.setEventTriggers 25 | ~ScreenState.setScreenColor 26 | ~ScreenState.setTimeout 27 | ~ScreenState.switchTo 28 | 29 | 30 | 31 | 32 | 33 | .. rubric:: Attributes 34 | 35 | .. autosummary:: 36 | 37 | ~ScreenState.experimentRuntime 38 | ~ScreenState.window 39 | 40 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.SinusoidalMotion.rst: -------------------------------------------------------------------------------- 1 | iohub.util.SinusoidalMotion 2 | =========================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: SinusoidalMotion 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~SinusoidalMotion.__init__ 17 | ~SinusoidalMotion.getPos 18 | ~SinusoidalMotion.setLastFlipTime 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.TimeTrigger.rst: -------------------------------------------------------------------------------- 1 | iohub.util.TimeTrigger 2 | ====================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autoclass:: TimeTrigger 7 | 8 | 9 | .. automethod:: __init__ 10 | 11 | 12 | .. rubric:: Methods 13 | 14 | .. autosummary:: 15 | 16 | ~TimeTrigger.__init__ 17 | ~TimeTrigger.clearEventHistory 18 | ~TimeTrigger.getTriggeredStateCallback 19 | ~TimeTrigger.getTriggeringEvent 20 | ~TimeTrigger.resetLastTriggeredInfo 21 | ~TimeTrigger.resetTrigger 22 | ~TimeTrigger.triggered 23 | 24 | 25 | 26 | 27 | 28 | .. rubric:: Attributes 29 | 30 | .. autosummary:: 31 | 32 | ~TimeTrigger.delay 33 | ~TimeTrigger.repeat_count 34 | ~TimeTrigger.start_time 35 | ~TimeTrigger.trigger_function 36 | ~TimeTrigger.triggerred_count 37 | ~TimeTrigger.user_kwargs 38 | 39 | -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.exception_tools.createErrorResult.rst: -------------------------------------------------------------------------------- 1 | iohub.util.exception_tools.createErrorResult 2 | ============================================ 3 | 4 | .. currentmodule:: iohub.util.exception_tools 5 | 6 | .. autofunction:: createErrorResult -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.exception_tools.ioHubError.rst: -------------------------------------------------------------------------------- 1 | iohub.util.exception_tools.ioHubError 2 | ===================================== 3 | 4 | .. currentmodule:: iohub.util.exception_tools 5 | 6 | .. autoexception:: ioHubError -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.exception_tools.print2err.rst: -------------------------------------------------------------------------------- 1 | iohub.util.exception_tools.print2err 2 | ==================================== 3 | 4 | .. currentmodule:: iohub.util.exception_tools 5 | 6 | .. autofunction:: print2err -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.exception_tools.printExceptionDetailsToStdErr.rst: -------------------------------------------------------------------------------- 1 | iohub.util.exception_tools.printExceptionDetailsToStdErr 2 | ======================================================== 3 | 4 | .. currentmodule:: iohub.util.exception_tools 5 | 6 | .. autofunction:: printExceptionDetailsToStdErr -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.generatedPointGrid.rst: -------------------------------------------------------------------------------- 1 | iohub.util.generatedPointGrid 2 | ============================= 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autofunction:: generatedPointGrid -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.rotate2D.rst: -------------------------------------------------------------------------------- 1 | iohub.util.rotate2D 2 | =================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autofunction:: rotate2D -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/iohub.util.win32MessagePump.rst: -------------------------------------------------------------------------------- 1 | iohub.util.win32MessagePump 2 | =========================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autofunction:: win32MessagePump -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/misc.rst: -------------------------------------------------------------------------------- 1 | Misculanious 'Helper' functionality 2 | ======================================= 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autosummary:: 7 | :toctree: 8 | 9 | iohub.util.NumPyRingBuffer 10 | iohub.util.win32MessagePump -------------------------------------------------------------------------------- /docs/iohub/api_and_manual/utilities/visual_utils.rst: -------------------------------------------------------------------------------- 1 | Simple Experiment Graphics Utilities 2 | ===================================== 3 | 4 | .. currentmodule:: iohub.util 5 | 6 | .. autosummary:: 7 | :toctree: 8 | 9 | iohub.util.FullScreenWindow 10 | iohub.util.ScreenState 11 | iohub.util.ClearScreen 12 | iohub.util.InstructionScreen 13 | iohub.util.ImageScreen 14 | iohub.util.TimeTrigger 15 | iohub.util.DeviceEventTrigger -------------------------------------------------------------------------------- /docs/iohub/credits.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | Credits and Thanks 3 | ===================== 4 | 5 | Without the help and input from the following people and organizations, ioHub would not be where it is today. This page is dedicated to thanking those people for the time and effort they have spent helping make this happen. 6 | 7 | General ioHub Contributions 8 | ============================== 9 | 10 | The following people (listed alphabetically) have contributed to the overall ioHub Project. 11 | 12 | * **QIAN Chencan** - Chinese Academy of Sciences - Early testing and user feedback on ioHub, including input on timing related matters. 13 | * **Pierce Edmiston** - University of Wisconsin-Madison - Help with implementing and proofing ioHub Documentation, general functional testing and improvement / enhancement feedback, and EyeLink Common Eye Tracker Implementation testing. 14 | * **Jeremy Gray** - Michigan State University - OS X Implementation input and testing. Example script optimizations. 15 | * **Jeff Pelz** - R.I.T. - Input on functional priorities, the Common Eye Tracker Interface, and active 'real lab use' test site. 16 | * **Dong Wang** - R.I.T. - System functionality feedback, input, and testing support. 17 | 18 | I would also like to extend a special thank you to `Jonathan Pierce `_, creator of `PsychoPy `_, who has been kind enough 19 | to provide me with feedback on the ioHub specifications, but to me more importantly, invaluable input on the great world of open-source projects and his experience working within it. 20 | I really can not say enough about how much his input has meant to me and how much it has been appreciated. You are a genuine scholar and teacher Jon. Thank You. 21 | 22 | This thanks is extended to the PsychoPy developer and user group as a whole; many members of which have made important points and debate that I always find informative and useful. 23 | 24 | It is also so important to thank and recognize all the incredible open source Python packages and modules that the ioHub uses to do what it does. 25 | Without the hard work of these project teams, this project would not exist either. The list of current dependencies for ioHub can be found in the Installation Section of this manual. 26 | 27 | Common Eye Tracker Interface Contributions 28 | =========================================== 29 | 30 | The ioHub project is being developed for use by the `COGAIN Technical Committee on Eye Data Quality `_ on a volunteer basis by iSolver Solutions. 31 | I would like to acknowledge all the hard work that the volunteers of the committee membership have been contributing toward the COGAIN Technical committees' overall goals. 32 | 33 | The hope is that the package will also serve as a useful open source and free resource for the psychology and eye tracking research community in general. 34 | 35 | The following people (listed alphabetically) have contributed to the Common Eye Tracker Interface component of the ioHub. 36 | 37 | * **Josh Borah** - A.S.L. - Pseudo code implementation of physical unit to various eye angle measures. 38 | * **Thomas Jablonski** - SMI - SMI Common Eye Tracker Implementation Version 2 Input and Support. 39 | * **Markus Joos** - Interactive Minds - LC Technologies Common Eye Tracker Implementation Input and Support. 40 | * **Oskar Fajerson** - Tobii - Tobii Common Eye Tracker Implementation Input and Support. 41 | * **Kenneth Holmqvist** - Lund University - Input on functional design of the Common Eye Tracker Interface. 42 | * **Michael MacAskill** - University of Otago - Contributed a python wrapper of much of the SMI UDP interface at the very beginning of the pyEyeTracker (as it was then called) project. This contribution has not been used however due to SMI stating that the UDP interface would not be supported in the future. 43 | * **Fiona Mulvey** - Lund University - Input on functional requirements for the Common Eye Tracker Interface for the COGAIN Eye Tracker Standardization Committee. 44 | 45 | I would also like to thank **LC Technologies, SMI, and Tobii** for providing one of their systems on a *loaned basis* to me so that I could work with them and implement the Common Eye Tracker Interface for their system. Things in this area would not be where they are without this generous consideration on their part, and it has been greatly appreciated. 46 | 47 | Getting Involved 48 | ================= 49 | 50 | If you would like to get involved, please post your interest on the ioHub developer group list, or contact me (Sol) directly. 51 | -------------------------------------------------------------------------------- /docs/iohub/iohubEventDelayTestResults_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/docs/iohub/iohubEventDelayTestResults_1.png -------------------------------------------------------------------------------- /docs/iohub/iohubEventDelayTestResults_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/docs/iohub/iohubEventDelayTestResults_2.png -------------------------------------------------------------------------------- /docs/iohub/iohubEventDelayTestResults_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/docs/iohub/iohubEventDelayTestResults_3.png -------------------------------------------------------------------------------- /docs/iohub/iohubEventDelayTestResults_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/docs/iohub/iohubEventDelayTestResults_4.png -------------------------------------------------------------------------------- /docs/iohub/license.rst: -------------------------------------------------------------------------------- 1 | ############## 2 | ioHub License 3 | ############## 4 | 5 | ioHub and the Python Common Eye Tracker Interface are Copyright (C) 2012-2013 iSolver Software Solutions, except for files or modules where otherwise noted. 6 | 7 | ioHub is distributed under the terms of the GNU General Public License (GPL version 3 or any later version). See the LICENSE file included with the ioHub project for details. 8 | 9 | ioHub Python module dependencies and other 3rd party libraries are copyright their respective copyright holders. Any trademarked names used in this documentation are owned by their trademark owners and use of any such names does not imply any endorsement of ioHub by the trademark owner. 10 | 11 | -------------------------------------------------------------------------------- /docs/iohub/supported_devices.rst: -------------------------------------------------------------------------------- 1 | ################################### 2 | Operating System and Device Support 3 | ################################### 4 | 5 | 6 | Operating System Support 7 | ######################### 8 | 9 | ioHub is currently available for use on the following Operating Systems: 10 | 11 | #. Windows XP SP3, 7, and 8 12 | #. Linux 2.6 + 13 | #. OSX 10.6 or higher 14 | 15 | .. note:: Regardless of the Operating System being used, Python 2.6 or 2.7 16 | **32-bit** is required. Even if a 64 bit OS is being used, install the 32 bit 17 | version of Python and any package dependencies. 18 | 19 | Current Device Support 20 | ####################### 21 | 22 | The list of available ioHub device types is OS dependent. Unavilable devices 23 | can (and will) be ported to all OS's when time permits. One exception to this 24 | is the eye tracker (through the Common Eye Tracking Device Interface), where 25 | OS support is determined by the underlying eye tracker hardware interface. 26 | 27 | The current state (April, 2013) of device support for each OS is as follows: 28 | 29 | ===================== ============= =========== =============== 30 | Device Type Windows Linux Mac OS X 31 | ===================== ============= =========== =============== 32 | Keyboard Yes Yes Yes 33 | Mouse Yes Yes yes 34 | Eye Tracker Yes H/W Dep. H/W Dep. 35 | GamePad Yes (XInput) No No 36 | Analog Yes No No 37 | ===================== ============= =========== =============== 38 | 39 | Devices *in the works* 40 | ####################### 41 | 42 | The following devices are on the roadmap for addition to the ioHub by the 43 | end of 2013. Implementation for many devices listed below is already 44 | underway. The order of the device listing 45 | does not imply the priority of the device support implementation. 46 | 47 | ===================== ============= =========== =============== 48 | Future Device Type Windows Linux Mac OS X 49 | ===================== ============= =========== =============== 50 | Parrallel Port Yes Yes No 51 | Serial Interface Yes Yes Yes 52 | MBED Microcontroller Yes Yes Yes 53 | Teensy 3 Microcontr. Yes Yes Yes 54 | HID Joystick Support Yes Yes Yes 55 | Cedrus RB BBox's Yes Yes Yes 56 | ===================== ============= =========== =============== 57 | 58 | If there is a device you think would be useful to add support for in the ioHub, 59 | please let us know as it will help with development prioritization, 60 | and please consider helping with the implementation by contributing some time to the 61 | project. 62 | 63 | 64 | -------------------------------------------------------------------------------- /docs/iohub/terminology.rst.maybenot: -------------------------------------------------------------------------------- 1 | ############# 2 | Terminology 3 | ############# 4 | 5 | This page attempts to provide a list of terms or phrases that are commonly used throughout the documentation and a short explaination of each. 6 | 7 | .. note: Currently This page is being used to consolodate different terms that have the same meaning as well. These are listed in the **A.K.A:** section of the term. Once that process is complete, we will review the A.K.A terms used and select which one to standardize on. A terms that has a *Conflicts:** section lists other terms that may be ambigous and need to be changed to correct this. 8 | 9 | DataStore 10 | ---------- 11 | **A.K.A:** 12 | 13 | * ioDataStore 14 | * ioHub DataStore 15 | * Data Store 16 | 17 | Nam faucibus magna sit amet sapien pretium pellentesque. 18 | 19 | 20 | Device Configuration 21 | --------------------- 22 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. 23 | 24 | 25 | Experiment Configuration 26 | ------------------------- 27 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. 28 | 29 | 30 | ioHub 31 | ------ 32 | **A.K.A:** 33 | 34 | * The ioHub 35 | * ioHub Event Framework 36 | 37 | Fusce posuere risus vitae mi mattis vitae pharetra urna accumsan. 38 | 39 | 40 | ioHub Device 41 | --------------- 42 | **A.K.A:** 43 | 44 | * Device 45 | * ioDevice 46 | 47 | Vivamus volutpat augue a turpis ultricies in blandit risus vehicula. 48 | 49 | 50 | ioHub DeviceEvent 51 | ------------------ 52 | **A.K.A:** 53 | 54 | * DeviceEvent 55 | * Event 56 | * ioHub Event 57 | 58 | Fusce fermentum urna non est ultrices sollicitudin elementum odio aliquam. 59 | 60 | 61 | ioHub Process 62 | --------------- 63 | **A.K.A:** 64 | 65 | * ioHub Server Process 66 | 67 | Nam faucibus magna sit amet sapien pretium pellentesque. 68 | 69 | 70 | ioHub Server 71 | --------------- 72 | Aliquam egestas metus quis dolor tempus tristique. 73 | 74 | 75 | MessageEvent 76 | ------------- 77 | **A.K.A:** 78 | 79 | * Message 80 | * Experiment Message Event 81 | * Message Event 82 | 83 | **Conflicts:** 84 | 85 | * PychoPy - ioHub Messages 86 | 87 | Praesent tempor nibh id arcu fermentum hendrerit molestie magna lacinia. 88 | 89 | 90 | PsychoPy 91 | ------------------- 92 | **A.K.A:** 93 | 94 | * psychopy 95 | 96 | Fusce posuere risus vitae mi mattis vitae pharetra urna accumsan. 97 | 98 | 99 | PsychoPy Process 100 | ------------------- 101 | Fusce posuere risus vitae mi mattis vitae pharetra urna accumsan. 102 | 103 | 104 | PsychoPy Runtime 105 | ------------------- 106 | Aliquam egestas metus quis dolor tempus tristique. 107 | 108 | 109 | -------------------------------------------------------------------------------- /docs/template.py: -------------------------------------------------------------------------------- 1 | """This module illustrates how to write your docstring in OpenAlea 2 | and other projects related to OpenAlea.""" 3 | 4 | __license__ = "Cecill-C" 5 | __revision__ = " $Id: actor.py 1586 2009-01-30 15:56:25Z cokelaer $ " 6 | __docformat__ = 'reStructuredText' 7 | 8 | 9 | class MainClass1(object): 10 | """This class docstring shows how to use sphinx and rst syntax 11 | 12 | The first line is brief explanation, which may be completed with 13 | a longer one. For instance to discuss about its methods. The only 14 | method here is :func:`function1`'s. The main idea is to document 15 | the class and methods's arguments with 16 | 17 | - **parameters**, **types**, **return** and **return types**:: 18 | 19 | :param arg1: description 20 | :param arg2: description 21 | :type arg1: type description 22 | :type arg1: type description 23 | :return: return description 24 | :rtype: the return type description 25 | 26 | - and to provide sections such as **Example** using the double commas syntax:: 27 | 28 | :Example: 29 | 30 | followed by a blank line ! 31 | 32 | which appears as follow: 33 | 34 | :Example: 35 | 36 | followed by a blank line 37 | 38 | - Finally special sections such as **See Also**, **Warnings**, **Notes** 39 | use the sphinx syntax (*paragraph directives*):: 40 | 41 | .. seealso:: blabla 42 | .. warnings also:: blabla 43 | .. note:: blabla 44 | .. todo:: blabla 45 | 46 | .. note:: 47 | There are many other Info fields but they may be redundant: 48 | * param, parameter, arg, argument, key, keyword: Description of a 49 | parameter. 50 | * type: Type of a parameter. 51 | * raises, raise, except, exception: That (and when) a specific 52 | exception is raised. 53 | * var, ivar, cvar: Description of a variable. 54 | * returns, return: Description of the return value. 55 | * rtype: Return type. 56 | 57 | .. note:: 58 | There are many other directives such as versionadded, versionchanged, 59 | rubric, centered, ... See the sphinx documentation for more details. 60 | 61 | Here below is the results of the :func:`function1` docstring. 62 | 63 | """ 64 | 65 | def function1(self, arg1, arg2, arg3): 66 | """returns (arg1 / arg2) + arg3 67 | 68 | This is a longer explanation, which may include math with latex syntax 69 | :math:`\\alpha`. 70 | Then, you need to provide optional subsection in this order (just to be 71 | consistent and have a uniform documentation. Nothing prevent you to 72 | switch the order): 73 | 74 | - parameters using ``:param : `` 75 | - type of the parameters ``:type : `` 76 | - returns using ``:returns: `` 77 | - examples (doctest) 78 | - seealso using ``.. seealso:: text`` 79 | - notes using ``.. note:: text`` 80 | - warning using ``.. warning:: text`` 81 | - todo ``.. todo:: text`` 82 | 83 | **Advantages**: 84 | - Uses sphinx markups, which will certainly be improved in future 85 | version 86 | - Nice HTML output with the See Also, Note, Warnings directives 87 | 88 | 89 | **Drawbacks**: 90 | - Just looking at the docstring, the parameter, type and return 91 | sections do not appear nicely 92 | 93 | :param arg1: the first value 94 | :param arg2: the first value 95 | :param arg3: the first value 96 | :type arg1: int, float,... 97 | :type arg2: int, float,... 98 | :type arg3: int, float,... 99 | :returns: arg1/arg2 +arg3 100 | :rtype: int, float 101 | 102 | :Example: 103 | 104 | >>> import template 105 | >>> a = template.MainClass1() 106 | >>> a.function1(1,1,1) 107 | 2 108 | 109 | .. note:: can be useful to emphasize 110 | important feature 111 | .. seealso:: :class:`MainClass2` 112 | .. warning:: arg2 must be non-zero. 113 | .. todo:: check that arg2 is non zero. 114 | """ 115 | return arg1 / arg2 + arg3 116 | 117 | 118 | if __name__ == "__main__": 119 | import doctest 120 | 121 | doctest.testmod() 122 | -------------------------------------------------------------------------------- /iohub/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | ioHub Python Module 3 | .. file: iohub/__init__.py 4 | 5 | fileauthor: Sol Simpson 6 | 7 | Copyright (C) 2012-2013 iSolver Software Solutions 8 | Distributed under the terms of the GNU General Public License (GPL version 3 or any later version). 9 | 10 | .. moduleauthor:: Sol Simpson + contributors, please see credits section of documentation. 11 | """ 12 | from __future__ import division 13 | 14 | 15 | import inspect 16 | import sys 17 | import os 18 | from collections import namedtuple,Iterable 19 | 20 | from timebase import psychopy_available, MonotonicClock, monotonicClock 21 | from util import (fix_encoding,OrderedDict,convertCamelToSnake,win32MessagePump, 22 | print2err,printExceptionDetailsToStdErr,ioHubError,createErrorResult, 23 | DeviceEventTrigger, ClearScreen, InstructionScreen, 24 | getCurrentDateTimeString,FullScreenWindow) 25 | 26 | 27 | fix_encoding.fix_encoding() 28 | 29 | def addDirectoryToPythonPath(path_from_iohub_root,leaf_folder=''): 30 | dir_path=os.path.join(IO_HUB_DIRECTORY,path_from_iohub_root,sys.platform,"python{0}{1}".format(*sys.version_info[0:2]),leaf_folder) 31 | if os.path.isdir(dir_path) and dir_path not in sys.path: 32 | sys.path.append(dir_path) 33 | else: 34 | print2err("Could not add path: ",dir_path) 35 | dir_path=None 36 | return dir_path 37 | 38 | def module_path(local_function): 39 | """ returns the module path without the use of __file__. Requires a function defined 40 | locally in the module. from http://stackoverflow.com/questions/729583/getting-file-path-of-imported-module""" 41 | return os.path.abspath(inspect.getsourcefile(local_function)) 42 | 43 | def module_directory(local_function): 44 | mp=module_path(local_function) 45 | moduleDirectory,mname=os.path.split(mp) 46 | return moduleDirectory 47 | 48 | global IO_HUB_DIRECTORY 49 | IO_HUB_DIRECTORY=module_directory(module_path) 50 | 51 | 52 | #version info for ioHub 53 | __version__='0.7.0' 54 | __license__='GNU GPLv3 (or more recent equivalent)' 55 | __author__='iSolver Software Solutions' 56 | __author_email__='sol@isolver-software.com' 57 | __maintainer_email__='sol@isolver-software.com' 58 | __users_email__='sol@isolver-software.com' 59 | __url__='https://www.github.com/isolver/ioHub/' 60 | 61 | 62 | # check module is being loaded on a supported platform 63 | SUPPORTED_SYS_NAMES=['linux2','win32','cygwin','darwin'] 64 | if sys.platform not in SUPPORTED_SYS_NAMES: 65 | print '' 66 | print "ERROR: ioHub is not supported on the current OS platform. Supported options are: ", SUPPORTED_SYS_NAMES 67 | print "EXITING......" 68 | print '' 69 | sys.exit(1) 70 | 71 | 72 | 73 | def isIterable(o): 74 | return isinstance(o, Iterable) 75 | 76 | 77 | RectangleBorder=namedtuple('RectangleBorderClass', 'left top right bottom') 78 | 79 | from client import launchHubServer,ioHubExperimentRuntime 80 | import constants 81 | from constants import (DeviceConstants, EventConstants, KeyboardConstants, 82 | MouseConstants, EyeTrackerConstants) -------------------------------------------------------------------------------- /iohub/datastore/default_datastore.yaml: -------------------------------------------------------------------------------- 1 | data_store: 2 | enable: True 3 | filename: events 4 | storage_type: pytables 5 | multiple_experiments: False 6 | flush_interval: 32 -------------------------------------------------------------------------------- /iohub/default_config.yaml: -------------------------------------------------------------------------------- 1 | global_event_buffer: 2048 2 | udp_port: 9034 3 | data_store: 4 | enable: False 5 | filename: events 6 | multiple_experiments: False 7 | flush_interval: 32 -------------------------------------------------------------------------------- /iohub/devices/daq/hw/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/daq/hw/__init__.py -------------------------------------------------------------------------------- /iohub/devices/daq/hw/labjack/supported_config_settings.yaml: -------------------------------------------------------------------------------- 1 | daq.hw.labjack.AnalogInput: 2 | enable: IOHUB_BOOL 3 | name: 4 | IOHUB_STRING: 5 | min_length: 1 6 | max_length: 32 7 | first_char_alpha: True 8 | model_name: U6 9 | manufacturer_name: LabJack Corporation 10 | serial_number: 11 | IOHUB_STRING: 12 | min_length: 1 13 | max_length: 32 14 | channel_sampling_rate: 15 | IOHUB_INT: 16 | min: 1 17 | max: 2000 18 | resolution_index: 19 | IOHUB_INT: 20 | min: 0 21 | max: 6 22 | settling_factor: 23 | IOHUB_INT: 24 | min: 0 25 | max: 6 26 | input_channel_count: 8 27 | save_events: IOHUB_BOOL 28 | stream_events: IOHUB_BOOL 29 | auto_report_events: False 30 | monitor_event_types: 31 | IOHUB_LIST: 32 | valid_values: [ MultiChannelAnalogInputEvent, ] 33 | min_length: 0 34 | max_length: 3 35 | event_buffer_length: 36 | IOHUB_INT: 37 | min: 1 38 | max: 2048 39 | device_number: 0 40 | model_number: 41 | IOHUB_STRING: 42 | min_length: 1 43 | max_length: 16 44 | manufacture_date: IOHUB_DATE 45 | software_version: 46 | IOHUB_STRING: 47 | min_length: 1 48 | max_length: 8 49 | hardware_version: 50 | IOHUB_STRING: 51 | min_length: 1 52 | max_length: 8 53 | firmware_version: 54 | IOHUB_STRING: 55 | min_length: 1 56 | max_length: 8 57 | -------------------------------------------------------------------------------- /iohub/devices/daq/hw/labjack/win32/python26/pylabjack/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'Sol' 2 | 3 | # labjack python does not come as a module, so like psychopy does, this is the ioHub wrapper of it. 4 | 5 | import LabJackPython 6 | import Modbus 7 | 8 | try: 9 | import skymote 10 | except: 11 | pass 12 | 13 | try: 14 | import u12 15 | except: 16 | pass 17 | 18 | import u6 19 | 20 | import ue9 -------------------------------------------------------------------------------- /iohub/devices/daq/hw/labjack/win32/python27/pylabjack/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'Sol' 2 | 3 | # labjack python does not come as a module, so like psychopy does, this is the ioHub wrapper of it. 4 | 5 | import LabJackPython 6 | import Modbus 7 | 8 | try: 9 | import skymote 10 | except: 11 | pass 12 | 13 | try: 14 | import u12 15 | except: 16 | pass 17 | 18 | import u6 19 | 20 | import ue9 -------------------------------------------------------------------------------- /iohub/devices/daq/hw/mc/supported_config_settings.yaml: -------------------------------------------------------------------------------- 1 | daq.hw.mc.AnalogInput: 2 | enable: IOHUB_BOOL 3 | name: 4 | IOHUB_STRING: 5 | min_length: 1 6 | max_length: 32 7 | first_char_alpha: True 8 | device_number: 9 | IOHUB_INT: 10 | min: 0 11 | max: 32 12 | channel_sampling_rate: 13 | IOHUB_INT: 14 | min: 1 15 | max: 2000 16 | gain: BIP10VOLTS 17 | options: 0 18 | input_channel_count: 8 19 | save_events: IOHUB_BOOL 20 | stream_events: IOHUB_BOOL 21 | auto_report_events: False 22 | device_timer: 23 | interval: 24 | IOHUB_FLOAT: 25 | min: 0.001 26 | max: 0.020 27 | event_buffer_length: 28 | IOHUB_INT: 29 | min: 1 30 | max: 2048 31 | monitor_event_types: 32 | IOHUB_LIST: 33 | valid_values: [ MultiChannelAnalogInputEvent, ] 34 | min_length: 0 35 | max_length: 3 36 | model_name: 37 | IOHUB_STRING: 38 | min_length: 1 39 | max_length: 32 40 | model_number: 41 | IOHUB_STRING: 42 | min_length: 1 43 | max_length: 16 44 | manufacturer_name: Measurement Computing Corporation 45 | serial_number: 46 | IOHUB_STRING: 47 | min_length: 1 48 | max_length: 32 49 | manufacture_date: IOHUB_DATE 50 | software_version: 51 | IOHUB_STRING: 52 | min_length: 1 53 | max_length: 8 54 | hardware_version: 55 | IOHUB_STRING: 56 | min_length: 1 57 | max_length: 8 58 | firmware_version: 59 | IOHUB_STRING: 60 | min_length: 1 61 | max_length: 8 62 | -------------------------------------------------------------------------------- /iohub/devices/default_device.yaml: -------------------------------------------------------------------------------- 1 | DeviceClass: 2 | enable: True 3 | name: device 4 | device_number: 0 5 | save_events: True 6 | stream_events: True 7 | auto_report_events: False 8 | # IMPORTANT: device_time **must** only be present in the config file if the device 9 | # implementation uses polling to check for new native device events. 10 | device_timer: 11 | interval: 0.001 12 | event_buffer_length: 256 13 | monitor_event_types: [ DeviceEvent, ] 14 | # The model_name setting allows the specification of the device model name being used. 15 | # Some device implementations will use this value to determine 16 | # the appropriate logic to be run for a given device model supported by the ioHub Device class. 17 | model_name: N/A 18 | # The model_number can be used to hold a string representation of the model number of the 19 | # eye tracker being used, assuming a model number is provided by the manufacturer. 20 | model_number: N/A 21 | # manufacturer_name can be used to store the name of the maker of the 22 | # device being used. This is for informational purposes only. 23 | manufacturer_name: N/A 24 | # serial_number can be used to store the unique serial number of the eye tracking 25 | # device being used. This is for informational purposes only. The serial number should be in 26 | # a string representation. 27 | serial_number: N/A 28 | # manufacture_date can be used to store the date of manufacture of the eye tracking 29 | # device being used if it is provided by the eye tracker manufacturer. 30 | # This is for informational purposes only. The serial number should be in 31 | # a string representation using the format DD-MM-YYYY. 32 | manufacture_date: DD-MM-YYYY 33 | # software_version can be used to store the native device API / SDK interface 34 | # being used by the ioHub common eye tracker interface on the back end. 35 | # This is generally for informational purposes only. 36 | software_version: N/A 37 | # hardware_version can be used to store the native device's hardware version 38 | # number if device models also include a version or revision number by the supplier. 39 | # This is generally for informational purposes only. 40 | hardware_version: N/A 41 | # firmware_version can be used to store the native device's firmware version 42 | # if a device provides such information. 43 | # This is generally for informational purposes only. 44 | firmware_version: N/A 45 | -------------------------------------------------------------------------------- /iohub/devices/display/supported_config_settings.yaml: -------------------------------------------------------------------------------- 1 | Display: 2 | enable: IOHUB_BOOL 3 | name: 4 | IOHUB_STRING: 5 | min_length: 1 6 | max_length: 32 7 | first_char_alpha: True 8 | device_number: 9 | IOHUB_INT: 10 | min: 0 11 | max: 7 12 | reporting_unit_type: [ org, pix, pixel, pixels, deg, degree, degrees, cm, mm, inch, norm, normalize, normalized, percent, percentage] 13 | origin: [ center , top_left , bottom_left] 14 | physical_dimensions: 15 | width: 16 | IOHUB_NUMBER: 17 | min: 1 18 | max: 2048 19 | required: True 20 | height: 21 | IOHUB_NUMBER: 22 | min: 1 23 | max: 2048 24 | required: True 25 | unit_type: [ mm, cm, inch ] 26 | default_eye_distance: 27 | surface_center: 28 | IOHUB_NUMBER: 29 | min: 1 30 | max: 2048 31 | required: True 32 | unit_type: [ mm, cm, inch ] 33 | psychopy_monitor_name: 34 | IOHUB_STRING: 35 | min_length: 1 36 | max_length: 32 37 | required: True 38 | override_using_psycho_settings: IOHUB_BOOL 39 | save_events: False 40 | stream_events: False 41 | auto_report_events: False 42 | event_buffer_length: 0 43 | monitor_event_types: 44 | model_name: 45 | IOHUB_STRING: 46 | min_length: 1 47 | max_length: 32 48 | default: N/A 49 | model_number: 50 | IOHUB_STRING: 51 | min_length: 1 52 | max_length: 16 53 | default: N/A 54 | manufacturer_name: 55 | IOHUB_STRING: 56 | min_length: 1 57 | max_length: 64 58 | default: N/A 59 | serial_number: 60 | IOHUB_STRING: 61 | min_length: 1 62 | max_length: 32 63 | default: N/A 64 | manufacture_date: IOHUB_DATE 65 | software_version: 66 | IOHUB_STRING: 67 | min_length: 1 68 | max_length: 8 69 | default: N/A 70 | hardware_version: 71 | IOHUB_STRING: 72 | min_length: 1 73 | max_length: 8 74 | default: N/A 75 | firmware_version: 76 | IOHUB_STRING: 77 | min_length: 1 78 | max_length: 8 79 | default: N/A 80 | -------------------------------------------------------------------------------- /iohub/devices/experiment/default_experiment.yaml: -------------------------------------------------------------------------------- 1 | # This file includes all valid Experiment Device 2 | # settings that can be specified in an iohub_config.yaml 3 | # or in a Python dictionary form and passed to the quickStartHubServer 4 | # method. Any device parameters not specified when the device class is 5 | # created by the ioHub Process will be assigned the default value 6 | # indicated here. 7 | # 8 | Experiment: 9 | # name: The unique name to assign to the evice instance created. 10 | # The device is accessed from within the PsychoPy script 11 | # using the name's value; therefore it must be a valid Python 12 | # variable name as well. 13 | # 14 | name: experiment 15 | 16 | # monitor_event_types: Specify which of the device's supported event 17 | # types you would like the ioHub to monitor for. 18 | # 19 | monitor_event_types: [MessageEvent, LogEvent] 20 | 21 | # enable: Specifies if the device should be enabled by ioHub and monitored 22 | # for events. 23 | # True = Enable the device on the ioHub Server Process 24 | # False = Disable the device on the ioHub Server Process. No events for 25 | # this device will be reported by the ioHub Server. 26 | # 27 | enable: True 28 | 29 | # saveEvents: *If* the ioHubDataStore is enabled for the experiment, then 30 | # indicate if events for this device should be saved to the 31 | # data_collection/keyboard event group in the hdf5 event file. 32 | # True = Save events for this device to the ioDataStore. 33 | # False = Do not save events for this device in the ioDataStore. 34 | # 35 | save_events: True 36 | 37 | # streamEvents: Indicate if events from this device should be made available 38 | # during experiment runtime to the PsychoPy Process. 39 | # True = Send events for this device to the PsychoPy Process in real-time. 40 | # False = Do *not* send events for this device to the PsychoPy Process in real-time. 41 | # 42 | stream_events: True 43 | 44 | # auto_report_events: Indicate if events from this device should start being 45 | # processed by the ioHub as soon as the device is loaded at the start of an experiment, 46 | # or if events should only start to be monitored on the device when a call to the 47 | # device's enableEventReporting method is made with a parameter value of True. 48 | # True = Automatically start reporting events for this device when the experiment starts. 49 | # False = Do not start reporting events for this device until enableEventReporting(True) 50 | # is set for the device during experiment runtime. 51 | # 52 | auto_report_events: True 53 | 54 | # event_buffer_length: Specify the maximum number of events (for each 55 | # event type the device produces) that can be stored by the ioHub Server 56 | # before each new event results in the oldest event of the same type being 57 | # discarded from the ioHub device event buffer. 58 | # 59 | event_buffer_length: 128 60 | 61 | # The device manufacturer's name. 62 | # It is not used by the ioHub, so is FYI only. 63 | # 64 | manufacturer_name: N/A 65 | 66 | # The device number to assign to the device. 67 | # Device_number is not used by this device type. 68 | # 69 | device_number: 0 70 | 71 | # The serial number for the specific isnstance of device used 72 | # can be specified here. It is not used by the ioHub, so is FYI only. 73 | # 74 | serial_number: N/A 75 | 76 | # manufacture_date: The date of manufactiurer of the device 77 | # can be specified here. It is not used by the ioHub, 78 | # so is FYI only. 79 | # 80 | manufacture_date: DD-MM-YYYY 81 | 82 | # The device model name can be specified here. 83 | # It is not used by the ioHub, so is FYI only. 84 | # 85 | model_name: N/A 86 | 87 | # The device model number can be specified here. 88 | # It is not used by the ioHub, so is FYI only. 89 | # 90 | model_number: N/A 91 | 92 | # The device driver and / or SDK software version number. 93 | # This field is not used by ioHub, so is FYI only. 94 | software_version: N/A 95 | 96 | # The device's hardware version can be specified here. 97 | # It is not used by the ioHub, so is FYI only. 98 | # 99 | hardware_version: N/A 100 | 101 | # If the device has firmware, its revision number 102 | # can be indicated here. It is not used by the ioHub, so is FYI only. 103 | # 104 | firmware_version: N/A 105 | 106 | -------------------------------------------------------------------------------- /iohub/devices/experiment/supported_config_settings.yaml: -------------------------------------------------------------------------------- 1 | Experiment: 2 | enable: IOHUB_BOOL 3 | name: 4 | IOHUB_STRING: 5 | min_length: 1 6 | max_length: 32 7 | first_char_alpha: True 8 | save_events: IOHUB_BOOL 9 | stream_events: True 10 | auto_report_events: True 11 | event_buffer_length: 12 | IOHUB_INT: 13 | min: 1 14 | max: 2048 15 | monitor_event_types: 16 | IOHUB_LIST: 17 | valid_values: [ MessageEvent, LogEvent ] 18 | min_length: 2 19 | max_length: 2 20 | device_number: 21 | IOHUB_INT: 22 | min: 0 23 | max: 32 24 | model_name: 25 | IOHUB_STRING: 26 | min_length: 1 27 | max_length: 32 28 | model_number: 29 | IOHUB_STRING: 30 | min_length: 1 31 | max_length: 16 32 | manufacturer_name: 33 | IOHUB_STRING: 34 | min_length: 1 35 | max_length: 64 36 | serial_number: 37 | IOHUB_STRING: 38 | min_length: 1 39 | max_length: 32 40 | manufacture_date: IOHUB_DATE 41 | software_version: 42 | IOHUB_STRING: 43 | min_length: 1 44 | max_length: 8 45 | hardware_version: 46 | IOHUB_STRING: 47 | min_length: 1 48 | max_length: 8 49 | firmware_version: 50 | IOHUB_STRING: 51 | min_length: 1 52 | max_length: 8 53 | -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/__init__.py -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/lc_technologies/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/lc_technologies/__init__.py -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/lc_technologies/eyegaze/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Tue Mar 26 06:49:45 2013 4 | 5 | @author: isolver 6 | """ 7 | 8 | from eyetracker import (EyeTracker, MonocularEyeSampleEvent, BinocularEyeSampleEvent, 9 | FixationStartEvent,FixationEndEvent,SaccadeStartEvent, 10 | SaccadeEndEvent,BlinkStartEvent,BlinkEndEvent) -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/lc_technologies/eyegaze/pegTest.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import pEyeGaze 3 | from ctypes import byref 4 | 5 | def initEyeGaze(): 6 | """ 7 | Function to create the _stEgControl object and init the 8 | EyeGaze system. Exits the program if the init fails. 9 | """ 10 | import sys 11 | 12 | eyegaze_control=pEyeGaze._stEgControl() 13 | 14 | eyegaze_control.iNDataSetsInRingBuffer = 32 15 | eyegaze_control.bTrackingActive = False 16 | # hardcoding display resolution here; for this example only. ;) 17 | eyegaze_control.iScreenWidthPix = 1280 18 | eyegaze_control.iScreenHeightPix = 1024 19 | eyegaze_control.bEgCameraDisplayActive = False 20 | eyegaze_control.iEyeImagesScreenPos=1 21 | eyegaze_control.iVisionSelect=0; # Set this reserved variable to 0 22 | eyegaze_control.iCommType = pEyeGaze.EG_COMM_TYPE_LOCAL 23 | 24 | result=pEyeGaze.EgInit(byref(eyegaze_control)) 25 | if result!=0: 26 | print "Could not connect to EyeGaze. Error: ",result 27 | sys.exit(0) 28 | 29 | return eyegaze_control 30 | 31 | def runCalibration(eyegaze_control): 32 | """ 33 | Function to run the external calibrate.exe program. 34 | Returns a new instance of _stEgControl (probably not 'necessary'). 35 | """ 36 | import subprocess,time 37 | 38 | result=pEyeGaze.EgExit(byref(eyegaze_control)) 39 | eyegaze_control=None 40 | 41 | p = subprocess.Popen(('calibrate.exe', '')) 42 | while p.poll() is None: 43 | time.sleep(0.05) 44 | 45 | return initEyeGaze() 46 | 47 | if __name__ == '__main__': 48 | import timeit, time 49 | 50 | 'pEyeGaze Test Started...' 51 | # initialize the system and get the control object back 52 | eyegaze_control=initEyeGaze() 53 | 54 | # run calibration, getting a new control object back 55 | # since the calibrate.exe requires us to close and reopen the connection 56 | eyegaze_control=runCalibration(eyegaze_control) 57 | 58 | # start recording 59 | eyegaze_control.bTrackingActive=True 60 | 61 | 62 | # For the example, collect 1000+ samples of data 63 | samples_rx=0 64 | rec_start=timeit.default_timer() 65 | while samples_rx < 1000: 66 | # This is the 'doing something else' part in the example. 67 | time.sleep(0.01) 68 | 69 | # we'll use async. mode, getting avail samples 70 | # and then 'do something else'. 71 | while eyegaze_control.iNPointsAvailable: 72 | pEyeGaze.EgGetData(byref(eyegaze_control)) 73 | # assume monocular for this example only. ;) 74 | sample_data0=eyegaze_control.pstEgData[0] 75 | stime=sample_data0.dGazeTimeSec 76 | gaze_x=sample_data0.iIGaze 77 | gaze_y=sample_data0.iJGaze 78 | print 'Sample Time: {0}\tX: {1}\tY: {2}'.format(stime,gaze_x,gaze_y) 79 | samples_rx+=1 80 | 81 | rec_end=timeit.default_timer() 82 | 83 | # stop recording 84 | eyegaze_control.bTrackingActive=False 85 | 86 | # Exit the lcteg system 87 | result=pEyeGaze.EgInit(byref(eyegaze_control)) 88 | 89 | dur=rec_end-rec_start 90 | print 'Collected {0} samples in {1} seconds. {2} SPS'.format(samples_rx,dur,samples_rx/dur) -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/lc_technologies/eyegaze/supported_config_settings.yaml: -------------------------------------------------------------------------------- 1 | eyetracker.hw.lc_technologies.eyegaze.EyeTracker: 2 | enable: IOHUB_BOOL 3 | name: 4 | IOHUB_STRING: 5 | min_length: 1 6 | max_length: 32 7 | first_char_alpha: True 8 | save_events: IOHUB_BOOL 9 | stream_events: IOHUB_BOOL 10 | device_timer: 11 | interval: 12 | IOHUB_FLOAT: 13 | min: 0.001 14 | max: 0.020 15 | event_buffer_length: 16 | IOHUB_INT: 17 | min: 1 18 | max: 1024 19 | display_camera_image: IOHUB_BOOL 20 | camera_image_screen_position: 21 | IOHUB_LIST: 22 | valid_values: [UPPER_RIGHT, UPPER_LEFT] 23 | min_length: 1 24 | max_length: 1 25 | host_connection: 26 | type: 27 | IOHUB_LIST: 28 | valid_values: [LOCAL, SOCKET, SERIAL] 29 | min_length: 1 30 | max_length: 1 31 | # [SOCKET, 127.0.0.1] : eyegaze server ip address 32 | # [SERIAL, COM1] : COM address of serial port to use. 33 | parameter: 34 | IOHUB_STRING: 35 | min_length: 0 36 | max_length: 16 37 | monitor_event_types: 38 | IOHUB_LIST: 39 | valid_values: [MonocularEyeSampleEvent, BinocularEyeSampleEvent,] 40 | min_length: 0 41 | max_length: 2 42 | model_name: 43 | IOHUB_STRING: 44 | min_length: 1 45 | max_length: 16 46 | manufacturer_name: LC Technologies, Inc. 47 | device_number: 0 48 | model_number: 49 | IOHUB_STRING: 50 | min_length: 1 51 | max_length: 16 52 | serial_number: 53 | IOHUB_STRING: 54 | min_length: 1 55 | max_length: 32 56 | manufacture_date: IOHUB_DATE 57 | software_version: 58 | IOHUB_STRING: 59 | min_length: 1 60 | max_length: 8 61 | hardware_version: 62 | IOHUB_STRING: 63 | min_length: 1 64 | max_length: 8 65 | firmware_version: 66 | IOHUB_STRING: 67 | min_length: 1 68 | max_length: 8 69 | # The below settings CAN NOT BE CHANGED! 70 | auto_report_events: False 71 | -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/smi/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/smi/__init__.py -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/smi/iviewx/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | ioHub 3 | ioHub Common Eye Tracker Interface 4 | .. file: ioHub/devices/eyetracker/hw/smi/iviewx/__init__.py 5 | 6 | Copyright (C) 2012-2013 XXXXXXXX, iSolver Software Solutions 7 | Distributed under the terms of the GNU General Public License (GPL version 3 or any later version). 8 | 9 | .. moduleauthor:: Sol Simpson + contributors 10 | """ 11 | #from ioHub import addDirectoryToPythonPath 12 | #addDirectoryToPythonPath('devices/eyetracker/hw/smi/iviewx','bin') 13 | 14 | from eyetracker import (EyeTracker, MonocularEyeSampleEvent, BinocularEyeSampleEvent, 15 | FixationStartEvent,FixationEndEvent,SaccadeStartEvent, 16 | SaccadeEndEvent,BlinkStartEvent,BlinkEndEvent) -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/smi/iviewx/supported_config_settings.yaml: -------------------------------------------------------------------------------- 1 | eyetracker.hw.smi.iviewx.EyeTracker: 2 | name: 3 | IOHUB_STRING: 4 | min_length: 1 5 | max_length: 32 6 | first_char_alpha: True 7 | enable: IOHUB_BOOL 8 | save_events: IOHUB_BOOL 9 | stream_events: IOHUB_BOOL 10 | auto_report_events: False 11 | device_timer: 12 | interval: 13 | IOHUB_FLOAT: 14 | min: 0.001 15 | max: 0.020 16 | event_buffer_length: 17 | IOHUB_INT: 18 | min: 1 19 | max: 2048 20 | monitor_event_types: 21 | IOHUB_LIST: 22 | valid_values: [ MonocularEyeSampleEvent, BinocularEyeSampleEvent, FixationStartEvent, FixationEndEvent, SaccadeStartEvent, SaccadeEndEvent, BlinkStartEvent, BlinkEndEvent] 23 | min_length: 0 24 | max_length: 8 25 | model_name: 26 | IOHUB_LIST: 27 | valid_values: [NONE, RED, REDm, HiSpeed, MRI, HED, ETG, Custom] 28 | min_length: 1 29 | max_length: 1 30 | manufacturer_name: SensoMotoric Instruments GmbH 31 | calibration: 32 | type: 33 | IOHUB_LIST: 34 | valid_values: [ NO_POINTS,ONE_POINT,TWO_POINTS,FIVE_POINTS,NINE_POINTS,THIRTEEN_POINTS ] 35 | min_length: 0 36 | max_length: 1 37 | graphics_env: INTERNAL 38 | auto_pace: IOHUB_BOOL 39 | pacing_speed: [ SLOW, FAST ] 40 | screen_background_color: 41 | IOHUB_INT: 42 | min: 0 43 | max: 255 44 | target_type: [IMAGE , CIRCLE, CROSS] 45 | target_attributes: 46 | target_size: 47 | IOHUB_INT: 48 | min: 2 49 | max: 1024 50 | target_color: 51 | IOHUB_INT: 52 | min: 0 53 | max: 255 54 | target_inner_color: [ BACKGROUND, RED ] 55 | file_name: 56 | IOHUB_STRING: 57 | min_length: 0 58 | max_length: 32 59 | # Should a Window showing the validation accuracy as a gaze point 60 | # overlay be displayed following a validation procedure? 61 | show_validation_accuracy_window: IOHUB_BOOL 62 | 63 | network_settings: 64 | # IP address of iView X computer 65 | send_ip_address: IOHUB_IP_ADDRESS_V4 66 | # Port being used by iView X SDK for sending data to iView X 67 | send_port: 68 | IOHUB_INT: 69 | min: 1 70 | max: 9999 71 | # IP address of local computer 72 | receive_ip_address: IOHUB_IP_ADDRESS_V4 73 | # port being used by iView X SDK for receiving data from iView X 74 | receive_port: 75 | IOHUB_INT: 76 | min: 1 77 | max: 9999 78 | runtime_settings: 79 | # The sampling rate setting in the iViewX implementation is used only to 80 | # compare the sampling rate read from the device to ensure it matches 81 | # the rate specified here. 82 | # It is not possible to 'set' the sampling rate via the SMI API however. 83 | sampling_rate: 84 | IOHUB_NUMBER: 85 | min: 30 86 | max: 1250 87 | sample_filtering: 88 | FILTER_ALL: 89 | IOHUB_LIST: 90 | valid_values: [FILTER_LEVEL_OFF, FILTER_OFF, FILTER_LEVEL_1, FILTER_ON] 91 | min_length: 1 92 | max_length: 1 93 | # The iViewX supports the following track_eyes values: 94 | # LEFT_EYE, RIGHT_EYE, BINOCULAR, BINOCULAR_AVERAGED, BINOCULAR_CUSTOM 95 | track_eyes: [LEFT_EYE, RIGHT_EYE, BINOCULAR, BINOCULAR_AVERAGED, BINOCULAR_CUSTOM] 96 | # VOG settings allow you to specify some eye tracker parameters related to 97 | # the image processing or data collection procedure used by the eye tracker 98 | # device. 99 | vog_settings: 100 | # The iViewX supports one pupil_measure_types parameter that is used 101 | # for any eyes being tracked. PUPIL_AREA, PUPIL_DIAMETER are 102 | # valid pupil measure types for the iViewX. 103 | # PUPIL_DIAMETER, PUPIL_DIAMETER_MM, 104 | pupil_measure_types: [PUPIL_DIAMETER, PUPIL_DIAMETER_MM] 105 | device_number: 0 106 | model_number: 107 | IOHUB_STRING: 108 | min_length: 1 109 | max_length: 32 110 | serial_number: 111 | IOHUB_STRING: 112 | min_length: 1 113 | max_length: 32 114 | manufacture_date: IOHUB_DATE 115 | software_version: 116 | IOHUB_STRING: 117 | min_length: 1 118 | max_length: 8 119 | hardware_version: 120 | IOHUB_STRING: 121 | min_length: 1 122 | max_length: 8 123 | firmware_version: 124 | IOHUB_STRING: 125 | min_length: 1 126 | max_length: 8 127 | 128 | -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/__init__.py -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | ioHub 3 | Common Eye Tracker Interface 4 | .. file: ioHub/devices/eyeTracker/hw/sr_research/eyelink/__init__.py 5 | 6 | Copyright (C) 2012-2013 iSolver Software Solutions 7 | 8 | Distributed under the terms of the GNU General Public License (GPL version 3 or any later version). 9 | 10 | .. moduleauthor:: Sol Simpson + contributors, please see credits section of documentation. 11 | .. fileauthor:: Sol Simpson 12 | """ 13 | 14 | from ...... import addDirectoryToPythonPath 15 | 16 | addDirectoryToPythonPath('devices/eyetracker/hw/sr_research/eyelink') 17 | 18 | from eyetracker import (EyeTracker, MonocularEyeSampleEvent, BinocularEyeSampleEvent, 19 | FixationStartEvent,FixationEndEvent,SaccadeStartEvent, 20 | SaccadeEndEvent,BlinkStartEvent,BlinkEndEvent) 21 | -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/supported_config_settings.yaml: -------------------------------------------------------------------------------- 1 | eyetracker.hw.sr_research.eyelink.EyeTracker: 2 | name: 3 | IOHUB_STRING: 4 | min_length: 1 5 | max_length: 32 6 | first_char_alpha: True 7 | enable: IOHUB_BOOL 8 | save_events: IOHUB_BOOL 9 | stream_events: IOHUB_BOOL 10 | auto_report_events: False 11 | device_timer: 12 | interval: 13 | IOHUB_FLOAT: 14 | min: 0.001 15 | max: 0.020 16 | event_buffer_length: 17 | IOHUB_INT: 18 | min: 1 19 | max: 2048 20 | monitor_event_types: 21 | IOHUB_LIST: 22 | valid_values: [ MonocularEyeSampleEvent, BinocularEyeSampleEvent, FixationStartEvent, FixationEndEvent, SaccadeStartEvent, SaccadeEndEvent, BlinkStartEvent, BlinkEndEvent] 23 | min_length: 0 24 | max_length: 8 25 | calibration: 26 | type: [ THREE_POINTS, FIVE_POINTS, NINE_POINTS, THIRTEEN_POINTS] 27 | auto_pace: IOHUB_BOOL 28 | pacing_speed: 29 | IOHUB_FLOAT: 30 | min: 0.5 31 | max: 2.5 32 | screen_background_color: IOHUB_RGBA255_COLOR 33 | target_type: [CIRCLE_TARGET,] 34 | target_attributes: 35 | outer_diameter: 36 | IOHUB_INT: 37 | min: 8 38 | max: 256 39 | inner_diameter: 40 | IOHUB_INT: 41 | min: 0 42 | max: 255 43 | outer_color: IOHUB_RGBA255_COLOR 44 | inner_color: IOHUB_RGBA255_COLOR 45 | simulation_mode: IOHUB_BOOL 46 | enable_interface_without_connection: IOHUB_BOOL 47 | network_settings: IOHUB_IP_ADDRESS_V4 48 | default_native_data_file_name: 49 | IOHUB_STRING: 50 | min_length: 0 51 | max_length: 7 52 | runtime_settings: 53 | sampling_rate: [250,500,1000,2000] 54 | track_eyes: [LEFT_EYE,RIGHT_EYE,BINOCULAR] 55 | sample_filtering: 56 | FILTER_ALL: 57 | IOHUB_LIST: 58 | valid_values: [FILTER_LEVEL_OFF, FILTER_LEVEL_1, FILTER_LEVEL_2] 59 | min_length: 1 60 | max_length: 1 61 | FILTER_FILE: 62 | IOHUB_LIST: 63 | valid_values: [FILTER_LEVEL_OFF, FILTER_LEVEL_1, FILTER_LEVEL_2] 64 | min_length: 1 65 | max_length: 1 66 | FILTER_ONLINE: 67 | IOHUB_LIST: 68 | valid_values: [FILTER_LEVEL_OFF, FILTER_LEVEL_1, FILTER_LEVEL_2] 69 | min_length: 1 70 | max_length: 1 71 | vog_settings: 72 | pupil_measure_types: 73 | IOHUB_LIST: 74 | valid_values: [PUPIL_AREA,PUPIL_DIAMETER] 75 | min_length: 1 76 | max_length: 1 77 | tracking_mode: 78 | IOHUB_LIST: 79 | valid_values: [PUPIL_CR_TRACKING, PUPIL_ONLY_TRACKING] 80 | min_length: 1 81 | max_length: 1 82 | pupil_center_algorithm: 83 | IOHUB_LIST: 84 | valid_values: [ELLIPSE_FIT, CENTROID_FIT] 85 | min_length: 1 86 | max_length: 1 87 | model_name: 88 | IOHUB_LIST: 89 | valid_values: [EYELINK 1000 DESKTOP, EYELINK 1000 TOWER, EYELINK 1000 REMOTE, EYELINK 1000 LONG RANGE, EYELINK 2, EYELINK] 90 | min_length: 1 91 | max_length: 1 92 | device_number: 0 93 | model_number: 94 | IOHUB_STRING: 95 | min_length: 1 96 | max_length: 16 97 | manufacturer_name: SR Research Ltd. 98 | serial_number: 99 | IOHUB_STRING: 100 | min_length: 1 101 | max_length: 32 102 | manufacture_date: IOHUB_DATE 103 | software_version: 104 | IOHUB_STRING: 105 | min_length: 1 106 | max_length: 8 107 | hardware_version: 108 | IOHUB_STRING: 109 | min_length: 1 110 | max_length: 8 111 | firmware_version: 112 | IOHUB_STRING: 113 | min_length: 1 114 | max_length: 8 115 | 116 | -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/wav/error.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/wav/error.wav -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/wav/qbeep.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/wav/qbeep.wav -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/wav/type.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/wav/type.wav -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/SDL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/SDL.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/SDL_mixer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/SDL_mixer.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/SDL_ttf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/SDL_ttf.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/eyelink_core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/eyelink_core.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/eyelink_core_graphics.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/eyelink_core_graphics.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/libogg-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/libogg-0.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/libvorbis-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/libvorbis-0.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/libvorbisfile-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/libvorbisfile-3.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/msvcr71.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/msvcr71.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/pylink.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/pylink.pyd -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/sdl_gfx.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/sdl_gfx.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/smpeg.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python26/pylink/smpeg.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/SDL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/SDL.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/SDL_mixer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/SDL_mixer.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/SDL_ttf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/SDL_ttf.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/eyelink_core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/eyelink_core.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/eyelink_core_graphics.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/eyelink_core_graphics.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/libogg-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/libogg-0.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/libvorbis-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/libvorbis-0.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/libvorbisfile-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/libvorbisfile-3.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/msvcr71.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/msvcr71.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/pylink.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/pylink.pyd -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/sdl_gfx.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/sdl_gfx.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/smpeg.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isolver/ioHub/3d7c51a932d4ab2cc28f07d10c72e9e78999ab9f/iohub/devices/eyetracker/hw/sr_research/eyelink/win32/python27/pylink/smpeg.dll -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/tobii/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | ioHub 3 | Common Eye Tracker Interface 4 | .. file: ioHub/devices/eyetracker/hw/tobii/__init__.py 5 | 6 | Copyright (C) 2012-2013 iSolver Software Solutions 7 | Distributed under the terms of the GNU General Public License (GPL version 3 or any later version). 8 | 9 | .. moduleauthor:: ?? 10 | .. fileauthor:: ?? 11 | """ 12 | 13 | from eyetracker import * 14 | -------------------------------------------------------------------------------- /iohub/devices/eyetracker/hw/tobii/supported_config_settings.yaml: -------------------------------------------------------------------------------- 1 | eyetracker.hw.tobii.EyeTracker: 2 | name: 3 | IOHUB_STRING: 4 | min_length: 1 5 | max_length: 32 6 | first_char_alpha: True 7 | enable: IOHUB_BOOL 8 | model_name: 9 | IOHUB_LIST: 10 | valid_values: [Tobii T120, None] 11 | min_length: 0 12 | max_length: 1 13 | serial_number: 14 | IOHUB_STRING: 15 | min_length: 0 16 | max_length: 32 17 | manufacturer_name: Tobii Technology 18 | save_events: IOHUB_BOOL 19 | stream_events: IOHUB_BOOL 20 | auto_report_events: False 21 | event_buffer_length: 22 | IOHUB_INT: 23 | min: 1 24 | max: 2048 25 | monitor_event_types: 26 | IOHUB_LIST: 27 | valid_values: [ BinocularEyeSampleEvent, ] 28 | min_length: 1 29 | max_length: 1 30 | runtime_settings: 31 | sampling_rate: [25,30,60,120,400] 32 | track_eyes: [BINOCULAR,] 33 | calibration: 34 | # The Tobii ioHub Common Eye Tracker Interface currently support 35 | # a 3, 5 and 9 point calibration mode. 36 | # THREE_POINTS,FIVE_POINTS,NINE_POINTS 37 | type: [THREE_POINTS,FIVE_POINTS,NINE_POINTS] 38 | randomize: False 39 | target_positions: [] 40 | auto_pace: IOHUB_BOOL 41 | pacing_speed: 42 | IOHUB_FLOAT: 43 | min: 0.5 44 | max: 2.5 45 | screen_background_color: IOHUB_RGBA255_COLOR 46 | target_type: [CIRCLE_TARGET,] 47 | target_attributes: 48 | outer_diameter: 49 | IOHUB_INT: 50 | min: 8 51 | max: 256 52 | inner_diameter: 53 | IOHUB_INT: 54 | min: 0 55 | max: 255 56 | outer_color: IOHUB_RGBA255_COLOR 57 | inner_color: IOHUB_RGBA255_COLOR 58 | device_number: 0 59 | manufacture_date: IOHUB_DATE 60 | model_number: 61 | IOHUB_STRING: 62 | min_length: 1 63 | max_length: 16 64 | software_version: 65 | IOHUB_STRING: 66 | min_length: 1 67 | max_length: 8 68 | hardware_version: 69 | IOHUB_STRING: 70 | min_length: 1 71 | max_length: 8 72 | firmware_version: 73 | IOHUB_STRING: 74 | min_length: 1 75 | max_length: 8 -------------------------------------------------------------------------------- /iohub/devices/keyboard/default_keyboard.yaml: -------------------------------------------------------------------------------- 1 | # This file includes all valid Keyboard Device 2 | # settings that can be specified in an iohub_config.yaml 3 | # or in Python dictionary form and passed to the launchHubServer 4 | # method. Any device parameters not specified when the device class is 5 | # created by the ioHub Process will be assigned the default value 6 | # indicated here. 7 | # 8 | Keyboard: 9 | # name: The name you want to assign the keyboard device for the experiment 10 | # This name is what will be used to access the device within the experiment 11 | # script via the devices.[device_name] property of the ioHubConnection or 12 | # ioHubExperimentRuntime classes. 13 | # 14 | name: keyboard 15 | 16 | # enable: Specifies if the device should be enabled by ioHub and monitored 17 | # for events. 18 | # True = Enable the device on the ioHub Server Process 19 | # False = Disable the device on the ioHub Server Process. No keyboard events will 20 | # be reported by the ioHub Server. 21 | # 22 | enable: True 23 | 24 | # saveEvents: *If* the ioHubDataStore is enabled for the experiment, then 25 | # indicate if events for this device should be saved to the 26 | # monitor_event_types: Specified which KeyboardEvent types should be monitored 27 | # for and therefore saved to the DataStore or sent to the Experiment Process. 28 | # 29 | monitor_event_types: [KeyboardPressEvent, KeyboardReleaseEvent, KeyboardCharEvent] 30 | 31 | # report_auto_repeat_press_events: Should the keyboard report key press events 32 | # that are generated by the OS when a key is held down for an extended 33 | # period of time. 34 | # 35 | report_auto_repeat_press_events: False 36 | 37 | # data_collection/keyboard event group in the hdf5 event file. 38 | # True = Save events for this device to the ioDataStore. 39 | # False = Do not save events for this device in the ioDataStore. 40 | # 41 | save_events: True 42 | 43 | # streamEvents: Indicate if events from this device should be made available 44 | # during experiment runtime to the Experiment / PsychoPy Process. 45 | # True = Send events for this device to the Experiment Process in real-time. 46 | # False = Do *not* send events for this device to the Experiment Process in real-time. 47 | # 48 | stream_events: True 49 | 50 | # auto_report_events: Indicate if events from this device should start being 51 | # processed by the ioHub as soon as the device is loaded at the start of an experiment, 52 | # or if events should only start to be monitored on the device when a call to the 53 | # device's enableEventReporting method is made with a parameter value of True. 54 | # True = Automatically start reporting events for this device when the experiment starts. 55 | # False = Do not start reporting events for this device until enableEventReporting(True) 56 | # is set for the device during experiment runtime. 57 | # 58 | auto_report_events: True 59 | 60 | # event_buffer_length: Specify the maximum number of events (for each 61 | # event type the device produces) that can be stored by the ioHub Server 62 | # before each new event results in the oldest event of the same type being 63 | # discarded from the ioHub device event buffer. 64 | # 65 | event_buffer_length: 256 66 | 67 | # The device manufacturer's name. 68 | # It is not used by the ioHub, so is FYI only. 69 | # 70 | manufacturer_name: N/A 71 | 72 | # The device number to assign to the device. 73 | # Device_number is not used by this device type. 74 | # 75 | device_number: 0 76 | 77 | # The serial number for the specific isnstance of device used 78 | # can be specified here. It is not used by the ioHub, so is FYI only. 79 | # 80 | serial_number: N/A 81 | 82 | # manufacture_date: The date of manufactiurer of the device 83 | # can be specified here. It is not used by the ioHub, 84 | # so is FYI only. 85 | # 86 | manufacture_date: DD-MM-YYYY 87 | 88 | # The device model name can be specified here. 89 | # It is not used by the ioHub, so is FYI only. 90 | # 91 | model_name: N/A 92 | 93 | # The device model number can be specified here. 94 | # It is not used by the ioHub, so is FYI only. 95 | # 96 | model_number: N/A 97 | 98 | # The device driver and / or SDK software version number. 99 | # This field is not used by ioHub, so is FYI only. 100 | # 101 | software_version: N/A 102 | 103 | # The device's hardware version can be specified here. 104 | # It is not used by the ioHub, so is FYI only. 105 | # 106 | hardware_version: N/A 107 | 108 | # If the device has firmware, its revision number 109 | # can be indicated here. It is not used by the ioHub, so is FYI only. 110 | # 111 | firmware_version: N/A 112 | -------------------------------------------------------------------------------- /iohub/devices/keyboard/linux2.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ioHub 4 | .. file: ioHub/devices/keyboard/_linux2.py 5 | 6 | Copyright (C) 2012-2013 iSolver Software Solutions 7 | Distributed under the terms of the GNU General Public License (GPL version 3 or any later version). 8 | 9 | .. moduleauthor:: Sol Simpson + contributors, please see credits section of documentation. 10 | .. fileauthor:: Sol Simpson 11 | """ 12 | 13 | from . import ioHubKeyboardDevice 14 | from ... import print2err,printExceptionDetailsToStdErr 15 | from .. import Computer 16 | from ...constants import EventConstants,KeyboardConstants 17 | 18 | getTime = Computer.getTime 19 | 20 | class Keyboard(ioHubKeyboardDevice): 21 | def __init__(self,*args,**kwargs): 22 | ioHubKeyboardDevice.__init__(self,*args,**kwargs['dconfig']) 23 | 24 | def _nativeEventCallback(self,event): 25 | try: 26 | if self.isReportingEvents(): 27 | logged_time=getTime() 28 | event_array=event[0] 29 | 30 | if event_array[4] == EventConstants.KEYBOARD_PRESS: 31 | repeat_pressed_count=event_array[-7] 32 | if self._report_auto_repeats is False and repeat_pressed_count > 0: 33 | return True 34 | 35 | event_array[3]=Computer._getNextEventID() 36 | 37 | mod_key=event_array[-3] 38 | if mod_key in self._modifier_states.keys(): 39 | current_state=self._modifier_states[mod_key] 40 | if event_array[4]==EventConstants.KEYBOARD_PRESS and current_state is False: 41 | self._modifier_states[mod_key]=True 42 | self._modifier_value+=KeyboardConstants._modifierCodes.getID(mod_key) 43 | elif event_array[4]==EventConstants.KEYBOARD_RELEASE and current_state is True: 44 | self._modifier_states[mod_key]=False 45 | self._modifier_value-=KeyboardConstants._modifierCodes.getID(mod_key) 46 | 47 | event_array[-2]=self._modifier_value 48 | 49 | self._addNativeEventToBuffer(event_array) 50 | 51 | self._last_callback_time=logged_time 52 | except: 53 | printExceptionDetailsToStdErr() 54 | 55 | # Must return original event or no mouse events will get to OSX! 56 | return 1 57 | 58 | def _getIOHubEventObject(self,native_event_data): 59 | #ioHub.print2err('Event: ',native_event_data) 60 | return native_event_data 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /iohub/devices/keyboard/supported_config_settings.yaml: -------------------------------------------------------------------------------- 1 | Keyboard: 2 | enable: IOHUB_BOOL 3 | name: 4 | IOHUB_STRING: 5 | min_length: 1 6 | max_length: 32 7 | first_char_alpha: True 8 | save_events: IOHUB_BOOL 9 | stream_events: IOHUB_BOOL 10 | auto_report_events: IOHUB_BOOL 11 | report_auto_repeat_press_events: IOHUB_BOOL 12 | event_buffer_length: 13 | IOHUB_INT: 14 | min: 1 15 | max: 2048 16 | monitor_event_types: 17 | IOHUB_LIST: 18 | valid_values: [ KeyboardPressEvent, KeyboardReleaseEvent, KeyboardCharEvent] 19 | min_length: 0 20 | max_length: 3 21 | device_number: 22 | IOHUB_INT: 23 | min: 0 24 | max: 32 25 | model_name: 26 | IOHUB_STRING: 27 | min_length: 1 28 | max_length: 32 29 | model_number: 30 | IOHUB_STRING: 31 | min_length: 1 32 | max_length: 16 33 | manufacturer_name: 34 | IOHUB_STRING: 35 | min_length: 1 36 | max_length: 64 37 | serial_number: 38 | IOHUB_STRING: 39 | min_length: 1 40 | max_length: 32 41 | manufacture_date: IOHUB_DATE 42 | software_version: 43 | IOHUB_STRING: 44 | min_length: 1 45 | max_length: 8 46 | hardware_version: 47 | IOHUB_STRING: 48 | min_length: 1 49 | max_length: 8 50 | firmware_version: 51 | IOHUB_STRING: 52 | min_length: 1 53 | max_length: 8 54 | -------------------------------------------------------------------------------- /iohub/devices/keyboard/win32_vk.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Sun Apr 14 04:42:06 2013 4 | 5 | @author: Sol 6 | """ 7 | 8 | VK_LBUTTON = 1 9 | VK_RBUTTON = 2 10 | VK_CANCEL = 3 11 | VK_MBUTTON = 4 12 | #if (_WIN32_WINNT >= 0x0500) 13 | VK_XBUTTON1 = 5 14 | VK_XBUTTON2 = 6 15 | #endif 16 | VK_BACK = 8 17 | VK_TAB = 9 18 | VK_CLEAR = 12 19 | VK_RETURN = 13 20 | VK_SHIFT = 16 21 | VK_CONTROL = 17 22 | VK_MENU = 18 23 | VK_PAUSE = 19 24 | VK_CAPS_LOCK = 20 25 | VK_CAPITAL = 20 26 | VK_KANA = 0x15 27 | VK_HANGEUL = 0x15 28 | VK_HANGUL = 0x15 29 | VK_JUNJA = 0x17 30 | VK_FINAL = 0x18 31 | VK_HANJA = 0x19 32 | VK_KANJI = 0x19 33 | VK_ESCAPE = 0x1B 34 | VK_CONVERT = 0x1C 35 | VK_NONCONVERT = 0x1D 36 | VK_ACCEPT = 0x1E 37 | VK_MODECHANGE = 0x1F 38 | VK_SPACE = 32 39 | VK_PRIOR = 33 40 | VK_NEXT = 34 41 | VK_END = 35 42 | VK_HOME = 36 43 | VK_LEFT = 37 44 | VK_UP = 38 45 | VK_RIGHT = 39 46 | VK_DOWN = 40 47 | VK_SELECT = 41 48 | VK_PRINT = 42 49 | VK_EXECUTE = 43 50 | VK_SNAPSHOT = 44 51 | VK_INSERT = 45 52 | VK_DELETE = 46 53 | VK_HELP = 47 54 | VK_LWIN = 0x5B 55 | VK_RWIN = 0x5C 56 | VK_APPS = 0x5D 57 | VK_SLEEP = 0x5F 58 | VK_NUMPAD0 = 0x60 59 | VK_NUMPAD1 = 0x61 60 | VK_NUMPAD2 = 0x62 61 | VK_NUMPAD3 = 0x63 62 | VK_NUMPAD4 = 0x64 63 | VK_NUMPAD5 = 0x65 64 | VK_NUMPAD6 = 0x66 65 | VK_NUMPAD7 = 0x67 66 | VK_NUMPAD8 = 0x68 67 | VK_NUMPAD9 = 0x69 68 | VK_MULTIPLY = 0x6A 69 | VK_ADD = 0x6B 70 | VK_SEPARATOR = 0x6C 71 | VK_SUBTRACT = 0x6D 72 | VK_DECIMAL = 0x6E 73 | VK_DIVIDE = 0x6F 74 | VK_F1 = 0x70 75 | VK_F2 = 0x71 76 | VK_F3 = 0x72 77 | VK_F4 = 0x73 78 | VK_F5 = 0x74 79 | VK_F6 = 0x75 80 | VK_F7 = 0x76 81 | VK_F8 = 0x77 82 | VK_F9 = 0x78 83 | VK_F10 = 0x79 84 | VK_F11 = 0x7A 85 | VK_F12 = 0x7B 86 | VK_F13 = 0x7C 87 | VK_F14 = 0x7D 88 | VK_F15 = 0x7E 89 | VK_F16 = 0x7F 90 | VK_F17 = 0x80 91 | VK_F18 = 0x81 92 | VK_F19 = 0x82 93 | VK_F20 = 0x83 94 | VK_F21 = 0x84 95 | VK_F22 = 0x85 96 | VK_F23 = 0x86 97 | VK_F24 = 0x87 98 | VK_NUMLOCK = 0x90 99 | VK_SCROLL = 0x91 100 | VK_LSHIFT = 0xA0 101 | VK_RSHIFT = 0xA1 102 | VK_LCONTROL = 0xA2 103 | VK_RCONTROL = 0xA3 104 | VK_LMENU = 0xA4 105 | VK_RMENU = 0xA5 106 | #if (_WIN32_WINNT >= 0x0500) 107 | VK_BROWSER_BACK = 0xA6 108 | VK_BROWSER_FORWARD = 0xA7 109 | VK_BROWSER_REFRESH = 0xA8 110 | VK_BROWSER_STOP = 0xA9 111 | VK_BROWSER_SEARCH = 0xAA 112 | VK_BROWSER_FAVORITES = 0xAB 113 | VK_BROWSER_HOME = 0xAC 114 | VK_VOLUME_MUTE = 0xAD 115 | VK_VOLUME_DOWN = 0xAE 116 | VK_VOLUME_UP = 0xAF 117 | VK_MEDIA_NEXT_TRACK = 0xB0 118 | VK_MEDIA_PREV_TRACK = 0xB1 119 | VK_MEDIA_STOP = 0xB2 120 | VK_MEDIA_PLAY_PAUSE = 0xB3 121 | VK_LAUNCH_MAIL = 0xB4 122 | VK_LAUNCH_MEDIA_SELECT = 0xB5 123 | VK_LAUNCH_APP1 = 0xB6 124 | VK_LAUNCH_APP2 = 0xB7 125 | #endif 126 | VK_OEM_1 = 0xBA 127 | #if (_WIN32_WINNT >= 0x0500) 128 | VK_OEM_PLUS = 0xBB 129 | VK_OEM_COMMA = 0xBC 130 | VK_OEM_MINUS = 0xBD 131 | VK_OEM_PERIOD = 0xBE 132 | #endif 133 | VK_OEM_2 = 0xBF 134 | VK_OEM_3 = 0xC0 135 | VK_OEM_4 = 0xDB 136 | VK_OEM_5 = 0xDC 137 | VK_OEM_6 = 0xDD 138 | VK_OEM_7 = 0xDE 139 | VK_OEM_8 = 0xDF 140 | #if (_WIN32_WINNT >= 0x0500) 141 | VK_OEM_102 = 0xE2 142 | #endif 143 | VK_PROCESSKEY = 0xE5 144 | #if (_WIN32_WINNT >= 0x0500) 145 | VK_PACKET = 0xE7 146 | #endif 147 | VK_ATTN = 0xF6 148 | VK_CRSEL = 0xF7 149 | VK_EXSEL = 0xF8 150 | VK_EREOF = 0xF9 151 | VK_PLAY = 0xFA 152 | VK_ZOOM = 0xFB 153 | VK_NONAME = 0xFC 154 | VK_PA1 = 0xFD 155 | VK_OEM_CLEAR = 0xFE -------------------------------------------------------------------------------- /iohub/devices/mouse/default_mouse.yaml: -------------------------------------------------------------------------------- 1 | # This file includes all valid Mouse Device 2 | # settings that can be specified in an iohub_config.yaml 3 | # or in Python dictionary form and passed to the launchHubServer 4 | # method. Any device parameters not specified when the device class is 5 | # created by the ioHub Process will be assigned the default value 6 | # indicated here. 7 | # 8 | Mouse: 9 | # name: The name you want to assign the Mouse device for the experiment 10 | # This name is what will be used to access the device within the experiment 11 | # script via the devices.[device_name] property of the ioHubConnection or 12 | # ioHubExperimentRuntime classes. 13 | # 14 | name: mouse 15 | 16 | # enable: Specifies if the device should be enabled by ioHub and monitored 17 | # for events. 18 | # True = Enable the device on the ioHub Server Process 19 | # False = Disable the device on the ioHub Server Process. No mouse events will 20 | # be reported by the ioHub Server. 21 | # 22 | enable: True 23 | 24 | # monitor_event_types: *If* the ioHubDataStore is enabled for the experiment, then 25 | # indicate if events for this device should be saved to the 26 | # monitor_event_types: Specified which Mouse Event types should be monitored 27 | # for and therefore saved to the DataStore or sent to the Experiment Process. 28 | # 29 | monitor_event_types: [MouseMoveEvent, MouseDragEvent, MouseScrollEvent, MouseButtonPressEvent, MouseButtonReleaseEvent, MouseMultiClickEvent] 30 | 31 | # save_events: Save Mouse events to the data_collection/Mouse event 32 | # group in the hdf5 event file. 33 | # True = Save events for this device to the ioDataStore. 34 | # False = Do not save events for this device in the ioDataStore. 35 | # 36 | save_events: True 37 | 38 | # streamEvents: Indicate if events from this device should be made available 39 | # during experiment runtime to the Experiment / PsychoPy Process. 40 | # True = Send events for this device to the Experiment Process in real-time. 41 | # False = Do *not* send events for this device to the Experiment Process in real-time. 42 | # 43 | stream_events: True 44 | 45 | # auto_report_events: Indicate if events from this device should start being 46 | # processed by the ioHub as soon as the device is loaded at the start of an experiment, 47 | # or if events should only start to be monitored on the device when a call to the 48 | # device's enableEventReporting method is made with a parameter value of True. 49 | # True = Automatically start reporting events for this device when the experiment starts. 50 | # False = Do not start reporting events for this device until enableEventReporting(True) 51 | # is set for the device during experiment runtime. 52 | # 53 | auto_report_events: True 54 | 55 | # event_buffer_length: Specify the maximum number of events (for each 56 | # event type the device produces) that can be stored by the ioHub Server 57 | # before each new event results in the oldest event of the same type being 58 | # discarded from the ioHub device event buffer. 59 | # 60 | event_buffer_length: 256 61 | 62 | # device_number: The device number to assign to the device. 63 | # Device_number is not used by this device type. 64 | # 65 | device_number: 0 66 | 67 | # serial_number: The serial number for the specific isnstance of device used 68 | # can be specified here. It is not used by the ioHub, so is FYI only. 69 | # 70 | serial_number: N/A 71 | 72 | # manufacture_date: The date of manufactiurer of the device 73 | # can be specified here. It is not used by the ioHub, 74 | # so is FYI only. 75 | # 76 | manufacture_date: DD-MM-YYYY 77 | 78 | # The device manufacturer's name. 79 | # It is not used by the ioHub, so is FYI only. 80 | # 81 | manufacturer_name: N/A 82 | 83 | # model_name: The device model name can be specified here. 84 | # It is not used by the ioHub, so is FYI only. 85 | # 86 | model_name: N/A 87 | 88 | # model_number: The device model number can be specified here. 89 | # It is not used by the ioHub, so is FYI only. 90 | # 91 | model_number: N/A 92 | 93 | # software_version: The device driver and / or SDK software version number. 94 | # This field is not used by ioHub, so is FYI only. 95 | # 96 | software_version: N/A 97 | 98 | # hardware_version: The device's hardware version can be specified here. 99 | # It is not used by the ioHub, so is FYI only. 100 | # 101 | hardware_version: N/A 102 | 103 | # firmware_version: If the device has firmware, its revision number 104 | # can be indicated here. It is not used by the ioHub, so is FYI only. 105 | # 106 | firmware_version: N/A -------------------------------------------------------------------------------- /iohub/devices/mouse/linux2.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Thu Apr 11 18:52:59 2013 4 | 5 | @author: isolver 6 | """ 7 | 8 | from ctypes import cdll 9 | from . import MouseDevice 10 | from ... import print2err 11 | from .. import Computer 12 | 13 | currentSec=Computer.getTime 14 | 15 | class Mouse(MouseDevice): 16 | """ 17 | The Mouse class and related events represent a standard computer mouse device 18 | and the events a standard mouse can produce. Mouse position data is mapped to 19 | the coordinate space defined in the ioHub configuration file for the Display. 20 | """ 21 | 22 | _xdll=None 23 | _xfixsdll=None 24 | _xdisplay=None 25 | _xscreen_count=None 26 | 27 | __slots__=['_cursorVisible'] 28 | def __init__(self,*args,**kwargs): 29 | MouseDevice.__init__(self,*args,**kwargs['dconfig']) 30 | 31 | self._cursorVisible=True 32 | 33 | if Mouse._xdll is None: 34 | Mouse._xdll = cdll.LoadLibrary('libX11.so') 35 | Mouse._xdisplay = self._xdll.XOpenDisplay(None) 36 | Mouse._xscreen_count = self._xdll.XScreenCount(self._xdisplay) 37 | try: 38 | Mouse._xfixsdll=cdll.LoadLibrary('libXfixes.so') 39 | except: 40 | Mouse._xfixsdll=None 41 | 42 | if self._display_device and self._display_device._xwindow is None: 43 | self._display_device._xwindow= self._xdll.XRootWindow(Mouse._xdisplay, self._display_device.getIndex()) 44 | 45 | def _nativeSetMousePos(self,px,py): 46 | Mouse._xdll.XWarpPointer(Mouse._xdisplay,None,self._display_device._xwindow,0,0,0,0,int(px),int(py)) 47 | Mouse._xdll.XFlush(Mouse._xdisplay); 48 | 49 | def _nativeGetSystemCursorVisibility(self): 50 | return self._cursorVisible 51 | 52 | def _nativeSetSystemCursorVisibility(self,v): 53 | if Mouse._xfixsdll is None: 54 | print2err("Xfixes DLL could not be loaded. Cursor visiblity support is unavailable.") 55 | return True 56 | 57 | if v is True and self._nativeGetSystemCursorVisibility() is False: 58 | Mouse._xfixsdll.XFixesShowCursor(Mouse._xdisplay,self._display_device._xwindow) 59 | Mouse._xfixsdll.XFlush(Mouse._xdisplay) 60 | self._cursorVisible=True 61 | elif v is False and self._nativeGetSystemCursorVisibility() is True: 62 | Mouse._xfixsdll.XFixesHideCursor(Mouse._xdisplay,self._display_device._xwindow) 63 | Mouse._xfixsdll.XFlush(Mouse._xdisplay) 64 | self._cursorVisible=False 65 | 66 | return self._nativeGetSystemCursorVisibility() 67 | 68 | def _nativeLimitCursorToBoundingRect(self,clip_rect): 69 | print2err('WARNING: Mouse._nativeLimitCursorToBoundingRect not implemented on Linux yet.') 70 | native_clip_rect=None 71 | return native_clip_rect 72 | 73 | 74 | def _nativeEventCallback(self,event): 75 | try: 76 | if self.isReportingEvents(): 77 | logged_time=currentSec() 78 | 79 | event_array=event[0] 80 | event_array[3]=Computer._getNextEventID() 81 | 82 | display_index=self._display_device.getIndex() 83 | x,y=self._display_device._pixel2DisplayCoord(event_array[15],event_array[16],display_index) 84 | event_array[15]=x 85 | event_array[16]=y 86 | 87 | self._lastPosition=self._position 88 | self._position=x,y 89 | 90 | self._last_display_index=self._display_index 91 | self._display_index=display_index 92 | 93 | bstate=event_array[-10] 94 | bnum=event_array[-9] 95 | 96 | if bnum is not MouseConstants.MOUSE_BUTTON_NONE: 97 | self.activeButtons[bnum]= int(bstate==True) 98 | 99 | self._scrollPositionY= event_array[-2] 100 | 101 | 102 | self._addNativeEventToBuffer(event_array) 103 | 104 | self._last_callback_time=logged_time 105 | except: 106 | printExceptionDetailsToStdErr() 107 | 108 | # Must return original event or no mouse events will get to OSX! 109 | return 1 110 | 111 | def _getIOHubEventObject(self,native_event_data): 112 | return native_event_data 113 | 114 | def _close(self): 115 | if Mouse._xdll: 116 | if Mouse._xfixsdll and self._nativeGetSystemCursorVisibility() is False: 117 | Mouse._xfixsdll.XFixesShowCursor(Mouse._xdisplay,self._display_device._xwindow) 118 | Mouse._xdll.XCloseDisplay(Mouse._xdisplay) 119 | Mouse._xdll=None 120 | Mouse._xfixsdll=None 121 | Mouse._xdisplay=None 122 | Mouse._xscreen_count=None 123 | 124 | try: 125 | self._display_device._xwindow=None 126 | except: 127 | pass 128 | -------------------------------------------------------------------------------- /iohub/devices/mouse/supported_config_settings.yaml: -------------------------------------------------------------------------------- 1 | Mouse: 2 | enable: IOHUB_BOOL 3 | name: 4 | IOHUB_STRING: 5 | min_length: 1 6 | max_length: 32 7 | first_char_alpha: True 8 | save_events: IOHUB_BOOL 9 | stream_events: IOHUB_BOOL 10 | auto_report_events: IOHUB_BOOL 11 | event_buffer_length: 12 | IOHUB_INT: 13 | min: 1 14 | max: 2048 15 | monitor_event_types: 16 | IOHUB_LIST: 17 | valid_values: [MouseMoveEvent,MouseDragEvent, MouseScrollEvent, MouseButtonPressEvent, MouseButtonReleaseEvent, MouseMultiClickEvent] 18 | min_length: 0 19 | max_length: 6 20 | device_number: 21 | IOHUB_INT: 22 | min: 0 23 | max: 32 24 | model_name: 25 | IOHUB_STRING: 26 | min_length: 1 27 | max_length: 32 28 | model_number: 29 | IOHUB_STRING: 30 | min_length: 1 31 | max_length: 16 32 | manufacturer_name: 33 | IOHUB_STRING: 34 | min_length: 1 35 | max_length: 64 36 | serial_number: 37 | IOHUB_STRING: 38 | min_length: 1 39 | max_length: 32 40 | manufacture_date: IOHUB_DATE 41 | software_version: 42 | IOHUB_STRING: 43 | min_length: 1 44 | max_length: 8 45 | hardware_version: 46 | IOHUB_STRING: 47 | min_length: 1 48 | max_length: 8 49 | firmware_version: 50 | IOHUB_STRING: 51 | min_length: 1 52 | max_length: 8 53 | -------------------------------------------------------------------------------- /iohub/devices/supported_config_settings.yaml: -------------------------------------------------------------------------------- 1 | Device: 2 | enable: IOHUB_BOOL 3 | name: 4 | IOHUB_STRING: 5 | min_length: 1 6 | max_length: 32 7 | first_char_alpha: True 8 | save_events: IOHUB_BOOL 9 | stream_events: IOHUB_BOOL 10 | auto_report_events: IOHUB_BOOL 11 | device_timer: 12 | interval: 13 | IOHUB_FLOAT: 14 | min: 0.001 15 | max: 0.020 16 | event_buffer_length: 17 | IOHUB_INT: 18 | min: 1 19 | max: 2048 20 | monitor_event_types: 21 | IOHUB_LIST: 22 | valid_values: [ DeviceEvent,] 23 | min_length: 0 24 | max_length: 64 25 | device_number: 26 | IOHUB_INT: 27 | min: 0 28 | max: 32 29 | model_name: 30 | IOHUB_STRING: 31 | min_length: 1 32 | max_length: 32 33 | model_number: 34 | IOHUB_STRING: 35 | min_length: 1 36 | max_length: 16 37 | manufacturer_name: 38 | IOHUB_STRING: 39 | min_length: 1 40 | max_length: 64 41 | serial_number: 42 | IOHUB_STRING: 43 | min_length: 1 44 | max_length: 32 45 | manufacture_date: IOHUB_DATE 46 | software_version: 47 | IOHUB_STRING: 48 | min_length: 1 49 | max_length: 8 50 | hardware_version: 51 | IOHUB_STRING: 52 | min_length: 1 53 | max_length: 8 54 | firmware_version: 55 | IOHUB_STRING: 56 | min_length: 1 57 | max_length: 8 58 | -------------------------------------------------------------------------------- /iohub/devices/xinput/supported_config_settings.yaml: -------------------------------------------------------------------------------- 1 | xinput.Gamepad: 2 | enable: IOHUB_BOOL 3 | name: 4 | IOHUB_STRING: 5 | min_length: 1 6 | max_length: 32 7 | first_char_alpha: True 8 | device_number: 9 | IOHUB_INT: 10 | min: -1 11 | max: 3 12 | save_events: IOHUB_BOOL 13 | stream_events: IOHUB_BOOL 14 | auto_report_events: IOHUB_BOOL 15 | device_timer: 16 | interval: 17 | IOHUB_FLOAT: 18 | min: 0.001 19 | max: 0.020 20 | event_buffer_length: 21 | IOHUB_INT: 22 | min: 1 23 | max: 2048 24 | monitor_event_types: 25 | IOHUB_LIST: 26 | valid_values: [GamepadStateChangeEvent, GamepadDisconnectEvent] 27 | min_length: 0 28 | max_length: 2 29 | model_name: 30 | IOHUB_STRING: 31 | min_length: 1 32 | max_length: 32 33 | model_number: 34 | IOHUB_STRING: 35 | min_length: 1 36 | max_length: 16 37 | manufacturer_name: 38 | IOHUB_STRING: 39 | min_length: 1 40 | max_length: 64 41 | serial_number: 42 | IOHUB_STRING: 43 | min_length: 1 44 | max_length: 32 45 | manufacture_date: IOHUB_DATE 46 | software_version: 47 | IOHUB_STRING: 48 | min_length: 1 49 | max_length: 8 50 | hardware_version: 51 | IOHUB_STRING: 52 | min_length: 1 53 | max_length: 8 54 | firmware_version: 55 | IOHUB_STRING: 56 | min_length: 1 57 | max_length: 8 -------------------------------------------------------------------------------- /iohub/devices/xinput/xinput.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ioHub Python Module 4 | .. file: ioHub/devices/xinput/xinput.py 5 | 6 | fileauthor: Sol Simpson 7 | 8 | Copyright (C) 2012-2013 iSolver Software Solutions 9 | Distributed under the terms of the GNU General Public License 10 | (GPL version 3 or any later version). 11 | 12 | .. moduleauthor:: Sol Simpson + 13 | contributors, please see credits section of documentation. 14 | """ 15 | 16 | from xinput_h import * 17 | from math import sqrt 18 | import ctypes,ctypes.wintypes 19 | from ctypes.wintypes import DWORD, pointer 20 | from .. import Computer 21 | 22 | # 23 | ## XInput Functions 24 | # 25 | 26 | global _xinput_dll 27 | 28 | def loadDLL(): 29 | global _xinput_dll 30 | _xinput_dll=getattr(ctypes.windll,XINPUT_DLL) 31 | 32 | def createXInputGamePadState(user_id): 33 | global _xinput_dll 34 | gamepadState=XINPUT_STATE(DWORD(0),XINPUT_GAMEPAD(0,0,0,0,0,0,0)) 35 | t1=Computer.getTime() 36 | dwResult=_xinput_dll.XInputGetState(user_id, pointer(gamepadState)) 37 | t2=Computer.getTime() 38 | ci=t2-t1 39 | return dwResult, gamepadState, t2, ci 40 | 41 | def normalizeThumbStickValues(X,Y,INPUT_DEADZONE): 42 | #determine how far the controller is pushed 43 | magnitude = sqrt(X*X + Y*Y) 44 | 45 | normalizedX=0 46 | normalizedY=0 47 | 48 | if magnitude != 0: 49 | #determine the direction the controller is pushed 50 | normalizedX = X / magnitude; 51 | normalizedY = Y / magnitude; 52 | 53 | normalizedMagnitude = 0; 54 | 55 | #check if the controller is outside a circular dead zone 56 | if (magnitude > INPUT_DEADZONE): 57 | 58 | #clip the magnitude at its expected maximum value 59 | if (magnitude > 32767.0): 60 | magnitude = 32767.0; 61 | 62 | #adjust magnitude relative to the end of the dead zone 63 | magnitude -= INPUT_DEADZONE; 64 | 65 | # normalize the magnitude with respect to its expected range 66 | # giving a magnitude value of 0.0 to 1.0 67 | normalizedMagnitude = magnitude / (32767.0 - INPUT_DEADZONE) 68 | 69 | return normalizedX,normalizedY,normalizedMagnitude 70 | 71 | else: #if the controller is in the deadzone zero out the magnitude 72 | magnitude = 0.0 73 | normalizedMagnitude = 0.0 74 | return 0,0,0 75 | 76 | ############################################################################## 77 | # 78 | # Not yet Implemented...... 79 | # 80 | ## return DWORD 81 | #def XInputGetDSoundAudioDeviceGuids( 82 | # dwUserIndex, # (DWORD)Index of the gamer associated with the device 83 | # pDSoundRenderGuid, # (GUID*) DSound device ID for render 84 | # pDSoundCaptureGuid # (GUID*) DSound device ID for capture 85 | # ): 86 | # pass 87 | # 88 | #if XINPUT_USE_9_1_0 is False: 89 | # 90 | # 91 | # 92 | # # returns DWORD 93 | # def XInputGetKeystroke( 94 | # dwUserIndex, # (DWORD) Index of the gamer associated with the device 95 | # dwReserved, # (DWORD) Reserved for future use 96 | # pKeystroke # (PXINPUT_KEYSTROKE )Pointer to an XINPUT_KEYSTROKE structure that receives an input event. 97 | # ): 98 | # pass -------------------------------------------------------------------------------- /iohub/net.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ioHub 4 | .. file: ioHub/client.py 5 | 6 | Copyright (C) 2012-2013 iSolver Software Solutions 7 | Distributed under the terms of the GNU General Public License (GPL version 3 or any later version). 8 | 9 | .. moduleauthor:: Sol Simpson + contributors, please see credits section of documentation. 10 | .. fileauthor:: Sol Simpson 11 | """ 12 | 13 | from gevent import socket 14 | import msgpack 15 | import struct 16 | 17 | MAX_PACKET_SIZE=64*1024 18 | 19 | class SocketConnection(object): 20 | def __init__(self,local_host=None,local_port=None,remote_host=None,remote_port=None,rcvBufferLength=1492, broadcast=False, blocking=0, timeout=0): 21 | self._local_port= local_port 22 | self._local_host = local_host 23 | self._remote_host= remote_host 24 | self._remote_port = remote_port 25 | self._rcvBufferLength=rcvBufferLength 26 | self.lastAddress=None 27 | self.sock=None 28 | self.initSocket() 29 | 30 | self.coder=msgpack 31 | self.packer=msgpack.Packer() 32 | self.unpacker=msgpack.Unpacker(use_list=True) 33 | self.pack=self.packer.pack 34 | self.feed=self.unpacker.feed 35 | self.unpack=self.unpacker.unpack 36 | 37 | def initSocket(self,broadcast=False,blocking=0, timeout=0): 38 | self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 39 | 40 | if broadcast is True: 41 | self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) 42 | self.sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, struct.pack('@i', 1)) 43 | 44 | if blocking is not 0: 45 | self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 46 | 47 | self.sock.settimeout(timeout) 48 | self.sock.setblocking(blocking) 49 | 50 | def sendTo(self,data,address=None): 51 | if address is None: 52 | address=self._remote_host, self._remote_port 53 | d=self.pack(data) 54 | byte_count=len(d)+2 55 | self.sock.sendto(d+'\r\n',address) 56 | return byte_count 57 | 58 | def receive(self): 59 | try: 60 | data, address = self.sock.recvfrom(self._rcvBufferLength) 61 | self.lastAddress=address 62 | self.feed(data[:-2]) 63 | result=self.unpack() 64 | if result[0] == 'IOHUB_MULTIPACKET_RESPONSE': 65 | num_packets=result[1] 66 | 67 | for p in xrange(num_packets-1): 68 | data, address = self.sock.recvfrom(self._rcvBufferLength) 69 | self.feed(data) 70 | 71 | data, address = self.sock.recvfrom(self._rcvBufferLength) 72 | self.feed(data[:-2]) 73 | result=self.unpack() 74 | return result,address 75 | except Exception as e: 76 | print "Error during SocketConnection.receive: ",e 77 | raise e 78 | 79 | def close(self): 80 | self.sock.close() 81 | 82 | 83 | class UDPClientConnection(SocketConnection): 84 | def __init__(self,remote_host='127.0.0.1',remote_port=9000,rcvBufferLength = MAX_PACKET_SIZE,broadcast=False,blocking=1, timeout=1): 85 | SocketConnection.__init__(self,remote_host=remote_host,remote_port=remote_port,rcvBufferLength=rcvBufferLength,broadcast=broadcast,blocking=blocking, timeout=timeout) 86 | def initSocket(self,**kwargs): 87 | self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 88 | self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, MAX_PACKET_SIZE) 89 | -------------------------------------------------------------------------------- /iohub/ordereddict.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Raymond Hettinger 2 | # 3 | # Permission is hereby granted, free of charge, to any person 4 | # obtaining a copy of this software and associated documentation files 5 | # (the "Software"), to deal in the Software without restriction, 6 | # including without limitation the rights to use, copy, modify, merge, 7 | # publish, distribute, sublicense, and/or sell copies of the Software, 8 | # and to permit persons to whom the Software is furnished to do so, 9 | # subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be 12 | # included in all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 16 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21 | # OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | from UserDict import DictMixin 24 | 25 | class OrderedDict(dict, DictMixin): 26 | 27 | def __init__(self, *args, **kwds): 28 | if len(args) > 1: 29 | raise TypeError('expected at most 1 arguments, got %d' % len(args)) 30 | try: 31 | self.__end 32 | except AttributeError: 33 | self.clear() 34 | self.update(*args, **kwds) 35 | 36 | def clear(self): 37 | self.__end = end = [] 38 | end += [None, end, end] # sentinel node for doubly linked list 39 | self.__map = {} # key --> [key, prev, next] 40 | dict.clear(self) 41 | 42 | def __setitem__(self, key, value): 43 | if key not in self: 44 | end = self.__end 45 | curr = end[1] 46 | curr[2] = end[1] = self.__map[key] = [key, curr, end] 47 | dict.__setitem__(self, key, value) 48 | 49 | def __delitem__(self, key): 50 | dict.__delitem__(self, key) 51 | key, prev, next = self.__map.pop(key) 52 | prev[2] = next 53 | next[1] = prev 54 | 55 | def __iter__(self): 56 | end = self.__end 57 | curr = end[2] 58 | while curr is not end: 59 | yield curr[0] 60 | curr = curr[2] 61 | 62 | def __reversed__(self): 63 | end = self.__end 64 | curr = end[1] 65 | while curr is not end: 66 | yield curr[0] 67 | curr = curr[1] 68 | 69 | def popitem(self, last=True): 70 | if not self: 71 | raise KeyError('dictionary is empty') 72 | if last: 73 | key = reversed(self).next() 74 | else: 75 | key = iter(self).next() 76 | value = self.pop(key) 77 | return key, value 78 | 79 | def __reduce__(self): 80 | items = [[k, self[k]] for k in self] 81 | tmp = self.__map, self.__end 82 | del self.__map, self.__end 83 | inst_dict = vars(self).copy() 84 | self.__map, self.__end = tmp 85 | if inst_dict: 86 | return (self.__class__, (items,), inst_dict) 87 | return self.__class__, (items,) 88 | 89 | def keys(self): 90 | return list(self) 91 | 92 | setdefault = DictMixin.setdefault 93 | update = DictMixin.update 94 | pop = DictMixin.pop 95 | values = DictMixin.values 96 | items = DictMixin.items 97 | iterkeys = DictMixin.iterkeys 98 | itervalues = DictMixin.itervalues 99 | iteritems = DictMixin.iteritems 100 | 101 | def __repr__(self): 102 | if not self: 103 | return '%s()' % (self.__class__.__name__,) 104 | return '%s(%r)' % (self.__class__.__name__, self.items()) 105 | 106 | def copy(self): 107 | return self.__class__(self) 108 | 109 | @classmethod 110 | def fromkeys(cls, iterable, value=None): 111 | d = cls() 112 | for key in iterable: 113 | d[key] = value 114 | return d 115 | 116 | def __eq__(self, other): 117 | if isinstance(other, OrderedDict): 118 | if len(self) != len(other): 119 | return False 120 | for p, q in zip(self.items(), other.items()): 121 | if p != q: 122 | return False 123 | return True 124 | return dict.__eq__(self, other) 125 | 126 | def __ne__(self, other): 127 | return not self == other 128 | -------------------------------------------------------------------------------- /iohub/ordereddict_LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 Raymond Hettinger 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation files 5 | (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, 7 | publish, distribute, sublicense, and/or sell copies of the Software, 8 | and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 16 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21 | OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /iohub/timebase.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Sun Apr 28 08:10:06 2013 4 | 5 | @author: Sol 6 | """ 7 | from __future__ import division 8 | 9 | 10 | import sys 11 | 12 | psychopy_available=False 13 | try: 14 | import psychopy 15 | import psychopy.clock 16 | psychopy_available=True 17 | except: 18 | pass 19 | 20 | #: The getTime() function returns the heigh resolution clock time that is 21 | #: being used by ioHub (and PsychoPy). The getTime() function returns the 22 | #: the time **without** applying an offset, as is done withe the actual time base 23 | #: used by ioHub and PsychoPy. Therefore this function should rarely be called directly. 24 | #: Instead get the current time by calling the ioHub Computer.getTime() method, 25 | #: or the psychopy..logging.defaultClock.getTime() method. 26 | getTime=lambda x: x 27 | 28 | monotonicClock=None 29 | if psychopy_available: 30 | # Get abosolute time base 31 | getTime=psychopy.clock.getTime 32 | # Get the MonotonicClock Class 33 | MonotonicClock = psychopy.clock.MonotonicClock 34 | # Get the default instance of the MonotonicClock class 35 | monotonicClock = psychopy.clock.monotonicClock 36 | else: 37 | # Select the timer to use as the ioHub high resolution time base. Selection 38 | # is based on OS and Python version. 39 | # 40 | # Three requirements exist for the ioHub time base implementation: 41 | # A) The Python interpreter does not apply an offset to the times returned 42 | # based on when the timer module being used was loaded or when the timer 43 | # fucntion first called was first called. 44 | # B) The timer implementation used must be monotonic and report elapsed time 45 | # between calls, 'not' system or CPU usage time. 46 | # C) The timer implementation must provide a resolution of 50 usec or better. 47 | # 48 | # Given the above requirements, ioHub selects a timer implementation as follows: 49 | # 1) On Windows, the Windows Query Performance Counter API is used using ctypes access. 50 | # 2) On other OS's, if the Python version being used is 2.6 or lower, 51 | # time.time is used. For Python 2.7 and above, the timeit.default_timer 52 | # function is used. 53 | if sys.platform == 'win32': 54 | global _fcounter, _qpfreq, _winQPC 55 | from ctypes import byref, c_int64, windll 56 | _fcounter = c_int64() 57 | _qpfreq = c_int64() 58 | windll.Kernel32.QueryPerformanceFrequency(byref(_qpfreq)) 59 | _qpfreq=float(_qpfreq.value) 60 | _winQPC=windll.Kernel32.QueryPerformanceCounter 61 | 62 | def getTime(): 63 | _winQPC(byref(_fcounter)) 64 | return _fcounter.value/_qpfreq 65 | else: 66 | cur_pyver = sys.version_info 67 | if cur_pyver[0]==2 and cur_pyver[1]<=6: 68 | import time 69 | getTime = time.time 70 | else: 71 | import timeit 72 | getTime = timeit.default_timer 73 | 74 | class MonotonicClock: 75 | """ 76 | A convenient class to keep track of time in your experiments. 77 | When a MonotonicClock is created, it stores the current time 78 | from getTime and uses this as an offset for psychopy times returned. 79 | """ 80 | def __init__(self,start_time=None): 81 | if start_time is None: 82 | self._timeAtLastReset=getTime()#this is sub-millisec timer in python 83 | else: 84 | self._timeAtLastReset=start_time 85 | 86 | def getTime(self): 87 | """Returns the current time on this clock in secs (sub-ms precision) 88 | """ 89 | return getTime()-self._timeAtLastReset 90 | 91 | def getLastResetTime(self): 92 | """ 93 | Returns the current offset being applied to the high resolution 94 | timebase used by Clock. 95 | """ 96 | return self._timeAtLastReset 97 | 98 | monotonicClock = psychopy.clock.MonotonicClock 99 | -------------------------------------------------------------------------------- /iohub/util/exception_tools.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Sun Apr 28 10:04:59 2013 4 | 5 | @author: Sol 6 | """ 7 | import sys 8 | 9 | def print2err(*args): 10 | for a in args: 11 | sys.stderr.write(u"{0}".format(a)) 12 | sys.stderr.write(u"\n") 13 | sys.stderr.flush() 14 | 15 | def printExceptionDetailsToStdErr(): 16 | import sys, traceback,pprint 17 | exc_type, exc_value, exc_traceback = sys.exc_info() 18 | pprint.pprint(exc_type, stream=sys.stderr, indent=1, width=80, depth=None) 19 | pprint.pprint(exc_value, stream=sys.stderr, indent=1, width=80, depth=None) 20 | pprint.pprint(traceback.format_tb(exc_traceback), stream=sys.stderr, indent=1, width=80, depth=None) 21 | 22 | class ioHubError(Exception): 23 | def __init__(self, *args, **kwargs): 24 | Exception.__init__(self, *args) 25 | self.args = args 26 | self.kwargs=kwargs 27 | 28 | def __str__(self): 29 | return repr(self) 30 | 31 | def __repr__(self): 32 | r="ioHubError:\nArgs: {0}\n".format(self.args) 33 | for k,v in self.kwargs.iteritems(): 34 | r+="\t{0}: {1}\n".format(k,v) 35 | return r 36 | 37 | class ioHubConnectionException(Exception): 38 | pass 39 | 40 | class ioHubServerError(Exception): 41 | def __init__(self, *args, **kwargs): 42 | Exception.__init__(self, *args, **kwargs) 43 | self.args = args 44 | self.kwargs=kwargs 45 | 46 | def __str__(self): 47 | return repr(self) 48 | 49 | def __repr__(self): 50 | r="ioHubServerError:\nArgs: {0}\n".format(self.args) 51 | for k,v in self.kwargs.iteritems(): 52 | r+="\t{0}: {1}\n".format(k,v) 53 | return r 54 | 55 | def createErrorResult(error_name,**kwargs): 56 | print2err( "IOHUB_SERVER_ERROR",error_name,kwargs) 57 | printExceptionDetailsToStdErr() 58 | return "IOHUB_SERVER_ERROR",error_name,kwargs 59 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Thu Apr 18 10:34:29 2013 4 | 5 | @author: Sol 6 | """ 7 | 8 | ### IMPORTANT: This setup file is not yet working completely. DO NOT USE YET. 9 | 10 | from setuptools import setup 11 | import iohub 12 | import sys 13 | 14 | print "setup.py is not yet working completely. DO NOT USE YET." 15 | print "For now, copy the 'iohub' dictectory within the ioHub source folder to your Python site-packages' folder, or other folder that is in your Python Path." 16 | print "Thank you for your patience." 17 | sys.exit(1) 18 | 19 | def readme(): 20 | with open('README.rst') as f: 21 | return f.read() 22 | 23 | def requiredDendancies(): 24 | deps = [ 'markdown', 'psychopy >= 1.76', 25 | 'greenlet >= 0.4.0', 'gevent >= 1.0.0', 'msgpack-python >= 0.3.0', 26 | 'numexpr >= 1.4.2', 'tables >= 2.3.1', 'pyYAML >= 3.0.8'] 27 | if sys.platform == 'win32': 28 | deps.append('psutil >= 0.6.1') 29 | deps.append('pyHook >= 1.5.1') 30 | elif sys.platform == 'linux2': 31 | deps.insert(0,'cython >= 0.1.7') 32 | deps.append('psutil >= 0.6.1') 33 | deps.append('python-xlib >= 0.1.5') 34 | elif sys.platform == 'linux2': 35 | deps.insert(0,'cython >= 0.1.7') 36 | deps.append('pyobjc >= 2.5.0') 37 | return deps 38 | 39 | setup(name='iohub', 40 | version=iohub.__version__, 41 | description='A cross-platform, operating system wide, device event reporting and storage framework.', 42 | long_description=readme(), 43 | classifiers=[ 44 | 'Development Status :: 4 - Beta', 45 | 'Operating System :: POSIX :: Linux', 46 | 'Operating System :: MacOS :: MacOS X', 47 | 'Operating System :: Microsoft :: Windows :: Windows 7', 48 | 'Operating System :: Microsoft :: Windows :: Windows XP', 49 | 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 50 | 'Programming Language :: Python :: Implementation :: CPython', 51 | 'Programming Language :: Python :: 2.6', 52 | 'Programming Language :: Python :: 2.7', 53 | 'Intended Audience :: Developers', 54 | 'Topic :: Software Development :: Libraries :: Python Modules', 55 | 'Topic :: Scientific/Engineering :: Human Machine Interfaces', 56 | 'Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator' 57 | ], 58 | url=iohub.__url__, 59 | author=iohub.__author__, 60 | author_email=iohub.__author_email__, 61 | packages=['iohub'], 62 | install_requires=requiredDendancies(), 63 | zip_safe=False) --------------------------------------------------------------------------------