Skip to content

Commit 5661aee

Browse files
committed
fix up export
- action now also available when only validation done (as it should be) - exporting of plane gaze not available if there are no trials, even if action was successful (e.g. for validation plane)
1 parent 9b4ec0b commit 5661aee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/gazeMapper/GUI/_impl/callbacks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def show_export_config(g, path: str|pathlib.Path, sessions: list[str]):
336336
if s is None:
337337
continue
338338
if 'plane gaze' not in to_export:
339-
if any((s.recordings[r].state[process.Action.GAZE_TO_PLANE]==process.State.Completed for r in s.recordings)):
339+
if annotation.Event.Trial in g.study_config.planes_per_episode and any((s.recordings[r].state[process.Action.GAZE_TO_PLANE]==process.State.Completed for r in s.recordings)):
340340
to_export['plane gaze'] = True
341341
if recs:=[s.recordings[r].info.working_directory for r in s.recordings if s.recordings[r].state[process.Action.RUN_VALIDATION]==process.State.Completed]:
342342
to_export['validation'] = True

src/gazeMapper/process/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def is_action_possible_given_config(action: Action, study_config: 'config.Study'
123123
case Action.RUN_VALIDATION:
124124
return annotation.Event.Validate in study_config.planes_per_episode
125125
case Action.EXPORT_TRIALS:
126-
return annotation.Event.Trial in study_config.planes_per_episode
126+
return annotation.Event.Trial in study_config.planes_per_episode or annotation.Event.Validate in study_config.planes_per_episode
127127
case Action.MAKE_MAPPED_GAZE_VIDEO:
128128
return not not study_config.video_make_which
129129

0 commit comments

Comments
 (0)