# MWorks behavior when eyetracking is lost

**URL:** https://mworks.discourse.group/t/mworks-behavior-when-eyetracking-is-lost/482
**Category:** Support
**Created:** [October 15, 2015, 1:35pm UTC](https://mworks.discourse.group/t/mworks-behavior-when-eyetracking-is-lost/482 "2015-10-15T13:35:00Z")
**Posts on this page:** 5
**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: [October 15, 2015, 1:35pm UTC](https://mworks.discourse.group/t/mworks-behavior-when-eyetracking-is-lost/482/1 "2015-10-15T13:35:00Z")

</div>

Hi Chris,

Is there a way to prevent mworks from issuing rewards when eyetracking has been lost? What seems to happen is that when the monkey turns his head and eyelink no longer has a signal, the fixation location is placed somewhere near the center of the screen–sometimes this falls within the fixation window which means that rewards will be issued even when there is no fixation.

Is there a way to prevent this from happening or to change where the eye coordinates are placed when eyetracking is lost?

Thanks,  
Darren

---

<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: [October 15, 2015, 3:46pm UTC](https://mworks.discourse.group/t/mworks-behavior-when-eyetracking-is-lost/482/2 "2015-10-15T15:46:15Z")

</div>

Hi Darren,

> What seems to happen is that when the monkey turns his head and eyelink no longer has a signal, the fixation location is placed somewhere near the center of the screen

I don’t know why this is happening. If any data is missing in a message received from the EyeLink, then MWorks sets the corresponding variables to -32768, so that’s what you should see in your “raw” x/y eye positions. Instead, it sounds like the raw positions are being set to zero, which leads to the calibrated position lying near the center of the screen.

Can you check whether that’s correct (either by looking at the raw positions in your event file, or by watching on the EyeLink computer to see what happens when the monkey turns his head)? If it’s true that the EyeLink sends zeros when the monkey is looking away, then you could use that fact to prevent rewards from being issued in that case. For example, you could attach an action to your raw y position variable that checks if x and y are both _exactly_ zero. If they are, you could set a “no rewards” variable to one, and then check that before dispensing a reward.

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: [December 1, 2015, 1:31pm UTC](https://mworks.discourse.group/t/mworks-behavior-when-eyetracking-is-lost/482/3 "2015-12-01T13:31:45Z")

</div>

Hi Darren,

Just following up on this issue. Were you able to resolve the problem, or do you need more assistance?

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: [December 1, 2015, 7:06pm UTC](https://mworks.discourse.group/t/mworks-behavior-when-eyetracking-is-lost/482/4 "2015-12-01T19:06:26Z")

</div>

Hi Chris,

Thanks for following up. The issue basically went away on its own so I  
never got around to implementing your suggestions. (We’ve moved the  
eyetracker and adjusted various other settings for unrelated reasons and  
the default location it places the fixation point now when tracking is lost  
is no longer near the center of the screen)

---

<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, 10:13pm UTC](https://mworks.discourse.group/t/mworks-behavior-when-eyetracking-is-lost/482/5 "2022-07-19T22:13:57Z")

</div>


