# MWorks 0.5: Question about Eye positions

**URL:** <https://mworks.discourse.group/t/mworks-0-5-question-about-eye-positions/478>\
**Category:** Support\
**Created:** [December 18, 2015, 5:41pm UTC](https://mworks.discourse.group/t/mworks-0-5-question-about-eye-positions/478 "2015-12-18T17:41:15Z")\
**Posts on this page:** 7\
**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:** [December 18, 2015, 5:41pm UTC](https://mworks.discourse.group/t/mworks-0-5-question-about-eye-positions/478/1 "2015-12-18T17:41:15Z")

</div>

Hi Chris,

I was decoding an mwk file (Darren from DiCarlo’s lab was using an RSVP program as a template).  
I noticed multiple Eye events with identical timestamps.

for example:  
using pymworks, I got the “eye\_h” events and sorted them in a variable called eye\_x:

here’s an example of what I get:

In [87]: eye\_x[3:10]  
Out[87]:  
[Event[code=33, name=eye\_h, time=5967535107, value=-1.6082607686519623],  
Event[code=33, name=eye\_h, time=5967535107, value=-1.6082607686519623],  
Event[code=33, name=eye\_h, time=5991155802, value=-1.267778331041336],  
Event[code=33, name=eye\_h, time=5991155802, value=-1.267778331041336],  
Event[code=33, name=eye\_h, time=6014776498, value=-0.9162668645381927],  
Event[code=33, name=eye\_h, time=6014776498, value=-0.9162668645381927],  
Event[code=33, name=eye\_h, time=6038397193, value=-0.5472747087478638]]

notice how some of the eye\_h events have identical timestamps and values.

I couldn’t tell from the 0.6 announcement ([MWorks 0.6 released](http://mworks-project.org/news/2015/10/06/0.6-released)) if this was the error that was fixed. In particular: “Eye calibrator sample announcements now contain the correct values for sampled and desired data (previously, those fields contained copies of the calibrated data)”

Let me know. For now, I’m eliminating the duplications in python

Thanks.

---

<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 18, 2015, 8:11pm UTC](https://mworks.discourse.group/t/mworks-0-5-question-about-eye-positions/478/2 "2015-12-18T20:11:55Z")

</div>

Hi Romesh,

That is strange. Would you mind trying to unpack the file again, using the standard data file tools (as opposed to pymworks, which is a third-party package that I don’t maintain)?

I’ve attached a Python script you can use. To print all the `eye_h` events from your data file, execute the following command on a Mac with MWorks installed (replacing `my_file.mwk` with the path to your data file):

```
python dump_events.py my_file.mwk eye_h

```

If you still see the duplicates, then I’ll probably need to take a look at your experiment file. Also, if you could share the data file with me (on Dropbox, perhaps?), then that would be helpful, too.

> I couldn’t tell from the 0.6 announcement if this was the error that was fixed. In particular: “Eye calibrator sample announcements now contain the correct values for sampled and desired data (previously, those fields contained copies of the calibrated data)”

No, that’s an unrelated issue that affected the value of the `#announceCalibrator` system variable.

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:** [December 18, 2015, 8:11pm UTC](https://mworks.discourse.group/t/mworks-0-5-question-about-eye-positions/478/3 "2015-12-18T20:11:55Z")

</div>

Attachment: [dump\_events.py](https://mworks.discourse.group/uploads/short-url/5NGAIj3GXgcz62Zc2Vj9lbjPLDD.py) (826 Bytes)

---

<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 18, 2015, 9:25pm UTC](https://mworks.discourse.group/t/mworks-0-5-question-about-eye-positions/478/4 "2015-12-18T21:25:28Z")

</div>

Still have duplicates… here is a snippet of the results of the dump  
(results.txt)  
Below is a link to the mwk file (it’s um… big. 1.5G)

---

<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 19, 2015, 1:20pm UTC](https://mworks.discourse.group/t/mworks-0-5-question-about-eye-positions/478/5 "2015-12-19T13:20:43Z")

</div>

Hi Romesh,

Thanks for the additional info. I’m going to be out on vacation for the next two weeks, but I’ll take a deeper look at this when I return (the week of January 4).

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:** [January 7, 2016, 7:21pm UTC](https://mworks.discourse.group/t/mworks-0-5-question-about-eye-positions/478/6 "2016-01-07T19:21:28Z")

</div>

Hi Romesh,

I think I see the problem: The experiment defines two identical copies of each filter. The first set starts at line 3 in the XML, and the second set starts at line 110. Since each pair of filters has the same parameters, each output (`eye_h`, `eye_v`, and `saccade`) is produced twice. The duplicated outputs have the same timestamp, because the timestamp is taken from the relevant input values, which are also the same.

To eliminate this issue for future runs, I recommend deleting the first set of filters and keeping the second (which is in the usual location of filters in experiment files).

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:** [July 19, 2022, 10:13pm UTC](https://mworks.discourse.group/t/mworks-0-5-question-about-eye-positions/478/7 "2022-07-19T22:13:50Z")

</div>

Closed on July 19, 2022, 10:13pm UTC


