.. _sample05: Sample 05: Custmizing calibration target motion ======================================================================= What does this sample do? -------------------------- By default, calibration target moves over 1.0 second and stays for 1.0 second at each target position during calibration/validation process. In version 0.6.0, this behavior can be customized by following new paramters in the TrackingTools configuration file. * CALTARGET_DURATION_PER_POS (default value = 2.0) * CALTARGET_MOTION_DURATION (default value = 1.0) Let 't' stand for time from the calibration target starts moving to the current calibration position. The range of t is 0` - :download:`Download source code (sample05_caltargetslow_PsychoPy.py)` Similar to Sample04, these sample performs only calibration. :func:`~GazeParser.TrackingTools.BaseController.setCalTargetMotionParams` and :func:`~GazeParser.TrackingTools.BaseController.setCalSampleAcquisitionParams` are called before starting calibration loop. .. code-block:: python :emphasize-lines: 3,4 #Jumping + getting samples immediately after jumping #Note: this setting is for demonstration. It is not recommended for actual use. tracker.setCalTargetMotionParams(durationPerPos=1.0, motionDuration=0.0) tracker.setCalSampleAcquisitionParams(numSamplesPerPos=30, getSampleDelay=0.0) msg.setText('durationPerPos=1.0, motionDuration=0.0\nnumSamplesPerPos=30, getSampleDelay=0.0\n\n(for demonstration only)') msg.draw() win.flip() psychopy.event.waitKeys() tracker.calibrationLoop() Probably, quite poor calibration results will be obtained when running sample05_caltargetjump_PsychoPy.py. Figure 2 shows a typical result obtained by sample05_caltargetjump_PsychoPy.py. .. figure:: sample05_002.png Figure 2 The origin of such a poor result is extremely short (0.0 second!) getSampleDelay. In Figure 2, sample acquisition started during saccadic eye movement toward the calibration target (Figure 3). It would be safe to set 0.2-0.4 seconds as getSampleDelay especially when target motion is very quick. .. figure:: sample05_003.png Figure 3 Codes (VisionEgg) ------------------ .. note:: * VisionEgg backend is no longer supported by 0.11.0 or later. - :download:`Download source code (sample05_caltargetjump_VisionEgg.py)` - :download:`Download source code (sample05_caltargetslow_VisionEgg.py)` Please read comments on the codes for PsychoPy.