Screen Module
- class Screen(const)
A class to create a screen for the experiment
- Parameters:
const – local constants.py module (see example_experiment/constants.py) as example
- check_mark(color='green', flip=True)
A method to draw a check mark on the screen
- Parameters:
color (str) – color of the check mark
flip – whether to flip the screen after drawing the check mark
- error_cross(color='red', flip=True)
A method to draw an error cross on the screen
- Parameters:
color (str) – color of the error cross
flip – whether to flip the screen after drawing the error cross
- fixation_cross(color='white', flip=True)
A method to draw a fixation cross on the screen
- Parameters:
color (str) – color of the fixation cross
flip – whether to flip the screen after drawing the fixation cross
- flip(marker=False, clock=None)
Flip the window, optionally leaving a photodiode / MEG-timing marker.
Behaves like
self.window.flip()but adds two things needed for MEG/EEG (or any hardware) timing:marker=Truedraws the photodiode square (self.pd_square) white in a screen corner on this flip. A photodiode taped over that corner then records the true stimulus onset directly into the MEG/EEG file.clock(e.g.ttl_clock.clock) is used to timestamp the flip viacallOnFlip; the time is stored and returned so the caller can log it (theflip_timecolumn) for alignment with the recording.
- Parameters:
marker (bool) – if True, flash the photodiode square on this flip.
clock (psychopy.core.Clock or None) – clock to timestamp the flip on.
- Returns:
float or None – time of the flip on
clock(None if no clock given).
- start_screen(color='white')
A method to draw a start screen on the screen
- store_flip_time(clock)
callOnFlip callback: capture the flip time right after the buffer swap.