Skip to content

Commit

Permalink
Merge pull request #3698 from isolver/enh-iohub-calib-color-unit-types
Browse files Browse the repository at this point in the history
ENH: iohub calibration graphics can use experiment window color space
  • Loading branch information
isolver committed Mar 29, 2021
2 parents 80d8e74 + 10adc3d commit c0cce66
Show file tree
Hide file tree
Showing 25 changed files with 301 additions and 574 deletions.
Expand Up @@ -2,6 +2,7 @@ monitor_devices:
- Display:
name: display
reporting_unit_type: pix
color_space: rgb255
device_number: 0
physical_dimensions:
width: 590
Expand Down Expand Up @@ -101,7 +102,7 @@ monitor_devices:
# inner_diameter: 6
# outer_color: [255,255,255]
# inner_color: [0,0,0]
# model_name: EYELINK 1000 TOWER
# model_name: EYELINK 1000 DESKTOP

# Tobii Config (uncomment below device config to use)
# - eyetracker.hw.tobii.EyeTracker:
Expand All @@ -113,7 +114,7 @@ monitor_devices:
# # name will be considered as possible candidates for connection.
# # If you only have one Tobii system connected to the computer,
# # this field can just be left empty.
# model_name:
# model_name: Any Pro Model
#
# # The serial number of the Tobii device that you wish to connect to.
# # If set, only the Tobii system matching that serial number will be
Expand Down
Expand Up @@ -2,6 +2,7 @@ monitor_devices:
- Display:
name: display
reporting_unit_type: pix
color_space: rgb
device_number: 0
physical_dimensions:
width: 590
Expand Down
Expand Up @@ -150,7 +150,7 @@ monitor_devices:
# should be a value between 0 and 255. 0 == black, 255 == white. In general
# the last value of the color list (alpha) can be left at 255, indicating
# the color not mixed with the background color at all.
screen_background_color: [128,128,128]
screen_background_color: [0.0, 0.0, 0.0]

# target type defines what form of calibration graphic should be used
# during calibration, validation, etc. modes.
Expand All @@ -166,8 +166,8 @@ monitor_devices:
# outer_diameter and inner_diameter are specified in pixels
outer_diameter: 33
inner_diameter: 6
outer_color: [255,255,255]
inner_color: [0,0,0]
outer_color: [1.0, 1.0, 1.0]
inner_color: [-1.0, -1.0, -1.0]

# The model_name setting allows the definition of the eye tracker model being used.
# For the eyelink implementation, valid values are:
Expand Down
Expand Up @@ -11,7 +11,7 @@ monitor_devices:
# The model name of the Tobii device that you wish to connect to can be specified here,
# and only Tobii systems matching that model name will be considered as possible candidates for connection.
# If you only have one Tobii system connected to the computer, this field can just be left empty.
model_name:
model_name: Any Pro Model

# The serial number of the Tobii device that you wish to connect to can be specified here,
# and only the Tobii system matching that serial number will be connected to, if found.
Expand Down Expand Up @@ -42,7 +42,7 @@ monitor_devices:
# screen_background_color specifies the r,g,b background color to
# set the calibration, validation, etc, screens to. Each element of the color
# should be a value between 0 and 255. 0 == black, 255 == white.
screen_background_color: [128,128,128]
screen_background_color: [0, 0, 0]

# Target type defines what form of calibration graphic should be used
# during calibration, validation, etc. modes.
Expand All @@ -56,13 +56,13 @@ monitor_devices:
target_attributes:
outer_diameter: 35
outer_stroke_width: 2
outer_fill_color: [128,128,128]
outer_line_color: [255,255,255]
outer_fill_color: [0,0,0]
outer_line_color: [1,1,1]
inner_diameter: 7
inner_stroke_width: 1
inner_color: [0,0,0]
inner_fill_color: [0,0,0]
inner_line_color: [0,0,0]
inner_color: [-1,-1,-1]
inner_fill_color: [-1,-1,-1]
inner_line_color: [-1,-1,-1]
animate:
enable: True
movement_velocity: 600.0 # 500 pix / sec
Expand Down
Expand Up @@ -2,6 +2,7 @@ data_store:
enable: true
monitor_devices:
- Display:
color_space: named
default_eye_distance:
surface_center: 500
unit_type: mm
Expand All @@ -19,22 +20,46 @@ monitor_devices:
name: mouse
- Experiment:
name: experimentRuntime
- eyetracker.hw.mouse.EyeTracker:
controls:
blink:
- LEFT_BUTTON
- RIGHT_BUTTON
move: RIGHT_BUTTON
saccade_threshold: 0.5
- eyetracker.hw.sr_research.eyelink.EyeTracker:
calibration:
auto_pace: true
pacing_speed: 1.5
screen_background_color: grey
target_attributes:
inner_color: black
inner_diameter: 6
outer_color: dfgsdfgsdfgsd
outer_diameter: 33
target_type: CIRCLE_TARGET
type: NINE_POINTS
default_native_data_file_name: et_data
device_timer:
interval: 0.001
enable: true
enable_interface_without_connection: false
event_buffer_length: 1024
model_name: EYELINK 1000 DESKTOP
monitor_event_types:
- MonocularEyeSampleEvent
- BinocularEyeSampleEvent
- FixationStartEvent
- FixationEndEvent
- SaccadeStartEvent
- SaccadeEndEvent
- BlinkStartEvent
- BlinkEndEvent
name: tracker
network_settings: 100.1.1.1
runtime_settings:
sampling_rate: 50
sample_filtering:
FILTER_FILE: FILTER_LEVEL_2
FILTER_ONLINE: FILTER_OFF
sampling_rate: 500
track_eyes: RIGHT_EYE
vog_settings:
pupil_center_algorithm: CENTROID_FIT
pupil_measure_types: PUPIL_AREA
tracking_mode: PUPIL_CR_TRACKING
save_events: true
simulation_mode: false
stream_events: true
Expand Up @@ -73,7 +73,7 @@ def run(selected_eyetracker_name):
instructions_text_stim = visual.TextStim(
window, text='', pos=[0, 0], height=24,
color=[-1, -1, -1], colorSpace='rgb',
wrapWidth=window.size[0] * .9
wrapWidth=window.size[0] * .9, units='pix'
)

# Update Instruction Text and display on screen.
Expand Down
2 changes: 1 addition & 1 deletion psychopy/demos/coder/iohub/launchHub.py
Expand Up @@ -67,7 +67,7 @@ def testUsingPsychoPyMonitorConfig():
print('Display Default Eye Distance: ', display.getDefaultEyeDistance())
print('Display Physical Dimensions: ', display.getPhysicalDimensions())

# That's it, shut down the ioHub Proicess and exit. ;)
# That's it, shut down the ioHub Process and exit. ;)
io.quit()

def testEnabledDataStore():
Expand Down
74 changes: 0 additions & 74 deletions psychopy/iohub/TODO.txt

This file was deleted.

20 changes: 20 additions & 0 deletions psychopy/iohub/changes.txt
@@ -0,0 +1,20 @@
Changes made to iohub for 2021.2 Release
----------------------------------------

- Removed iohub ExpRuntime class (use iohub.launchHubServer() function)
- Some eye tracker setting haves may have changed. If running an experiment created with a previous version of iohub,
please review your eye tracker settings and update as necessary.
- Do we need to list every specific setting change?
- iohub can no longer be copied out of the psychopy package and used as a stand alone package
in your site-packages folder. Change `import iohub` to `import psychopy.iohub` for example.
- Removed most device settings related to device hardware specifics (model_id, manfacture_date, etc)
since they were never really used.
- removed use of .iohpid
- ** Changed datastore schema:
- increased experiment and session data string max length
- Added wintab device for Wacom based digital pens. (Windows only)
- Added iohub MouseGaze eye tracker simulator.
- Added 'color_space' setting to Display (bridging to remove Display class from iohub)
- Eyelink and tobii calibration gfx can now use same color space as window instead of always rgb255.
- TODO: Retest all eyetracking examples with all eye trackers on all OS's
- Removed iohub/devices/display/unit_conversions.py. Moving to psychopy monitorutil functions.

0 comments on commit c0cce66

Please sign in to comment.