Welcome! Log In Create A New Profile

Advanced

time problem

Posted by han 
han
time problem
January 09, 2020 05:47AM
Hi Jaewon,
I have several problems about time control, and I have added them to the attachment.
Meanwhile, I wonder if there is a way to get the refresh rate of the screen by using MonkeyLogic, because I need to use this in my program.
Thanks for your help.
Re: time problem
January 09, 2020 03:16PM
1. That is normal, especially in the first trial. I made it do a test run so that the code may run faster next time.

2. You are asking your computer to do too much work. There is a cost when you switch scenes. If you want all 30 frames to be a seamless presentation, you should make the whole thing as one scene, for example, by making your stimuli as movies.

3. If you set the hold time to 200 ms, the scene ends AFTER 200 ms has passed, so it will take ~216 ms if your refresh rate is 60 Hz. Then you start the next scene, of which first frame will be presented in the next screen refresh (~216 ms + ~16 ms = ~230 ms).
han
Re: time problem
January 10, 2020 08:08AM
Thanks for your help.
I should explain about the second question. In my real trial tasks, some conditions of stimuli are scrambled every dots. This means that every scrambled condition is different. If I make them to movies, they will be the same every time.
There are two other questions.
1. I wonder if there is a way to get the refresh rate of the screen by using MonkeyLogic, because I need to use this in my program to calculate certain variables.
2. In RandomDotMotion, what does 'Interleaf' mean? I don't know the mean of 'Number of frames interleaving'. What will this property affect?
Re: time problem
January 10, 2020 10:41AM
That is certainly not true. You can make the task generate different movies every time. You can save them as files but also create directly from MATLAB matrices.
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#MovieGraphic

1. https://monkeylogic.nimh.nih.gov/board/read.php?2,13,13#msg-13

2. https://www.ncbi.nlm.nih.gov/pubmed/11600651 See "Visual stimuli" in Methods.
han
Re: time problem
January 10, 2020 12:24PM
that's great! Thank you very much!
han
Re: time problem
January 10, 2020 02:12PM
In MovieGraphic, what does movie matrix of List mean? what is x, and what is y? Are movies' filenames?
Re: time problem
January 13, 2020 06:09AM
Using movies was just one possible way to do it. I have a second thought. I think you can do it better with CurveTracer.
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#CurveTracer

With it, you can do something like this. The example code used to make this video is in the "task\runtime v2\11 curve trace" directory, if you download the new version.
https://monkeylogic.nimh.nih.gov/images/about_curve_trace.mp4

Animating something with adapters is costly. If you have many objects to control, you may have to write your own adapter with MGL.
han
Re: time problem
January 13, 2020 12:29PM
OK.
If I want to use MovieGraphic, how to draw graphics every frame?
In addition, what does SymmetryMat in the adapter of RandomDotMotion do?
Re: time problem
January 13, 2020 03:21PM
It is a movie. You draw all the frames beforehand and play one by one. See the example 2 of MovieGraphic.
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#MovieGraphic

I don't have time to explain how my code works. You are on your own, if you want to look into my code. It is already there.
han
Re: time problem
January 14, 2020 06:18AM
OK. Thanks for your help

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.