From 8adebe51afb22584e9813e4f5ce42ef78b6da2a4 Mon Sep 17 00:00:00 2001 From: Ipuch Date: Fri, 28 Jun 2024 16:44:18 -0400 Subject: [PATCH] show_events --- pyorerun/rrc3d.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pyorerun/rrc3d.py b/pyorerun/rrc3d.py index 77843c7..0396385 100644 --- a/pyorerun/rrc3d.py +++ b/pyorerun/rrc3d.py @@ -16,6 +16,7 @@ def rrc3d( show_floor: bool = True, show_force_plates: bool = True, show_forces: bool = True, + show_events: bool = True, down_sampled_forces: bool = False, video: str | tuple[str, ...] = None, video_crop_mode: str = "from_c3d", @@ -35,6 +36,8 @@ def rrc3d( If True, show the force plates. show_forces: bool If True, show the forces. + show_events: bool + If True, show the events, as log entries. down_sampled_forces: bool If True, down sample the force data to align with the marker data. If False, the force data will be displayed at their original frame rate, It may get slower when loading the data. @@ -113,7 +116,12 @@ def rrc3d( multi_phase_rerun = MultiFrameRatePhaseRerun(phase_reruns) multi_phase_rerun.rerun(filename, notebook=notebook) - set_event_as_log(c3d_file) + if show_events: + try: + set_event_as_log(c3d_file) + except: + raise NotImplementedError("The events feature is still experimental and may not work properly. " + "Set show_events=False.") if marker_trajectories: # todo: find a better way to display curves but hacky way ok for now