Welcome! Log In Create A New Profile

Advanced

eye cursor doesnt show (on experimenter screen)

Posted by lucast4 
eye cursor doesnt show (on experimenter screen)
February 12, 2022 11:12AM
Hi,
On the experimenter screen,
the dot representing eye tracking shows only on the first trial. It is not visible on subsequent trials.

Coincidentally, the same thing is true for (i) hand cursor (touchscreen) and (ii) DASHBOARD() messages.

Do you know what's going on? Or point me to the best way to debug this?
Thanks!
Re: eye cursor doesnt show (on experimenter screen)
February 13, 2022 10:25PM
Too little information. Does it happen in other tasks as well? Have you run it on a different computer? Can you provide the task files for testing?
Re: eye cursor doesnt show (on experimenter screen)
February 14, 2022 08:23AM
It doesn't happen in other tasks. I see it on all computers. Perhaps it relates to a bunch of custom adaptors I wrote?

I will PM you the task files right now.

Thanks!
Re: eye cursor doesnt show (on experimenter screen)
February 14, 2022 05:43PM
First of all, I cannot run your files because of some missing functions.

Second, you should keep your custom adapters with your task files, not in the NIMH ML directory. Otherwise, it is difficult to update NIMH ML.

Third, it appears that the problem is in the custom adapters. Remove them all, add them back one by one and see which one causes the issue.
Re: eye cursor doesnt show (on experimenter screen)
February 15, 2022 08:22AM
Sorry for the inconvenience - it should run if you use the ML2 version that is included in the download I sent you.

I agree with your suggestion, but the task depends highly on the custom adapters, so I am not sure if it possible to remove them one by one - the task will break.

Do you have another suggestion? Maybe you could direct me to the relevant code that is computing/rendering the eye dot on the experimenter screen?

Thanks a lot!
Re: eye cursor doesnt show (on experimenter screen)
February 15, 2022 10:54AM
I did use your version as your instructions said.

You can write a simple task to test the adapters.

Set a breakpoint somewhere and follow from there.
Re: eye cursor doesnt show (on experimenter screen)
February 16, 2022 11:56PM
I think it should run if you set your path to include everything I sent you (including subfolders). What is the missing function?
Re: eye cursor doesnt show (on experimenter screen)
February 17, 2022 12:10AM
Would you be able to give me a little more advice? I have set breakpoints on the adapters and walked through, but I am not sure what to look for, since it is not these adapters that are controlling the location of the eye and hand cursors on the experiment screen.

Like is there a line of code in ML2 where the eye dot is rendered? And I could work from there?

Thanks
Re: eye cursor doesnt show (on experimenter screen)
February 17, 2022 12:43AM
OK, I think this might be useful info.
I am testing this with touch tracker, since it shows the same problem.

At line 52 to 57 in TouchTracker.m, I set a breakpoint.

xy=reshape(obj.XYData(end,smiling smiley,2,[])';
nxy=size(xy,1);
status=~isnan(xy(:,1));
mglactivategraphic(obj.Screen.TouchCursor(1:nxy),status);
mglsetorigin(obj.Screen.TouchCursor(1:nxy),xy);
obj.Success=any(status);

On trial 1 this code successfully updates the position of the hand cursor.
On all subsequent trials, it does not. This is the case even though, as far as I can tell, status is "true" and xy is a correct screen position.

In particular, I get values for those variables:
xy =

   716   550
   NaN   NaN

nxy

nxy =

     2

status

status =

  2×1 logical array

   1
   0

obj.Screen.TouchCursor

ans =

       46121       46122

obj.Screen

ans = 

  mlscreen with properties:

             BackgroundColor: [1×3 double]
           SubjectScreenRect: [1×4 double]
                       Xsize: 1024
                       Ysize: 768
    SubjectScreenAspectRatio: 1.3333
       SubjectScreenFullSize: [1×2 double]
       SubjectScreenHalfSize: [1×2 double]
                   DPI_ratio: 1.2500
             PixelsPerDegree: 45.8587
                 RefreshRate: 60
                 FrameLength: 16.6667
                VBlankLength: 0.7585
                    ScanLine: [1×2 double]

Does this help at all? Thanks
Re: eye cursor doesnt show (on experimenter screen)
February 17, 2022 10:29AM
You are looking at a wrong place. It is not a problem of the eye tracer or hand cursor.

As I already said, you need to check whether your custom adapters work flawlessly. If it is too complex to test in your current task, write a simple task that uses one adapter at a time. You should have done it before using them in the task.

-----

One of your custom adapters destroys all the graphics with it, which is the reason why you do not see any of the tracers/messages.
Re: eye cursor doesnt show (on experimenter screen)
February 17, 2022 11:13AM
Thanks! that's a very helpful hint. I'll test things out as you suggest
Re: eye cursor doesnt show (on experimenter screen)
February 17, 2022 12:02PM
Yes it works! thank you so much

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.