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

Analyze pre-processed data of eye tracker #12

Closed
7 of 9 tasks
ihgumilar opened this issue Jul 14, 2022 · 2 comments
Closed
7 of 9 tasks

Analyze pre-processed data of eye tracker #12

ihgumilar opened this issue Jul 14, 2022 · 2 comments
Assignees
Labels
eye tracker data classification Pre-processing eye tracker data, eg. separating data, marker, etc. eye tracker Script related to eye tracker data

Comments

@ihgumilar
Copy link
Owner

ihgumilar commented Jul 14, 2022

  • 1. Populate odd subjects and even subjects into one separate dataFrame for all conditions , i.e. averted_pre* , averted_post* , direct_pre*, direct_post*, natural_pre*, and natural_post*. It means for each condition, eg. averted_pre* , there will be two dataFrames, one for odd subjects and one for even subjects.

      - [x]   This has been turned into a function
    
  • 2. Convert GazeDirections, which are in cartesian (x, y, z) to degree, see Functions to convert cartesian to polar degree, for both Right and Left eyes. Put the converted value (degree) into a new column (eg. eye right-left), by using this code. Inside it, a function gaze_direction_in_x_axis_degree(x, y) is resulting a degree that indicates a movement of the eye in xaxis (right or left). A function gaze_direction_in_y_axis_degree(y, z) is resulting a degree that indicates a movement of eye in yaxis (up or down).

    • It has an issue when we run it with **averted_pre_even** subject. See the issue below here.
  • 3. Check whether the values (degree) that are under the column of (eg. eye right-left) are within the range of fovea, see Function to check whether a degree within fovea (30 degrees in total) and use the function check_degree_within_fovea(gaze_direction) inside this script. If it is within the fovea, it will result it 1 otherwise 0. Save those new values (1 or 0) into a new colum, eg in_fovea.

  • 4. Compare values of in_fovea for both x-axis and y-axis whether both of them are 1. For example, if both of them are 1 then give a label or value 1 in a new column, e.g. look_each_other, otherwise 0. Do this for both right and left eyes as well. Of course, for both odd and even subject dataframes.

  • 5. Since the sampling rate is 125 / per second (125 rows for each second) , we need to count how many "1" as well as "0" in column look_each_other within a second (125 rows). We need a threshold Threshold of within a second to determine "looking" (conscious) or "not looking" (unconscious) #10. For example, if the threshold is 13, when we count "1" in column look_each_other within a second (125 rows), there are 13 of "1", then we need to create a new label 1 which indicates "really" or "scientifically" looking, otherwise 0. Put those new values (0 and 1) into a new column, eg. sig_looking

  • 6. Do the step 2-4 for both odd and even subjects' dataFrames for each eye condition.

  • 7. Check whether each pair looked at each other or not. Take a value from column in_fovea of odd and even subject, then check if both are giving 1 (must be 1 for both of them), which indicates look at each other in the same range of fovea. If so, give label 1 and put it into a new column again, eg. look_each_other, otherwise give label 0, that indicates that their eyes were not matched within a second.

  • 8. Count a proportion of value 1 and 0 in column sig_looking. For example, if there are 60 "1" in the column sig_looking , then we can calculate the proportion : (60 / 1800) x 100 = 33 %. It means that out of 120 seconds (2 minutes), their eyes met only in 33%~40 seconds). Note 1800 = 120 (seconds) x 15 subjects (odd or even)

@ihgumilar ihgumilar added eye tracker Script related to eye tracker data eye tracker data classification Pre-processing eye tracker data, eg. separating data, marker, etc. labels Jul 14, 2022
@ihgumilar ihgumilar self-assigned this Sep 8, 2022
@ihgumilar ihgumilar changed the title Calculate the angle (look at the previous script in repo Hyperscanning2) Analyze the pre-processed of eye tracker data Nov 21, 2022
@ihgumilar
Copy link
Owner Author

9179b3e use this repo for point no.2 above.

Make function to combine eye data to dataframe

  • Combine all cleaned eye tracker data into dataframe. It is separated between odd and even subjects

  • ToDo :

    • Still has an issue when running function to convert from cartesian to degree for averted_pre_even subjects

Image

@ihgumilar ihgumilar changed the title Analyze the pre-processed of eye tracker data Analyze the pre-processed data of eye tracker Nov 21, 2022
@ihgumilar ihgumilar changed the title Analyze the pre-processed data of eye tracker Analyze pre-processed data of eye tracker Nov 21, 2022
@ihgumilar
Copy link
Owner Author

ihgumilar commented Nov 23, 2022

The above issue is due to the the number of columns are more than 24, i.e., 44. No idea what it happens but we solve it by cutting the extra columns. 00f00b6 is the repo that fixed the issue

ihgumilar added a commit that referenced this issue Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eye tracker data classification Pre-processing eye tracker data, eg. separating data, marker, etc. eye tracker Script related to eye tracker data
Projects
None yet
Development

No branches or pull requests

1 participant