BaseCalibrationSession
BaseCalibrationSession(
win,
infant_stims,
audio=None,
anim_type='zoom',
visualization_style='lines',
)Base class with common functionality for both calibration types.
This abstract base class provides shared calibration functionality for both Tobii hardware-based and mouse-based simulation calibration sessions. It handles visual presentation, user interaction, animation, and result visualization while delegating hardware-specific data collection to subclasses.
The class implements an infant-friendly calibration protocol with animated stimuli, optional audio feedback, and interactive point selection. It provides a consistent interface for calibration regardless of whether real eye tracking hardware or mouse simulation is being used.
Methods
| Name | Description |
|---|---|
| check_points | Ensure number of calibration points is within allowed range. |
| show_message_and_wait | Display a message on screen and in console, then wait for keypress. |
check_points
BaseCalibrationSession.check_points(calibration_points)Ensure number of calibration points is within allowed range.
Validates that the provided calibration points fall within the supported range for infant calibration protocols. Both Tobii and simulation modes support 2-9 calibration points.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| calibration_points | list | List of calibration point coordinates to validate. | required |
Raises
| Name | Type | Description |
|---|---|---|
| ValueError | If number of points is less than 2 or greater than 9. |
show_message_and_wait
BaseCalibrationSession.show_message_and_wait(body, title='', pos=(0, -0.15))Display a message on screen and in console, then wait for keypress.
Shows formatted message both in the PsychoPy window and console output, enforces a minimum display time for readability and system stabilization, then pauses execution until any key is pressed.
Parameters
| Name | Type | Description | Default | |
|---|---|---|---|---|
| body | <<<<<<< HEADstr | =======str | >>>>>>> origin/mainThe main message text to display. | required |
| title | <<<<<<< HEADstr | =======str | >>>>>>> origin/mainTitle for the message box. Default empty string. | '' |
| pos | <<<<<<< HEADtuple | =======tuple | >>>>>>> origin/mainPosition of the message box center on screen. Default (0, -0.15). | (0, -0.15) |