Welcome! Log In Create A New Profile

Advanced

Setting Threshold Detection Window Equal to Size of Task Object

Posted by marmosets 
Setting Threshold Detection Window Equal to Size of Task Object
November 16, 2020 01:11PM
Hello Jaewon!

I appreciate all of your help so far! And I'm back with another question.

I would like to present Task Objects of varying size in ML and have the Target.Threshold detection window equal to the size of the object. I have attempted to access the size of the object using TrialRecord.CurrentConditionStimulusInfo.Size. However, this appears to be measuring in pixels and .Threshold is measured in degrees.

Is there a simple way to implement code like this? I would like to avoid using a userloop at the moment, though we may go there eventually.

Thank you for the help!

E
Re: Setting Threshold Detection Window Equal to Size of Task Object
November 16, 2020 02:37PM
Just calculate degrees back from the pixel size.
degrees = pixels / Screen.PixelsPerDegree;
Regarding to the Screen object, see this post.
https://monkeylogic.nimh.nih.gov/board/read.php?2,13,13#msg-13

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.