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

Make model_id optional for pupil 3d raw data export #2061

Merged
merged 1 commit into from Dec 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions pupil_src/shared_modules/raw_data_exporter.py
Expand Up @@ -296,7 +296,6 @@ def dict_export(
try:
diameter_3d = raw_value["diameter_3d"]
model_confidence = raw_value["model_confidence"]
model_id = raw_value["model_id"]
sphere_center = raw_value["sphere"]["center"]
sphere_radius = raw_value["sphere"]["radius"]
circle_3d_center = raw_value["circle_3d"]["center"]
Expand All @@ -310,7 +309,6 @@ def dict_export(
except KeyError:
diameter_3d = None
model_confidence = None
model_id = None
sphere_center = [None, None, None]
sphere_radius = None
circle_3d_center = [None, None, None]
Expand All @@ -322,6 +320,9 @@ def dict_export(
projected_sphere_axis = [None, None]
projected_sphere_angle = None

# pye3d no longer includes this field. Keeping for backwards-compatibility.
model_id = raw_value.get("model_id", None)

return {
# 2d data
"pupil_timestamp": pupil_timestamp,
Expand Down