Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
wjma

Junior Member
Registered:
Posts: 4
Reply with quote  #1 
Hi there,

My intent for a task is that the subject can view a sample image for a maximum of 5 seconds, should their gaze leave the image it will toggle, show a fixation screen, and display the next image. The point is to record how long they spend viewing each image, so looking away before 5sec is complete is not a fail.

The issue is that once the subject looks away, ML sees it as a failure and pauses it after 2 look-aways, instead of completing the 5 images in the condition.
How can I fix this so that breaking fixation only continues on to the next fixation & image?

I've included what I have for the first image; fixation, 2nd image.

I'd appreciate any help, thanks!
___

% sample epoch
toggleobject(sample, 'eventmarker',20); % turn on sample
ontarget = eyejoytrack('holdfix', fixation_point, hold_radius, sample_time);
if ~ontarget
toggleobject([fixation_point sample]);
end
toggleobject(sample, 'eventmarker',30); % turn off sample

% delay epoch
ontarget = eyejoytrack('holdfix', fixation_point, hold_radius, delay);
if ~ontarget
toggleobject(fixation_point);
trialerror(3); % broke fixation
return
end

% distractor 1 epoch
toggleobject(distractor1, 'eventmarker',20); % turn on distractor
ontarget = eyejoytrack('holdfix', fixation_point, hold_radius, sample_time);
if ~ontarget
toggleobject([fixation_point distractor1]);
end
toggleobject(distractor1, 'eventmarker',30); % turn off sample

0
Jaewon

Administrator
Registered:
Posts: 646
Reply with quote  #2 
You should explain more. Your code is the same as the DMS example and doesn't show anything you did. So did you repeat it 5 times for the 5 images?
0
wjma

Junior Member
Registered:
Posts: 4
Reply with quote  #3 
Yes. It is simply the same two epochs repeated (fix, img, fix, img, fix...) with the last image the same as the first.
It runs fine if the subject continues to look at the image throughout, but if they look away from the image at any time it stops the experiment. I've played around with it but can't get it to continue to the next image.
The intent is just to record how long they spend viewing each image, and move onto the next fixation should they look away.

New to ML, thanks for the help.
0
Jaewon

Administrator
Registered:
Posts: 646
Reply with quote  #4 
Remove the "return" command in the script. It terminates the task right away.
0
wjma

Junior Member
Registered:
Posts: 4
Reply with quote  #5 

Jaewon,

The return didn't solve it, so I reworked the structure and works fine now, thank you for the help

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.