Closed thartbm closed 7 months ago
Using iohub I can change the background colour at least:
eyetracker_config['model_name'] = 'EYELINK 1000 DESKTOP'
eyetracker_config['runtime_settings'] = dict(sampling_rate=1000, track_eyes='BOTH')
eyetracker_config['calibration'] = dict(screen_background_color=col_back)
devices_config['eyetracker.hw.sr_research.eyelink.EyeTracker'] = eyetracker_config
It's a dictionary so there are potentially other parameters (such as dot colour) but that's the only one I know.
OK, this means that we want to pass the experiment colors to the eyetracker object, through the localizeSetup functions. Working on this.
The file EyeLinkCoreGraphicsPsychoPy.py
sets the colors of the calibration dots to be equal to the foreground color (outer part) and the background color (inner part). This happens in lines 332 and 339 (in my version at least). So I guess that's the room we have to play with things. We could have the background as in the experiment (that orangy [0.5, 0.5, -1]
) and then have some other foreground color (white, black, 'both'), but no more colors then that.
Yes sounds good, we can see what that looks like.
I see you copied the line
eyetracker_config['calibration'] = dict(screen_background_color=colors['col_back'])
This won't work here though because 'colors' is not defined in this context. I can hardcode it for now as
eyetracker_config['calibration'] = dict(screen_background_color=[0.5, 0.5, -1])
Which removes the error, but still doesn't change background color during calibration (it's still grey)
self.colors
should be defined... I forgot the self part. The thing is that I set the calibration dict several times, such that only the last one would have had any effect. Now making a full dictionary with all properties we're interested in before inserting it in the main settings thing for IoHub.
This includes an attempt at setting the size of the calibration dots to be exactly as large as the ones I used for the LiveTrack. This could be tested now.
Still need to set the area they use to be restricted to the middle 33% of the screen.
Colors are done. Closing this issue.
How can we do this?