Welcome! Log In Create A New Profile

Advanced

TaskObject subscript operation

Posted by mingli842 
TaskObject subscript operation
September 18, 2024 03:00AM
Dear Jaewon,

I am trying to program a movie version delayed-match-to-sample (DMS) task.

I preloaded 11 ARGB movies (~700 MB each) as TaskObject during the first run of the userloop script.

In the timing file, a sample is shown (for example TaskObject(3) ) in the center of the screen for about 1 seconds. Then after a short period of delay, 4 movie options ( the sample and the other 3 TaskOjbects, for example TaskObjects([3 5 6 8]) ) were shown at eccentricity 5.

Please be noted that I need to set the position of TaskObject(3) twice in a single trial, first (0, 0), then (5, 0) for example. I found that only the last one works.

To overcome this problem, I tried to make a copy of the sample TaskObject and set its property independently. For example, let TaskObject(end +1) = TaskObject(3). However, this statement thrown an error: "Not a valid indexing expression".

So what is the correct way to do TaskObject subscript operation?

If this operation is not possible, do you have any other suggestions?

Thank you!
Re: TaskObject subscript operation
September 18, 2024 06:31PM
Assigning a TaskObject to a different variable does not create a copy of the TaskObject but another variable that points to the same TaskObject. You should create two TaskObjects of the same movie, one at (0,0) and the other at (5,0), or change the position of TaskObject(3) to (5,0) with reposition_object() before presenting it again.

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.