Skip to content

Commit

Permalink
refactor: rerun by columns now !
Browse files Browse the repository at this point in the history
  • Loading branch information
Ipuch committed Nov 28, 2024
1 parent 064b493 commit bf4fc38
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pyorerun/multi_frame_rate_phase_rerun.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def cumulative_frames_in_merged_t_span(self) -> list[list[int]]:
frame_t_span_idx = self.frame_t_span_idx
return [calculate_cumulative_frames(p, frame_t_span_idx) for p in range(self.nb_phases)]

def rerun(
def rerun_by_frame(
self, name: str = "animation_phase", init: bool = True, clear_last_node: bool = False, notebook: bool = False
) -> None:
if self.nb_phases == 1:
Expand Down Expand Up @@ -107,7 +107,7 @@ def rerun(
]:
rr.log(component, rr.Clear(recursive=False))

def rerun_with_chunks(
def rerun(
self, name: str = "animation_phase", init: bool = True, clear_last_node: bool = False, notebook: bool = False
) -> None:
if self.nb_phases == 1:
Expand Down
4 changes: 2 additions & 2 deletions pyorerun/multi_phase_rerun.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def windows(self, phase: int = 0) -> list[str]:
def all_windows(self) -> list[str]:
return [windows for phase in self.rerun_biorbd_phases for windows in phase.keys()]

def rerun(self, server_name: str = "multi_phase_animation", notebook=False) -> None:
def rerun_by_frame(self, server_name: str = "multi_phase_animation", notebook=False) -> None:
rr.init(server_name, spawn=True if not notebook else False)
for i, phase in enumerate(self.rerun_biorbd_phases):
for j, (window, rr_phase) in enumerate(phase.items()):
Expand All @@ -90,7 +90,7 @@ def rerun(self, server_name: str = "multi_phase_animation", notebook=False) -> N
more_phases_after_this_one = i < self.nb_phase - 1
rr_phase.rerun(init=False, clear_last_node=more_phases_after_this_one)

def rerun_with_chunks(self, server_name: str = "multi_phase_animation", notebook=False) -> None:
def rerun(self, server_name: str = "multi_phase_animation", notebook=False) -> None:
rr.init(server_name, spawn=True if not notebook else False)
for i, phase in enumerate(self.rerun_biorbd_phases):
for j, (window, rr_phase) in enumerate(phase.items()):
Expand Down
4 changes: 2 additions & 2 deletions pyorerun/phase_rerun.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def add_video(self, name, video_array: np.ndarray) -> None:

self.xp_data.add_data(Video(name=f"{self.name}/{name}", video_array=video_array))

def rerun(
def rerun_by_frame(
self, name: str = "animation_phase", init: bool = True, clear_last_node: bool = False, notebook: bool = False
) -> None:
if init:
Expand All @@ -215,7 +215,7 @@ def rerun(
]:
rr.log(component, rr.Clear(recursive=False))

def rerun_with_chunks(
def rerun(
self, name: str = "animation_phase", init: bool = True, clear_last_node: bool = False, notebook: bool = False
) -> None:
if init:
Expand Down

0 comments on commit bf4fc38

Please sign in to comment.