Welcome! Log In Create A New Profile

Advanced

Task Objects, Incorrect Touches, & ToggleObject()

Posted by marmosets 
Task Objects, Incorrect Touches, & ToggleObject()
July 21, 2020 11:25AM
Hello!

I have been working on building a task in ML using the ground work of the DMS Touch in runtime V1. We will likely switch to runtime V2 for the scene framework, but as this is my first time using ML I decided to start with the basics.

I am running into a few issues and having exhausted the resources I can figure out how to navigate, I am here for some help!

1. I am presenting both circles (radius 4) and squares (length 8). The square has crisp, clear edges. However, the edges of the circle are blurry. Is there a way to resolve this? I have attached an image of these for your reference.

2. I would like to on occasion present only one stimuli, which I have figured out how to do, and have touches anywhere else on the screen register as incorrect and end the trial immediately. Currently, I have placed an object the same color as the background in the location a distractor would usually arise as a place holder for where an incorrect answer would usually occur. Is there a reference tool I am missing that may be able to direct me in my coding?

3. After an animal touches the incorrect answer and the trial ends, I would like to have a black square appear on the screen during the delay period to signal an incorrect trial. I have added a 4th Task Object to the conditions file, and have been trying to use toggle object() to turn the object and an event marker on, when the incorrect object is chosen by the animal. I have attached my entire .m file here for your reference. Whenever I try to run ML with this timing script, all is well until an incorrect touch is given. Then, ML crashes/breaks and provides the error "Matrix dimensions must agree" and errors in a few different places, I have attached a screenshot of the errors for your convenience.

I would greatly appreciate any advice you could offer me and apologize in advance for my lack of experience with Matlab.
Attachments:
open | download - Blurry Circle, Crisp Square.png (81.4 KB)
open | download - Error Message.png (467.3 KB)
open | download - dmsTwoChoice_NoCueIncorrectDelay.m (1.9 KB)
Re: Task Objects, Incorrect Touches, & ToggleObject()
July 21, 2020 11:30PM
The scene framework is neither difficult nor advanced. It is just different. There is no need to start from the runtime v1.

1. The CRC TaskObject is inherited from the original ML with the blurry edge. Use the CircleGraphic adapter of the scene framework, if you want a sharp circumference.

2. I don't get what the point of your question is. If you want to present only one stimulus, just don't show the other. You don't have to use all the TaskObject in a trial.

3. When you added a 4th TaskObject, did you add "TaskObject#4" to the header line of the conditions file as well? You didn't post the conditions file, but that seems a cause here.
Re: Task Objects, Incorrect Touches, & ToggleObject()
July 22, 2020 04:13PM
Hi again,

Thank you so much, this was extremely helpful!

I apologize for the confusing nature of my second question. To clarify, I am looking to be able to have the screen accept touch input as correct/incorrect anywhere on the screen. Specifically, I would like anywhere that is not the TaskObject to be considered an incorrect and immediately end the trial.

I did have a header for TaskObject#4, but your suggestion led me down a new line of thinking. At some point along the way my tab delimiters became uneven with the headings. So, thank you!

I greatly appreciate your help!

Erin
Re: Task Objects, Incorrect Touches, & ToggleObject()
July 22, 2020 08:48PM
Use two tracking types, 'touchtarget' and '~touchtarget', in one eyejoytrack().
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#eyejoytrack

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.