# Moving dots- clustered dots

**URL:** <https://mworks.discourse.group/t/moving-dots-clustered-dots/81>\
**Category:** Support\
**Created:** [February 16, 2022, 1:18pm UTC](https://mworks.discourse.group/t/moving-dots-clustered-dots/81 "2022-02-16T13:18:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [February 16, 2022, 1:18pm UTC](https://mworks.discourse.group/t/moving-dots-clustered-dots/81/1 "2022-02-16T13:18:26Z")

</div>

Hi Chris,  
I’ve been working on an experiment using the moving dots stimulus, where on each trial the dots move in a different direction. On the first trial, this works well. But on subsequent trials the dots are often clustered at one side of the stimulus such that if the field is smaller than the screen there is a semi-circle of dots coming from one end of the field. This disperses as the dots continue to drift, but is initially problematic. Is there a stimulus “reset” that needs to be done at the beginning of each trial?  
Thanks,  
Lindsey.

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [February 16, 2022, 2:01pm UTC](https://mworks.discourse.group/t/moving-dots-clustered-dots/81/2 "2022-02-16T14:01:23Z")

</div>

Hi Lindsey,

I don’t know why that would be happening. Can you send me an experiment that demonstrates the problem?

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [February 16, 2022, 11:03pm UTC](https://mworks.discourse.group/t/moving-dots-clustered-dots/81/3 "2022-02-16T23:03:08Z")

</div>

Hi Chris,  
Here is the experiment I have been working on. I am also including a  
variable set. This needs the pulse generator to make it progress through  
the task states, but otherwise should just run. The issue starts on the  
second trial (you can reduce the reaction time variable to get there  
sooner).  
Lindsey.

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [February 17, 2022, 1:41pm UTC](https://mworks.discourse.group/t/moving-dots-clustered-dots/81/4 "2022-02-17T13:41:37Z")

</div>

Hi Lindsey,

Sorry, I didn’t receive the experiment. Can you try sending it again?

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [February 17, 2022, 1:55pm UTC](https://mworks.discourse.group/t/moving-dots-clustered-dots/81/5 "2022-02-17T13:55:39Z")

</div>

Sorry- sometimes it works without compressing, sometimes not.  
Here’s the compressed version.  
Lindsey.

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [February 17, 2022, 3:14pm UTC](https://mworks.discourse.group/t/moving-dots-clustered-dots/81/6 "2022-02-17T15:14:06Z")

</div>

Thanks, I got it this time. I see the issue, but I’m not yet sure what the cause is. Let me investigate some more and get back to you.

Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [February 17, 2022, 4:09pm UTC](https://mworks.discourse.group/t/moving-dots-clustered-dots/81/7 "2022-02-17T16:09:32Z")

</div>

Hi Lindsey,

You need to call [stop\_dynamic\_stimulus](https://mworks.github.io/documentation/latest/components/stop_dynamic_stimulus.html) to reset the dots between trials. In state StimOn, do this:

```auto
if (doDotsDiscrim) { 
    stop_dynamic_stimulus (targetDots) // This is new
    live_queue_stimulus (targetDots)
    play_dynamic_stimulus (targetDots)
    report('Queuing dots- contrast is $tGratingContrast')
}

```

Also, I see that your experiment is dequeuing and re-queueing the dots mid-trial, which makes it look like the dots stutter. I don’t know if that’s intended, but I thought I’d point it out.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [February 17, 2022, 4:28pm UTC](https://mworks.discourse.group/t/moving-dots-clustered-dots/81/8 "2022-02-17T16:28:18Z")

</div>

Thanks!  
Lindsey.

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 19, 2022, 6:21pm UTC](https://mworks.discourse.group/t/moving-dots-clustered-dots/81/9 "2022-07-19T18:21:10Z")

</div>


