Welcome! Log In Create A New Profile

Advanced

A transparent circle mask for a rectangle

Posted by flumer 
A transparent circle mask for a rectangle
July 04, 2020 10:14AM
Hi! Jaewon.

I am trying to transfer a Shalden version random dots into a adapter. When I used circle formula to drop unwanted part of a rectangle and make random dots into a circle, I found it became much slower. So I want to have transparent circle mask to cover the the rectangle random dots. Is there any way? I have no idea.

Thanks.
Re: A transparent circle mask for a rectangle
July 04, 2020 11:27AM
RandomDotMotion is the Shadlen version of random dots. Please try it and see if it suits.
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#RandomDotMotion
Re: A transparent circle mask for a rectangle
July 07, 2020 11:23PM
I don't think so. [shadlenlab.columbia.edu]
They control dots density , not dots number. And for each frame, the number of dots might be different.
Re: A transparent circle mask for a rectangle
July 07, 2020 11:47PM
Also after updating into 2020.7.7 version. Dots are floating on the mask pic. In 2020.6.15 version, there is no such problem. Mask covers those dots.
Re: A transparent circle mask for a rectangle
July 08, 2020 02:25AM
You should read more of their papers. The density of dots is simply a parameter calculated from the number of dots. The CRT display that they initially used flashed 6670 dots/second, so they just divided it by their aperture size (400 degreesĀ²). That is how they got the famous 16.7 dots/degreeĀ²/sec (= 6670 / 400). In their modern version of the stimuli implemented on a PC, the total number of dots displayed for a second can be calculated by multiplying the number of dots per frame and the refresh rate, so just do your math.

And you are definitely wrong about the number of dots being different from frame to frame. When they first made the PC version, it did not look as complex as the CRT display version, so they developed a trick of using three sets of dots and alternating them every three frames. But the basic concept of these stimuli came from the CRT display version in which each dot was plotted sequentially for the same duration.and therefore the number of dots flashed in a given duration was always the same. If the number of dots changes from frame to frame, such a property cannot be held.
Re: A transparent circle mask for a rectangle
July 08, 2020 02:46AM
I don't know what mask pic you are talking about. This is a problem of the code you wrote, so you should show your code at least.
Re: A transparent circle mask for a rectangle
July 09, 2020 12:06AM
Sorry, Jaewon. I was to express that their coherence dots number is different per frame. So they need a motion energy index to see what exactly an observer gets. Psychopy has the same way as you writing the random dots. The number of coherence dots is same for each frame. I think the motion energy is slightly more stable than Shadlen's way.

I take another way to solve "random dots floating on pic" problem in "run_scene(rdm,[my_pic])". I post my mask here.

Thank you.
Attachments:
open | download - transparent.png (11.3 KB)
open | download - transparent_test.png (11.8 KB)
Re: A transparent circle mask for a rectangle
July 11, 2020 09:22AM
I don't understand who you are referring as "they" any more, but it does not make any sense that the number of coherence dots can change from frame to frame. How can the coherence level be 100%, if not all dots move in the same direction?

I don't know why a mask is necessary, but I guess you are not aware that an object created earlier is shown above the others in MGL. The mask should be created before any dot.

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.