Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extreme min/max for gaze coordinates #16

Open
kalexandriabond opened this issue Sep 26, 2019 · 7 comments
Open

Extreme min/max for gaze coordinates #16

kalexandriabond opened this issue Sep 26, 2019 · 7 comments

Comments

@kalexandriabond
Copy link

Hi,

When I run the following minimal example, I get extreme values for the min and max gaze position (0.0 and 100000000.0, respectively) that are well outside the stated gaze coordinates (GAZE_COORDS 0.00 0.00 1919.00 1079.00). Do you know why this is? Thanks in advance for your help.

from pyedfread import edf

samples, events, messages = edf.pread('SUB001.EDF')

print('min gaze coordinates ', samples.gx_right.min(), samples.gy_right.min())
print('max gaze coordinates ', samples.gx_right.max(), samples.gy_right.max())

@gschwim
Copy link
Contributor

gschwim commented Sep 27, 2019

Hi @KMBond ,

It could be bad samples from outside of a recorded trial. Try bounding the samples by the start and end times of a trial and see if its still like that. It could also be loss of lock on the eye (e.g. blink, etc).

@kalexandriabond
Copy link
Author

Hmm, okay. Should this be the case using the sample data provided with the package (SUB001.EDF)?

These extreme values don't appear to be in the raw EDF or the ASC files. So I think it would be worth considering whether there's an issue with the parsing of the raw data to a pd.DataFrame.

@gschwim
Copy link
Contributor

gschwim commented Sep 27, 2019

Hmm. I admit I never looked at the sample data. I haven't noticed a problem with my own data but it's worth checking out. Will see if I can get it going in the next few days.

@gschwim
Copy link
Contributor

gschwim commented Sep 27, 2019

Hi. I took a look at one of our recent trial data sets. I can confirm that I am seeing similar to you. Outside of a trial I do get 0.0 for the minimum but not inside, possibly due to a lack of blinks but I'm speculating. The max is the same regardless. I don't see these numbers in the .asc.

Maybe the source code will reveal why?

@selimonat
Copy link
Contributor

selimonat commented Sep 27, 2019 via email

@kalexandriabond
Copy link
Author

If the extreme gaze data were due to blinks, then those extreme values should also be present in the ASC file (but they aren't). @selimonat?

@behinger
Copy link
Member

behinger commented Jan 17, 2025

Hi! some time ago, I took over maintenance and I finally looked into this. While there is no 100_000_000 in the ASC file, there are some parts where empty (?) samples exist:

Image

These are precisely the location where we get that high gx_right values. I didnt find anything in pyedfread nor in the header files of the API that could explain this. I'll add a warning if such values are observed - not sure how else to proceed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants