Welcome! Log In Create A New Profile

Advanced

Scene5 does not terminate on fixation break before transition to Scene6

Posted by mengcheng 
Scene5 does not terminate on fixation break before transition to Scene6
June 15, 2025 01:03PM
Hi Jaewon,

I'm using MonkeyLogic Version 2 with a condition file to run a behavioral task involving sequential fixation and choice phases. I encountered an issue where a fixation break at the end of a WaitThenHold scene (scene5) does not trigger a trial error as expected.

Task description:
In scene5, the monkey is required to fixate on a central white dot (fixation_point) for a given duration (delay) using the WaitThenHold adapter. Once the fixation hold is completed, the scene transitions to scene6, which presents left and right choice targets (hint1, hint2) using MultiTarget.

Expected behavior:
If the monkey breaks fixation on the white dot before delay is over (i.e., during scene5), the trial should terminate with an error.

Actual behavior:
As shown in the attached image, the monkey breaks fixation and starts making a saccade toward a choice target before the white dot disappears and scene6 starts. Surprisingly, scene5 does not report an error, and the trial proceeds into scene6 and is completed successfully.

Relevant code:
% Scene5 - central fixation
fix5 = SingleTarget(tracker);
fix5.Target = fixation_point;
fix5.Threshold = fixation_win_radius;
wth5 = WaitThenHold(fix5);
wth5.WaitTime = 0;
wth5.HoldTime = delay;
scene5 = create_scene(wth5, [layout1, layout2, cue1, cue2]);

% Scene6 - left/right choice
mul6 = MultiTarget(tracker);
mul6.Target = [hint1, hint2];
mul6.Threshold = fixation_win_radius;
mul6.WaitTime = wait_for_target;
mul6.HoldTime = hold_for_target;
mul6.TurnOffUnchosen = false;
scene6 = create_scene(mul6, [layout1, layout2]);

Stimuli definitions:
fixation_point: crc(0.3, [1 1 1], 1, 0, 0);
layout1: crc(0.6, [0.5 0.5 0.5], 0, 7, 0);
layout2: crc(0.6, [0.5 0.5 0.5], 0, -7, 0);
cue1: crc(0.5, [1 0 0], 1, 7, 0);
cue2: crc(0.5, [0 1 0], 1, -7, 0);
hint1: crc(0.5, [1 0 0], 1, 7, 0);
hint2: crc(0.5, [0 1 0], 1, -7, 0);

My question:
Why does the WaitThenHold adapter in scene5 not detect the fixation break and terminate the trial early?
Is there something I might be missing in how WaitThenHold or SingleTarget reports breaks?

Thank you in advance for your help!

MengCheng
Attachments:
open | download - Snipaste_2025-06-15_20-59-34.png (189.7 KB)
Re: Scene5 does not terminate on fixation break before transition to Scene6
June 16, 2025 03:34PM
With the partial code and a still image that you provided, I cannot figure out anything. Please show me the entire code and the data file. How often did you get the issue?
Hi Jaewon,

Thank you for your reply.

I've attached the full task code as well as a video file showing a trial where the issue occurs. The problem happens quite frequently—in approximately 50% of the trials where fixation is broken late during Scene5.

Just to give you a bit more context:
This behavioral task requires the monkey to first fixate on a central white dot. While maintaining central fixation, two peripheral cues—a red dot and a green dot—are presented sequentially. Once the white dot disappears, the monkey is expected to:
1.Saccade to the red dot’s previous location and hold fixation there for 70 ms
2.Return to the central fixation point and hold for 70 ms
3.Saccade to the green dot’s previous location and hold for 70 ms
4.Finally, return to the central fixation point and hold for 70 ms

The issue is that sometimes the monkey breaks central fixation and saccades toward the red dot before the white central dot disappears, during Scene5. According to the intended logic, this should count as a fixation break and result in a trial error. However, no error is reported, and the task proceeds into Scene6 and completes as if nothing went wrong.

When the video is played back in slow motion, this premature saccade is clearly visible, which confirms that the fixation was broken before Scene6 started.

I hope this detailed explanation, along with the attached files, will help clarify the situation. Please let me know if there's any other information I can provide.

Thank you again for your time and support!

Best regards,
Mengcheng
Attachments:
open | download - MC_PRT_Step2_12.txt (11.2 KB)
open | download - MC_PRT_Step2_12_timing.m (6.2 KB)
open | download - MC_PRT_Step2_13_timing.m (15.4 KB)
open | download - trial_37.mp4 (177.7 KB)
Re: Scene5 does not terminate on fixation break before transition to Scene6
June 30, 2025 04:01PM
You did not provide the datafile, but I think I can tell what happened during the trial.

It seems that your subject is very good at guessing the duration of the initial central fixation. You said you expected an error in Scene5 for the premature saccade. However, it does not occur there when the subject breaks the fixation very near to the end of the fixation hold, because SingleTarget does not immediately change its status (see the remarks in the manual). If the saccade is made during the last frame of the hold period, the remaining time is too short for WaitThenHold to determine whether it is a jitter or a real saccade, and Scene5 ends without an error.

Then, the error can be detected in Scene6. You need to set the AllowEarlyFix property of MultiTarget to false. If the saccade is premature, the eye will already be on the target before Scene6 starts. With AllowEarlyFix being false, MultiTarget will fail immediately in such a case.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.