Welcome! Log In Create A New Profile

Advanced

Accessing task object position and state from data file.

Posted by holmescharles 
Accessing task object position and state from data file.
March 01, 2024 08:22PM
I'm using version 2 timing files.
I'd like to determine the position and taskobject state (or statuses, i.e., whether the object is visible or not) at arbitrary times in the trial.

With v1 timing files, I could look at ObjectStatusRecord/Times, ObjectStatusRecord/Statuses, and ObjectStatusRecord/Position. This is a bit more complicated with v2; data are saved sequentially by scene and then hierarchically by adapater order. I think I would need to write code that steps through all the scenes and finds whether targets were on or not. (Is a taskobject's visibility covered by the Visual field?)

One more complication: I am planning to use the curve tracer to make the objects move continuously. I don't think I can use the method described in the previous paragraph to find the moment by moment position in this case. I think I can access the "Trajectory" or "List" matrices of the CurveTracer Adapter's saved data, but I'm wondering if there's a better way.

Thanks in advance!
Re: Accessing task object position and state from data file.
March 02, 2024 01:20AM
In the scene framework, TaskObjects and graphic adapters are shown if they are included in the scene and not shown if they are not included. Since it is you that determine whether to include them or not, you know which stimuli are presented in a particular scene.

All stimuli are presented when the current scene starts and removed when the next scene starts. It is easier to record the numbers that you need separately rather than look for them from the saved adapter chains.

Read the manual page of CurveTracer carefully regarding the information that you want. Again it is you that compose the List matrix. If you need the matrix later, just save it with bhv_variable().
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#CurveTracer

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.