diff --git a/README.md b/README.md index c521360fd3a6..7e1887801295 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ rr.connect() # Connect to a remote viewer # rr.save("recording.rrd") # Stream all logs to disk # Associate subsequent data with 42 on the “frame” timeline -rr.set_index("frame", sequence=42) +rr.set_index("frame", seq=42) # Log colored 3D points to the entity at `path/to/points` rr.log("path/to/points", rr.Points3D(positions, colors=colors)) diff --git a/crates/store/re_types_core/src/id.rs b/crates/store/re_types_core/src/id.rs index 482e17c21c64..05dcbff201ea 100644 --- a/crates/store/re_types_core/src/id.rs +++ b/crates/store/re_types_core/src/id.rs @@ -140,7 +140,7 @@ crate::delegate_arrow_tuid!(ChunkId as "rerun.controls.ChunkId"); // Used in the /// /// In pseudo-code: /// ```text -/// rr.set_index("frame", sequence=10) +/// rr.set_index("frame", seq=10) /// /// rr.log("my_entity", point1, row_id=#1) /// rr.log("my_entity", point2, row_id=#0) diff --git a/docs/content/concepts/chunks.md b/docs/content/concepts/chunks.md index ae5cc2652701..25702543efc4 100644 --- a/docs/content/concepts/chunks.md +++ b/docs/content/concepts/chunks.md @@ -87,7 +87,7 @@ But if you're handing a bunch of rows of data over to Rerun, how does it end up #### How are these rows turned into columns? Before logging data, you can use the `rr.set_time_` APIs to update the SDK's time context with timestamps for custom timelines. -For example, `rr.set_index("frame", sequence=42)` will set the "frame" timeline's current value to 42 in the time context. +For example, `rr.set_index("frame", seq=42)` will set the "frame" timeline's current value to 42 in the time context. When you later call `rr.log`, the SDK will generate a row id and values for the built-in timelines `log_time` and `log_tick`. It will also grab the current values for any custom timelines from the time context. diff --git a/docs/content/getting-started/data-out/analyze-and-send.md b/docs/content/getting-started/data-out/analyze-and-send.md index 341aef692e1d..e436e0662864 100644 --- a/docs/content/getting-started/data-out/analyze-and-send.md +++ b/docs/content/getting-started/data-out/analyze-and-send.md @@ -46,7 +46,7 @@ Here is how to send the data as a scalar: ```python rr.send_columns( "/jaw_open_state", - indexes=[rr.IndexColumn("frame_nr", sequence=df["frame_nr"])], + indexes=[rr.IndexColumn("frame_nr", seq=df["frame_nr"])], columns=rr.Scalar.columns(scalar=df["jawOpenState"]), ) ``` @@ -60,7 +60,7 @@ target_entity = "/video/detector/faces/0/bbox" rr.log(target_entity, rr.Boxes2D.update_fields(show_labels=True), static=True) rr.send_columns( target_entity, - indexes=[rr.IndexColumn("frame_nr", sequence=df["frame_nr"])], + indexes=[rr.IndexColumn("frame_nr", seq=df["frame_nr"])], columns=rr.Boxes2D.columns(labels=np.where(df["jawOpenState"], "OPEN", "CLOSE")), ) ``` diff --git a/docs/content/howto/integrations/embed-notebooks.md b/docs/content/howto/integrations/embed-notebooks.md index c5d9b3e16719..8b55c83299f6 100644 --- a/docs/content/howto/integrations/embed-notebooks.md +++ b/docs/content/howto/integrations/embed-notebooks.md @@ -143,7 +143,7 @@ STEPS = 100 twists = math.pi * np.sin(np.linspace(0, math.tau, STEPS)) / 4 for t in range(STEPS): sleep(0.05) # delay to simulate a long-running computation - rr.set_index("step", sequence=t) + rr.set_index("step", seq=t) cube = build_color_grid(10, 10, 10, twist=twists[t]) rr.log("cube", rr.Points3D(cube.positions, colors=cube.colors, radii=0.5)) ``` diff --git a/docs/content/howto/logging/clears.md b/docs/content/howto/logging/clears.md index e036584adf8e..38901ca8c321 100644 --- a/docs/content/howto/logging/clears.md +++ b/docs/content/howto/logging/clears.md @@ -13,7 +13,7 @@ For example, if you have an object tracking application, your code might look so … for frame in sensors.read(): # Associate the following logs with `frame == frame.id` - rr.set_index("frame", sequence=frame.id) + rr.set_index("frame", seq=frame.id) # Do the actual tracking update tracker.update(frame) if tracker.is_lost: @@ -33,7 +33,7 @@ In some cases, the best approach may be to rethink how you log data to better ex … for frame in sensors.read(): # Associate the following logs with `frame = frame.id` - rr.set_index("frame", sequence=frame.id) + rr.set_index("frame", seq=frame.id) # Log every image that comes in rr.log("input/image", rr.Image(frame.image)) if frame.id % 10 == 0: @@ -63,7 +63,7 @@ class Detector: … for frame in sensors.read(): # Associate the following logs with `frame = frame.id` - rr.set_index("frame", sequence=frame.id) + rr.set_index("frame", seq=frame.id) # Log every image that comes in rr.log("input/image", rr.Image(frame.image)) if frame.id % 10 == 0: diff --git a/docs/content/reference/migration/migration-0-17.md b/docs/content/reference/migration/migration-0-17.md index d364169f68cc..afb233d19080 100644 --- a/docs/content/reference/migration/migration-0-17.md +++ b/docs/content/reference/migration/migration-0-17.md @@ -41,7 +41,7 @@ For example, setting color and enabling the `SeriesPoint` visualizer was previou rr.log("data", rr.SeriesPoint(color=[255, 255, 0]), static=True) for t in range(1000): - rr.set_index("frame_nr", sequence=t) + rr.set_time_sequence("frame_nr", t) rr.log("data",rr.Scalar(get_data(t))), rr.send_blueprint( @@ -53,7 +53,7 @@ Now the override can be specified from the blueprint, removing the need to inclu ```python for t in range(1000): - rr.set_index("frame_nr", sequence=t) + rr.set_time_sequence("frame_nr", t) rr.log("data",rr.Scalar(get_data(t))), rr.send_blueprint( diff --git a/docs/content/reference/migration/migration-0-23.md b/docs/content/reference/migration/migration-0-23.md index 6a50d834b14c..67097aba0676 100644 --- a/docs/content/reference/migration/migration-0-23.md +++ b/docs/content/reference/migration/migration-0-23.md @@ -14,7 +14,7 @@ We're moving towards a more explicit API for setting time, where you need to exp Previously we would infer the user intent at runtime based on the value: if it was large enough, it was interpreted as time since the Unix epoch, otherwise it was interpreted as a timedelta. To this end, we're deprecated `rr.set_time_seconds`, `rr.set_time_nanos`, as well as `rr.set_time_sequence` and replaced them with `rr.set_index`. -`set_index` takes either a `sequence=`, `timedelta=` or `datetime=` argument. +`set_index` takes either a `seq=`, `timedelta=` or `datetime=` argument. `timedelta` must be either: * seconds as `int` or `float` @@ -28,7 +28,7 @@ To this end, we're deprecated `rr.set_time_seconds`, `rr.set_time_nanos`, as wel ### Migrating ##### `rr.set_sequence("foo", 42)` -New: `rr.set_index("foo", sequence=42)` +New: `rr.set_index("foo", seq=42)` ##### `rr.set_time_seconds("foo", duration_seconds)` When using relative times (durations/timedeltas): `rr.set_index("foo", timedelta=duration_seconds)` @@ -59,7 +59,7 @@ The migration is very similar to the above. ### Migration ##### `rr.TimeSequenceColumn("foo", values)` -New: `rr.IndexColumn("foo", sequence=values)` +New: `rr.IndexColumn("foo", seq=values)` ##### `rr.TimeSecondsColumn("foo", duration_seconds)` New: `rr.IndexColumn("foo", timedelta=duration_seconds)` diff --git a/docs/snippets/all/archetypes/image_column_updates.py b/docs/snippets/all/archetypes/image_column_updates.py index 63fa0d009e1e..b0036ba96fa5 100644 --- a/docs/snippets/all/archetypes/image_column_updates.py +++ b/docs/snippets/all/archetypes/image_column_updates.py @@ -26,7 +26,7 @@ # Send all images at once. rr.send_columns( "images", - indexes=[rr.IndexColumn("step", sequence=times)], + indexes=[rr.IndexColumn("step", seq=times)], # Reshape the images so `Image` can tell that this is several blobs. # # Note that the `Image` consumes arrays of bytes, so we should ensure that we take a diff --git a/docs/snippets/all/archetypes/image_row_updates.py b/docs/snippets/all/archetypes/image_row_updates.py index e3ddb09bfc54..598471cae2a3 100644 --- a/docs/snippets/all/archetypes/image_row_updates.py +++ b/docs/snippets/all/archetypes/image_row_updates.py @@ -10,7 +10,7 @@ rr.init("rerun_example_image_row_updates", spawn=True) for t in range(20): - rr.set_index("time", sequence=t) + rr.set_index("time", seq=t) image = np.zeros((200, 300, 3), dtype=np.uint8) image[:, :, 2] = 255 diff --git a/docs/snippets/all/archetypes/instance_poses3d_combined.py b/docs/snippets/all/archetypes/instance_poses3d_combined.py index afd44fd82333..b4e0eea762e2 100644 --- a/docs/snippets/all/archetypes/instance_poses3d_combined.py +++ b/docs/snippets/all/archetypes/instance_poses3d_combined.py @@ -5,14 +5,14 @@ rr.init("rerun_example_instance_pose3d_combined", spawn=True) -rr.set_index("frame", sequence=0) +rr.set_index("frame", seq=0) # Log a box and points further down in the hierarchy. rr.log("world/box", rr.Boxes3D(half_sizes=[[1.0, 1.0, 1.0]])) rr.log("world/box/points", rr.Points3D(np.vstack([xyz.ravel() for xyz in np.mgrid[3 * [slice(-10, 10, 10j)]]]).T)) for i in range(0, 180): - rr.set_index("frame", sequence=i) + rr.set_index("frame", seq=i) # Log a regular transform which affects both the box and the points. rr.log("world/box", rr.Transform3D(rotation_axis_angle=rr.RotationAxisAngle([0, 0, 1], angle=rr.Angle(deg=i * 2)))) diff --git a/docs/snippets/all/archetypes/mesh3d_instancing.py b/docs/snippets/all/archetypes/mesh3d_instancing.py index 24b0edcf51e2..6e74a7ea4a72 100644 --- a/docs/snippets/all/archetypes/mesh3d_instancing.py +++ b/docs/snippets/all/archetypes/mesh3d_instancing.py @@ -3,7 +3,7 @@ import rerun as rr rr.init("rerun_example_mesh3d_instancing", spawn=True) -rr.set_index("frame", sequence=0) +rr.set_index("frame", seq=0) rr.log( "shape", @@ -20,7 +20,7 @@ ) for i in range(0, 100): - rr.set_index("frame", sequence=i) + rr.set_index("frame", seq=i) rr.log( "shape", rr.InstancePoses3D( diff --git a/docs/snippets/all/archetypes/mesh3d_partial_updates.py b/docs/snippets/all/archetypes/mesh3d_partial_updates.py index 20a2d9690ceb..7d9541757e2e 100644 --- a/docs/snippets/all/archetypes/mesh3d_partial_updates.py +++ b/docs/snippets/all/archetypes/mesh3d_partial_updates.py @@ -8,7 +8,7 @@ vertex_positions = np.array([[-1.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]], dtype=np.float32) # Log the initial state of our triangle -rr.set_index("frame", sequence=0) +rr.set_index("frame", seq=0) rr.log( "triangle", rr.Mesh3D( @@ -21,5 +21,5 @@ # Only update its vertices' positions each frame factors = np.abs(np.sin(np.arange(1, 300, dtype=np.float32) * 0.04)) for i, factor in enumerate(factors): - rr.set_index("frame", sequence=i) + rr.set_index("frame", seq=i) rr.log("triangle", rr.Mesh3D.from_fields(vertex_positions=vertex_positions * factor)) diff --git a/docs/snippets/all/archetypes/points3d_partial_updates.py b/docs/snippets/all/archetypes/points3d_partial_updates.py index be2c8e7ed5bd..6936e9c4fa58 100644 --- a/docs/snippets/all/archetypes/points3d_partial_updates.py +++ b/docs/snippets/all/archetypes/points3d_partial_updates.py @@ -6,7 +6,7 @@ positions = [[i, 0, 0] for i in range(0, 10)] -rr.set_index("frame", sequence=0) +rr.set_index("frame", seq=0) rr.log("points", rr.Points3D(positions)) for i in range(0, 10): @@ -14,9 +14,9 @@ radii = [0.6 if n < i else 0.2 for n in range(0, 10)] # Update only the colors and radii, leaving everything else as-is. - rr.set_index("frame", sequence=i) + rr.set_index("frame", seq=i) rr.log("points", rr.Points3D.from_fields(radii=radii, colors=colors)) # Update the positions and radii, and clear everything else in the process. -rr.set_index("frame", sequence=20) +rr.set_index("frame", seq=20) rr.log("points", rr.Points3D.from_fields(clear_unset=True, positions=positions, radii=0.3)) diff --git a/docs/snippets/all/archetypes/scalar_column_updates.py b/docs/snippets/all/archetypes/scalar_column_updates.py index 21a084ad375e..979e8550d38d 100644 --- a/docs/snippets/all/archetypes/scalar_column_updates.py +++ b/docs/snippets/all/archetypes/scalar_column_updates.py @@ -16,6 +16,6 @@ rr.send_columns( "scalars", - indexes=[rr.IndexColumn("step", sequence=times)], + indexes=[rr.IndexColumn("step", seq=times)], columns=rr.Scalar.columns(scalar=scalars), ) diff --git a/docs/snippets/all/archetypes/scalar_multiple_plots.py b/docs/snippets/all/archetypes/scalar_multiple_plots.py index bc4b3c1d5d7d..973c7f9585ed 100644 --- a/docs/snippets/all/archetypes/scalar_multiple_plots.py +++ b/docs/snippets/all/archetypes/scalar_multiple_plots.py @@ -18,7 +18,7 @@ # Log the data on a timeline called "step". for t in range(0, int(tau * 2 * 100.0)): - rr.set_index("step", sequence=t) + rr.set_index("step", seq=t) rr.log("trig/sin", rr.Scalar(sin(float(t) / 100.0))) rr.log("trig/cos", rr.Scalar(cos(float(t) / 100.0))) diff --git a/docs/snippets/all/archetypes/scalar_row_updates.py b/docs/snippets/all/archetypes/scalar_row_updates.py index 1f5e7b4fea30..8bb87c906a37 100644 --- a/docs/snippets/all/archetypes/scalar_row_updates.py +++ b/docs/snippets/all/archetypes/scalar_row_updates.py @@ -13,5 +13,5 @@ rr.init("rerun_example_scalar_row_updates", spawn=True) for step in range(64): - rr.set_index("step", sequence=step) + rr.set_index("step", seq=step) rr.log("scalars", rr.Scalar(math.sin(step / 10.0))) diff --git a/docs/snippets/all/archetypes/scalar_simple.py b/docs/snippets/all/archetypes/scalar_simple.py index bf30e7a6342e..0564fe0198fd 100644 --- a/docs/snippets/all/archetypes/scalar_simple.py +++ b/docs/snippets/all/archetypes/scalar_simple.py @@ -8,5 +8,5 @@ # Log the data on a timeline called "step". for step in range(0, 64): - rr.set_index("step", sequence=step) + rr.set_index("step", seq=step) rr.log("scalar", rr.Scalar(math.sin(step / 10.0))) diff --git a/docs/snippets/all/archetypes/series_line_style.py b/docs/snippets/all/archetypes/series_line_style.py index b22baed6bdfe..efbcc67c89cd 100644 --- a/docs/snippets/all/archetypes/series_line_style.py +++ b/docs/snippets/all/archetypes/series_line_style.py @@ -14,7 +14,7 @@ # Log the data on a timeline called "step". for t in range(0, int(tau * 2 * 100.0)): - rr.set_index("step", sequence=t) + rr.set_index("step", seq=t) rr.log("trig/sin", rr.Scalar(sin(float(t) / 100.0))) rr.log("trig/cos", rr.Scalar(cos(float(t) / 100.0))) diff --git a/docs/snippets/all/archetypes/series_point_style.py b/docs/snippets/all/archetypes/series_point_style.py index 2af93f714096..3935e6653c87 100644 --- a/docs/snippets/all/archetypes/series_point_style.py +++ b/docs/snippets/all/archetypes/series_point_style.py @@ -32,7 +32,7 @@ # Log the data on a timeline called "step". for t in range(0, int(tau * 2 * 10.0)): - rr.set_index("step", sequence=t) + rr.set_index("step", seq=t) rr.log("trig/sin", rr.Scalar(sin(float(t) / 10.0))) rr.log("trig/cos", rr.Scalar(cos(float(t) / 10.0))) diff --git a/docs/snippets/all/archetypes/transform3d_axes.py b/docs/snippets/all/archetypes/transform3d_axes.py index 89db3ce7eaff..f1512ca00386 100644 --- a/docs/snippets/all/archetypes/transform3d_axes.py +++ b/docs/snippets/all/archetypes/transform3d_axes.py @@ -4,14 +4,14 @@ rr.init("rerun_example_transform3d_axes", spawn=True) -rr.set_index("step", sequence=0) +rr.set_index("step", seq=0) # Set the axis lengths for all the transforms rr.log("base", rr.Transform3D(axis_length=1)) # Now sweep out a rotation relative to the base for deg in range(360): - rr.set_index("step", sequence=deg) + rr.set_index("step", seq=deg) rr.log( "base/rotated", rr.Transform3D( diff --git a/docs/snippets/all/archetypes/transform3d_column_updates.py b/docs/snippets/all/archetypes/transform3d_column_updates.py index bec80a7f32a1..67c59bd00864 100644 --- a/docs/snippets/all/archetypes/transform3d_column_updates.py +++ b/docs/snippets/all/archetypes/transform3d_column_updates.py @@ -15,7 +15,7 @@ def truncated_radians(deg: float) -> float: rr.init("rerun_example_transform3d_column_updates", spawn=True) -rr.set_index("tick", sequence=0) +rr.set_index("tick", seq=0) rr.log( "box", rr.Boxes3D(half_sizes=[4.0, 2.0, 1.0], fill_mode=rr.components.FillMode.Solid), @@ -24,7 +24,7 @@ def truncated_radians(deg: float) -> float: rr.send_columns( "box", - indexes=[rr.IndexColumn("tick", sequence=range(1, 101))], + indexes=[rr.IndexColumn("tick", seq=range(1, 101))], columns=rr.Transform3D.columns( translation=[[0, 0, t / 10.0] for t in range(100)], rotation_axis_angle=[ diff --git a/docs/snippets/all/archetypes/transform3d_row_updates.py b/docs/snippets/all/archetypes/transform3d_row_updates.py index 1e39f58f6096..756323d8c109 100644 --- a/docs/snippets/all/archetypes/transform3d_row_updates.py +++ b/docs/snippets/all/archetypes/transform3d_row_updates.py @@ -15,7 +15,7 @@ def truncated_radians(deg: float) -> float: rr.init("rerun_example_transform3d_row_updates", spawn=True) -rr.set_index("tick", sequence=0) +rr.set_index("tick", seq=0) rr.log( "box", rr.Boxes3D(half_sizes=[4.0, 2.0, 1.0], fill_mode=rr.components.FillMode.Solid), @@ -23,7 +23,7 @@ def truncated_radians(deg: float) -> float: ) for t in range(100): - rr.set_index("tick", sequence=t + 1) + rr.set_index("tick", seq=t + 1) rr.log( "box", rr.Transform3D( diff --git a/docs/snippets/all/concepts/different_data_per_timeline.py b/docs/snippets/all/concepts/different_data_per_timeline.py index 72439313ccad..fefbc80cf45d 100644 --- a/docs/snippets/all/concepts/different_data_per_timeline.py +++ b/docs/snippets/all/concepts/different_data_per_timeline.py @@ -5,7 +5,7 @@ rr.init("rerun_example_different_data_per_timeline", spawn=True) -rr.set_index("blue timeline", sequence=0) +rr.set_index("blue timeline", seq=0) rr.set_index("red timeline", timedelta=0.0) rr.log("points", rr.Points2D([[0, 0], [1, 1]], radii=rr.Radius.ui_points(10.0))) @@ -16,7 +16,7 @@ # And a blue color on the other. rr.reset_time() # Clears all set timeline info. -rr.set_index("blue timeline", sequence=1) +rr.set_index("blue timeline", seq=1) rr.log("points", [rr.components.Color(0x0000FFFF)]) diff --git a/docs/snippets/all/concepts/indices.py b/docs/snippets/all/concepts/indices.py index 5dbd9e05b0d5..4ed2f6c0cb20 100644 --- a/docs/snippets/all/concepts/indices.py +++ b/docs/snippets/all/concepts/indices.py @@ -7,7 +7,7 @@ rr.init("rerun_example_different_indices", spawn=True) -rr.set_index("frame_nr", sequence=42) +rr.set_index("frame_nr", seq=42) rr.set_index("elapsed", timedelta=12) # elapsed seconds rr.set_index("time", datetime=1_741_017_564) # Seconds since unix epoch rr.set_index("time", datetime=datetime.fromisoformat("2025-03-03T15:59:24")) diff --git a/docs/snippets/all/concepts/static/log_temporal_10x.py b/docs/snippets/all/concepts/static/log_temporal_10x.py index ad23e89b4469..0af6285b4a19 100644 --- a/docs/snippets/all/concepts/static/log_temporal_10x.py +++ b/docs/snippets/all/concepts/static/log_temporal_10x.py @@ -1,3 +1,3 @@ -rr.set_index("frame", sequence=4) +rr.set_index("frame", seq=4) for _ in range(10): rr.log("camera/image", camera.save_current_frame()) diff --git a/docs/snippets/all/howto/any_batch_value_column_updates.py b/docs/snippets/all/howto/any_batch_value_column_updates.py index a4754fc6605c..0ea1f9002389 100644 --- a/docs/snippets/all/howto/any_batch_value_column_updates.py +++ b/docs/snippets/all/howto/any_batch_value_column_updates.py @@ -14,7 +14,7 @@ rr.send_columns( "/", - indexes=[rr.IndexColumn("step", sequence=timestamps)], + indexes=[rr.IndexColumn("step", seq=timestamps)], columns=[ # log one value per timestamp rr.AnyBatchValue.column("custom_component_single", one_per_timestamp), diff --git a/docs/snippets/all/howto/any_values_column_updates.py b/docs/snippets/all/howto/any_values_column_updates.py index 26565ef9a1ec..91b356479a5f 100644 --- a/docs/snippets/all/howto/any_values_column_updates.py +++ b/docs/snippets/all/howto/any_values_column_updates.py @@ -15,6 +15,6 @@ rr.send_columns( "/", - indexes=[rr.IndexColumn("step", sequence=timestamps)], + indexes=[rr.IndexColumn("step", seq=timestamps)], columns=rr.AnyValues.columns(sin=np.sin(timestamps / 10.0), cos=np.cos(timestamps / 10.0)), ) diff --git a/docs/snippets/all/howto/any_values_row_updates.py b/docs/snippets/all/howto/any_values_row_updates.py index f0fffffe6178..6a67498d61d6 100644 --- a/docs/snippets/all/howto/any_values_row_updates.py +++ b/docs/snippets/all/howto/any_values_row_updates.py @@ -13,5 +13,5 @@ rr.init("rerun_example_any_values_row_updates", spawn=True) for step in range(64): - rr.set_index("step", sequence=step) + rr.set_index("step", seq=step) rr.log("/", rr.AnyValues(sin=math.sin(step / 10.0), cos=math.cos(step / 10.0))) diff --git a/docs/snippets/all/tutorials/data_out.py b/docs/snippets/all/tutorials/data_out.py index b578bbdcf2af..f4ec5aaadb98 100644 --- a/docs/snippets/all/tutorials/data_out.py +++ b/docs/snippets/all/tutorials/data_out.py @@ -32,7 +32,7 @@ # log the jaw open state signal as a scalar rr.send_columns( "/jaw_open_state", - indexes=[rr.IndexColumn("frame_nr", sequence=df["frame_nr"])], + indexes=[rr.IndexColumn("frame_nr", seq=df["frame_nr"])], columns=rr.Scalar.columns(scalar=df["jawOpenState"]), ) @@ -41,6 +41,6 @@ rr.log(target_entity, rr.Boxes2D.from_fields(show_labels=True), static=True) rr.send_columns( target_entity, - indexes=[rr.IndexColumn("frame_nr", sequence=df["frame_nr"])], + indexes=[rr.IndexColumn("frame_nr", seq=df["frame_nr"])], columns=rr.Boxes2D.columns(labels=np.where(df["jawOpenState"], "OPEN", "CLOSE")), ) diff --git a/docs/snippets/all/tutorials/timelines_example.py b/docs/snippets/all/tutorials/timelines_example.py index bf220a10956c..23f59e849bb1 100644 --- a/docs/snippets/all/tutorials/timelines_example.py +++ b/docs/snippets/all/tutorials/timelines_example.py @@ -1,5 +1,5 @@ for frame in read_sensor_frames(): - rr.set_index("frame_idx", sequence=frame.idx) + rr.set_index("frame_idx", seq=frame.idx) rr.set_index("sensor_time", datetime=frame.timestamp) rr.log("sensor/points", rr.Points3D(frame.points)) diff --git a/docs/snippets/all/tutorials/visualizer-overrides.py b/docs/snippets/all/tutorials/visualizer-overrides.py index 508f8375fd95..dded680f7965 100644 --- a/docs/snippets/all/tutorials/visualizer-overrides.py +++ b/docs/snippets/all/tutorials/visualizer-overrides.py @@ -9,7 +9,7 @@ # Log the data on a timeline called "step". for t in range(0, int(tau * 2 * 10.0)): - rr.set_index("step", sequence=t) + rr.set_index("step", seq=t) rr.log("trig/sin", rr.Scalar(sin(float(t) / 10.0))) rr.log("trig/cos", rr.Scalar(cos(float(t) / 10.0))) diff --git a/docs/snippets/all/views/text_log.py b/docs/snippets/all/views/text_log.py index 5a1cc717ed93..945c134ddac3 100644 --- a/docs/snippets/all/views/text_log.py +++ b/docs/snippets/all/views/text_log.py @@ -5,12 +5,12 @@ rr.init("rerun_example_text_log", spawn=True) -rr.set_index("time", sequence=0) +rr.set_index("time", seq=0) rr.log("log/status", rr.TextLog("Application started.", level=rr.TextLogLevel.INFO)) -rr.set_index("time", sequence=5) +rr.set_index("time", seq=5) rr.log("log/other", rr.TextLog("A warning.", level=rr.TextLogLevel.WARN)) for i in range(10): - rr.set_index("time", sequence=i) + rr.set_index("time", seq=i) rr.log("log/status", rr.TextLog(f"Processing item {i}.", level=rr.TextLogLevel.INFO)) # Create a text view that displays all logs. diff --git a/docs/snippets/all/views/timeseries.py b/docs/snippets/all/views/timeseries.py index cabb7af7b82b..dd58250539c9 100644 --- a/docs/snippets/all/views/timeseries.py +++ b/docs/snippets/all/views/timeseries.py @@ -12,7 +12,7 @@ rr.log("trig/cos", rr.SeriesLine(color=[0, 255, 0], name="cos(0.01t)"), static=True) rr.log("trig/cos", rr.SeriesLine(color=[0, 0, 255], name="cos(0.01t) scaled"), static=True) for t in range(0, int(math.pi * 4 * 100.0)): - rr.set_index("timeline0", sequence=t) + rr.set_index("timeline0", seq=t) rr.set_index("timeline1", timedelta=t) rr.log("trig/sin", rr.Scalar(math.sin(float(t) / 100.0))) rr.log("trig/cos", rr.Scalar(math.cos(float(t) / 100.0))) diff --git a/examples/cpp/stereo_vision_slam/README.md b/examples/cpp/stereo_vision_slam/README.md index 11701eb21c9b..594553cc33c2 100644 --- a/examples/cpp/stereo_vision_slam/README.md +++ b/examples/cpp/stereo_vision_slam/README.md @@ -140,7 +140,7 @@ rec.log(entity_name, void Viewer::Plot(std::string plot_name, double value, unsigned long maxkeyframe_id) { // … - rec.set_index("max_keyframe_id", sequence=maxkeyframe_id); + rec.set_index("max_keyframe_id", seq=maxkeyframe_id); rec.log(plot_name, rerun::Scalar(value)); } ``` diff --git a/examples/python/controlnet/README.md b/examples/python/controlnet/README.md index 1d13f44a1cb4..9569b3ddb440 100644 --- a/examples/python/controlnet/README.md +++ b/examples/python/controlnet/README.md @@ -52,7 +52,7 @@ We use a custom callback function for ControlNet that logs the output and the la def controlnet_callback( iteration: int, timestep: float, latents: torch.Tensor, pipeline: StableDiffusionXLControlNetPipeline ) -> None: - rr.set_index("iteration", sequence=iteration) + rr.set_index("iteration", seq=iteration) rr.set_index("timestep", timedelta=timestep) rr.log("output", rr.Image(image)) rr.log("latent", rr.Tensor(latents.squeeze(), dim_names=["channel", "height", "width"])) diff --git a/examples/python/controlnet/controlnet.py b/examples/python/controlnet/controlnet.py index e2b0b59806f1..e6e0db0b07c8 100755 --- a/examples/python/controlnet/controlnet.py +++ b/examples/python/controlnet/controlnet.py @@ -30,7 +30,7 @@ def controlnet_callback( pipe: StableDiffusionXLControlNetPipeline, step_index: int, timestep: float, callback_kwargs: dict[str, Any] ) -> dict[str, Any]: - rr.set_index("iteration", sequence=step_index) + rr.set_index("iteration", seq=step_index) rr.set_index("timestep", timedelta=timestep) latents = callback_kwargs["latents"] diff --git a/examples/python/depth_guided_stable_diffusion/README.md b/examples/python/depth_guided_stable_diffusion/README.md index 283481c8fe43..cb846e14bb1f 100644 --- a/examples/python/depth_guided_stable_diffusion/README.md +++ b/examples/python/depth_guided_stable_diffusion/README.md @@ -64,8 +64,8 @@ rr.log("diffusion/latents", rr.Tensor(latents, dim_names=["b", "c", "h", "w"])) ### Denoising loop For each step in the denoising loop we set a time sequence with step and timestep and log the latent model input, noise predictions, latents and image. This make is possible for us to see all denoising steps in the Rerun viewer. ```python -rr.set_index("step", sequence=i) -rr.set_index("timestep", sequence=t) +rr.set_index("step", seq=i) +rr.set_index("timestep", seq=t) rr.log("diffusion/latent_model_input", rr.Tensor(latent_model_input)) rr.log("diffusion/noise_pred", rr.Tensor(noise_pred, dim_names=["b", "c", "h", "w"])) rr.log("diffusion/latents", rr.Tensor(latents, dim_names=["b", "c", "h", "w"])) diff --git a/examples/python/depth_guided_stable_diffusion/depth_guided_stable_diffusion/huggingface_pipeline.py b/examples/python/depth_guided_stable_diffusion/depth_guided_stable_diffusion/huggingface_pipeline.py index 1acf92bdccd8..b632cf4abab4 100644 --- a/examples/python/depth_guided_stable_diffusion/depth_guided_stable_diffusion/huggingface_pipeline.py +++ b/examples/python/depth_guided_stable_diffusion/depth_guided_stable_diffusion/huggingface_pipeline.py @@ -771,7 +771,7 @@ def __call__( "Passing `callback_steps` as an input argument to `__call__` is deprecated, consider use `callback_on_step_end`", ) - rr.set_index("step", sequence=-1) + rr.set_index("step", seq=-1) # 1. Check inputs self.check_inputs( @@ -856,8 +856,8 @@ def __call__( self._num_timesteps = len(timesteps) with self.progress_bar(total=num_inference_steps) as progress_bar: for i, t in enumerate(timesteps): - rr.set_index("step", sequence=i) - rr.set_index("timestep", sequence=t) + rr.set_index("step", seq=i) + rr.set_index("timestep", seq=t) # expand the latents if we are doing classifier free guidance latent_model_input = torch.cat([latents] * 2) if self.do_classifier_free_guidance else latents diff --git a/examples/python/detect_and_track_objects/README.md b/examples/python/detect_and_track_objects/README.md index 8e123bc9354b..447267ef74d6 100644 --- a/examples/python/detect_and_track_objects/README.md +++ b/examples/python/detect_and_track_objects/README.md @@ -32,7 +32,7 @@ The visualizations in this example were created with the following Rerun code. For each processed video frame, all data sent to Rerun is associated with the [`timelines`](https://www.rerun.io/docs/concepts/timelines) `frame_idx`. ```python -rr.set_index("frame", sequence=frame_idx) +rr.set_index("frame", seq=frame_idx) ``` ### Video diff --git a/examples/python/detect_and_track_objects/detect_and_track_objects.py b/examples/python/detect_and_track_objects/detect_and_track_objects.py index c2bc2280e8b2..116b126e7039 100755 --- a/examples/python/detect_and_track_objects/detect_and_track_objects.py +++ b/examples/python/detect_and_track_objects/detect_and_track_objects.py @@ -357,7 +357,7 @@ def track_objects(video_path: str, *, max_frame_count: int | None) -> None: break ret, bgr = cap.read() - rr.set_index("frame", sequence=frame_idx) + rr.set_index("frame", seq=frame_idx) if not ret: logging.info("End of video") diff --git a/examples/python/external_data_loader/rerun-loader-python-file.py b/examples/python/external_data_loader/rerun-loader-python-file.py index 4d832a9b2058..815352d7b95d 100755 --- a/examples/python/external_data_loader/rerun-loader-python-file.py +++ b/examples/python/external_data_loader/rerun-loader-python-file.py @@ -94,7 +94,7 @@ def set_time_from_args() -> None: if len(parts) != 2: continue timeline_name, time = parts - rr.set_index(timeline_name, sequence=int(time)) + rr.set_index(timeline_name, seq=int(time)) if __name__ == "__main__": diff --git a/examples/python/face_tracking/README.md b/examples/python/face_tracking/README.md index f04d33ff3686..443c1a479b98 100644 --- a/examples/python/face_tracking/README.md +++ b/examples/python/face_tracking/README.md @@ -36,7 +36,7 @@ For each processed video frame, all data sent to Rerun is associated with the tw ```python rr.set_index("time", timedelta=bgr_frame.time) -rr.set_index("frame_idx", sequence=bgr_frame.idx) +rr.set_index("frame_idx", seq=bgr_frame.idx) ``` ### Video diff --git a/examples/python/face_tracking/face_tracking.py b/examples/python/face_tracking/face_tracking.py index c5113c708256..62e30adb1778 100755 --- a/examples/python/face_tracking/face_tracking.py +++ b/examples/python/face_tracking/face_tracking.py @@ -391,7 +391,7 @@ def run_from_video_capture(vid: int | str, max_dim: int | None, max_frame_count: frame_time_nano = int(frame_idx * 1000 / fps * 1e6) # log data - rr.set_index("frame_nr", sequence=frame_idx) + rr.set_index("frame_nr", seq=frame_idx) rr.set_index("frame_time", timedelta=1e-9 * frame_time_nano) detector.detect_and_log(frame, frame_time_nano) landmarker.detect_and_log(frame, frame_time_nano) diff --git a/examples/python/gesture_detection/README.md b/examples/python/gesture_detection/README.md index 3c455a6c7c19..6cdd57462c11 100644 --- a/examples/python/gesture_detection/README.md +++ b/examples/python/gesture_detection/README.md @@ -36,7 +36,7 @@ The visualizations in this example were created with the following Rerun code. For each processed video frame, all data sent to Rerun is associated with the two [`timelines`](https://www.rerun.io/docs/concepts/timelines) `time` and `frame_idx`. ```python -rr.set_index("frame_nr", sequence=frame_idx) +rr.set_index("frame_nr", seq=frame_idx) rr.set_index("frame_time", timedelta=1e-9 * frame_time_nano) ``` diff --git a/examples/python/gesture_detection/gesture_detection.py b/examples/python/gesture_detection/gesture_detection.py index b7e20e073d06..0522b3fe7c86 100755 --- a/examples/python/gesture_detection/gesture_detection.py +++ b/examples/python/gesture_detection/gesture_detection.py @@ -239,7 +239,7 @@ def run_from_video_capture(vid: int | str, max_frame_count: int | None) -> None: frame_time_nano = int(frame_idx * 1000 / fps * 1e6) # log data - rr.set_index("frame_nr", sequence=frame_idx) + rr.set_index("frame_nr", seq=frame_idx) rr.set_index("frame_time", timedelta=1e-9 * frame_time_nano) detector.detect_and_log(frame, frame_time_nano) rr.log("media/video", rr.Image(frame, color_model="BGR").compress(jpeg_quality=75)) diff --git a/examples/python/graphs/graphs.py b/examples/python/graphs/graphs.py index 37c63b5106f2..7b5ff9a9867d 100644 --- a/examples/python/graphs/graphs.py +++ b/examples/python/graphs/graphs.py @@ -95,7 +95,7 @@ def log_trees() -> None: colors.append(random.choice(color_scheme)) edges.append((existing, new_node)) - rr.set_index("frame", sequence=i) + rr.set_index("frame", seq=i) rr.log( "node_link", rr.GraphNodes(nodes, labels=nodes, radii=radii, colors=colors), @@ -141,7 +141,7 @@ def log_markov_chain() -> None: colors = [inactive_color] * len(state_names) colors[next_state_index] = active_colors[next_state_index] - rr.set_index("frame", sequence=i) + rr.set_index("frame", seq=i) rr.log( "markov_chain", rr.GraphNodes(state_names, labels=state_names, colors=colors, positions=positions), diff --git a/examples/python/human_pose_tracking/README.md b/examples/python/human_pose_tracking/README.md index f92abe2d1874..7f1b742f0606 100644 --- a/examples/python/human_pose_tracking/README.md +++ b/examples/python/human_pose_tracking/README.md @@ -37,7 +37,7 @@ For each processed video frame, all data sent to Rerun is associated with the tw ```python rr.set_index("time", timedelta=bgr_frame.time) -rr.set_index("frame_idx", sequence=bgr_frame.idx) +rr.set_index("frame_idx", seq=bgr_frame.idx) ``` ### Video diff --git a/examples/python/human_pose_tracking/human_pose_tracking.py b/examples/python/human_pose_tracking/human_pose_tracking.py index 7041b32fc536..91bcb0d8f5a0 100755 --- a/examples/python/human_pose_tracking/human_pose_tracking.py +++ b/examples/python/human_pose_tracking/human_pose_tracking.py @@ -79,7 +79,7 @@ def track_pose(video_path: str, model_path: str, *, segment: bool, max_frame_cou mp_image = mp.Image(image_format=mp.ImageFormat.SRGB, data=bgr_frame.data) rr.set_index("time", timedelta=bgr_frame.time) - rr.set_index("frame_idx", sequence=bgr_frame.idx) + rr.set_index("frame_idx", seq=bgr_frame.idx) results = pose_landmarker.detect_for_video(mp_image, int(bgr_frame.time * 1000)) h, w, _ = bgr_frame.data.shape diff --git a/examples/python/incremental_logging/incremental_logging.py b/examples/python/incremental_logging/incremental_logging.py index c6bf79e2c5b8..b765b7308c50 100755 --- a/examples/python/incremental_logging/incremental_logging.py +++ b/examples/python/incremental_logging/incremental_logging.py @@ -22,7 +22,7 @@ ```python # Only log colors and radii once. # Logging as static would also work (i.e. `static=True`). -rr.set_index("frame_nr", sequence=0) +rr.set_index("frame_nr", seq=0) rr.log("points", rr.Points3D.from_fields(colors=0xFF0000FF, radii=0.1)) rng = default_rng(12345) @@ -31,7 +31,7 @@ # # They will automatically re-use the colors and radii logged at the beginning. for i in range(10): - rr.set_index("frame_nr", sequence=i) + rr.set_index("frame_nr", seq=i) rr.log("points", rr.Points3D.from_fields(positions=rng.uniform(-5, 5, size=[10, 3]))) ``` @@ -46,7 +46,7 @@ # Only log colors and radii once. # Logging as static would also work (i.e. `static=True`). -rr.set_index("frame_nr", sequence=0) +rr.set_index("frame_nr", seq=0) rr.log("points", rr.Points3D.from_fields(colors=0xFF0000FF, radii=0.1)) rng = default_rng(12345) @@ -55,7 +55,7 @@ # # They will automatically re-use the colors and radii logged at the beginning. for i in range(10): - rr.set_index("frame_nr", sequence=i) + rr.set_index("frame_nr", seq=i) rr.log("points", rr.Points3D.from_fields(positions=rng.uniform(-5, 5, size=[10, 3]))) rr.script_teardown(args) diff --git a/examples/python/live_camera_edge_detection/live_camera_edge_detection.py b/examples/python/live_camera_edge_detection/live_camera_edge_detection.py index 9785f0b3d487..2d3b89b695a3 100755 --- a/examples/python/live_camera_edge_detection/live_camera_edge_detection.py +++ b/examples/python/live_camera_edge_detection/live_camera_edge_detection.py @@ -38,7 +38,7 @@ def run_canny(num_frames: int | None) -> None: if frame_time_ms != 0: rr.set_index("frame_time", timedelta=1e-3 * frame_time_ms) - rr.set_index("frame_nr", sequence=frame_nr) + rr.set_index("frame_nr", seq=frame_nr) frame_nr += 1 # Log the original image diff --git a/examples/python/live_depth_sensor/README.md b/examples/python/live_depth_sensor/README.md index 6577cae28440..8e875b10dd2d 100644 --- a/examples/python/live_depth_sensor/README.md +++ b/examples/python/live_depth_sensor/README.md @@ -67,7 +67,7 @@ rr.log( ) ``` ```python -rr.set_index("frame_nr", sequence=frame_nr) +rr.set_index("frame_nr", seq=frame_nr) rr.log("realsense/rgb/image", rr.Image(color_image)) ``` @@ -87,7 +87,7 @@ rr.log( ) ``` ```python -rr.set_index("frame_nr", sequence=frame_nr) +rr.set_index("frame_nr", seq=frame_nr) rr.log("realsense/depth/image", rr.DepthImage(depth_image, meter=1.0 / depth_units)) ``` diff --git a/examples/python/live_depth_sensor/live_depth_sensor.py b/examples/python/live_depth_sensor/live_depth_sensor.py index a406b6f6a24f..1d40c885b367 100755 --- a/examples/python/live_depth_sensor/live_depth_sensor.py +++ b/examples/python/live_depth_sensor/live_depth_sensor.py @@ -69,7 +69,7 @@ def run_realsense(num_frames: int | None) -> None: if num_frames and frame_nr >= num_frames: break - rr.set_index("frame_nr", sequence=frame_nr) + rr.set_index("frame_nr", seq=frame_nr) frame_nr += 1 frames = pipe.wait_for_frames() diff --git a/examples/python/notebook/cube.ipynb b/examples/python/notebook/cube.ipynb index 9ed9ed2e27e2..c3b47d11174c 100644 --- a/examples/python/notebook/cube.ipynb +++ b/examples/python/notebook/cube.ipynb @@ -118,7 +118,7 @@ "STEPS = 100\n", "twists = math.pi * np.sin(np.linspace(0, math.tau, STEPS)) / 4\n", "for t in range(STEPS):\n", - " rr.set_index(\"step\", sequence=t)\n", + " rr.set_index(\"step\", seq=t)\n", " cube = build_color_grid(10, 10, 10, twist=twists[t])\n", " rr.log(\"cube\", rr.Points3D(cube.positions, colors=cube.colors, radii=0.5))\n", "\n", @@ -154,7 +154,7 @@ "twists = math.pi * np.sin(np.linspace(0, math.tau, STEPS)) / 4\n", "for t in range(STEPS):\n", " sleep(0.05)\n", - " rr.set_index(\"step\", sequence=t)\n", + " rr.set_index(\"step\", seq=t)\n", " cube = build_color_grid(10, 10, 10, twist=twists[t])\n", " rr.log(\"cube\", rr.Points3D(cube.positions, colors=cube.colors, radii=0.5))" ] @@ -180,7 +180,7 @@ "source": [ "for t in range(STEPS):\n", " sleep(0.01)\n", - " rr.set_index(\"step\", sequence=t)\n", + " rr.set_index(\"step\", seq=t)\n", " rr.log(\"cube\", rr.Transform3D(rotation=rr.RotationAxisAngle(axis=[1, 0, 0], degrees=t)))" ] }, @@ -206,7 +206,7 @@ "STEPS = 100\n", "twists = math.pi * np.sin(np.linspace(0, math.tau, STEPS)) / 4\n", "for t in range(STEPS):\n", - " rr.set_index(\"step\", sequence=t)\n", + " rr.set_index(\"step\", seq=t)\n", " h_grid = build_color_grid(10, 3, 3, twist=twists[t])\n", " rr.log(\"h_grid\", rr.Points3D(h_grid.positions, colors=h_grid.colors, radii=0.5))\n", " v_grid = build_color_grid(3, 3, 10, twist=twists[t])\n", @@ -428,7 +428,7 @@ "STEPS = 100\n", "twists = math.pi * np.sin(np.linspace(0, math.tau, STEPS)) / 4\n", "for t in range(STEPS):\n", - " rr.set_index(\"step\", sequence=t)\n", + " rr.set_index(\"step\", seq=t)\n", " cube = build_color_grid(10, 10, 10, twist=twists[t])\n", " rec.log(\"cube\", rr.Points3D(cube.positions, colors=cube.colors, radii=0.5))" ] @@ -468,7 +468,7 @@ "for t in range(STEPS):\n", " cube = build_color_grid(10, 10, 10, twist=twists[t])\n", " for rec in recordings:\n", - " rr.set_index(\"step\", sequence=t)\n", + " rr.set_index(\"step\", seq=t)\n", " rec.log(\"cube\", rr.Points3D(cube.positions, colors=rec_colors[rec.get_recording_id()], radii=0.5))" ] }, @@ -506,9 +506,9 @@ "outputs": [], "source": [ "viewer.set_active_recording(recording_id=\"example_a\")\n", - "viewer.set_time_ctrl(timeline=\"step\", sequence=25)\n", + "viewer.set_time_ctrl(timeline=\"step\", seq=25)\n", "viewer.set_active_recording(recording_id=\"example_b\")\n", - "viewer.set_time_ctrl(timeline=\"step\", sequence=75)" + "viewer.set_time_ctrl(timeline=\"step\", seq=75)" ] }, { diff --git a/examples/python/notebook/partial_updates.ipynb b/examples/python/notebook/partial_updates.ipynb index fe907c77d96a..85e5a8473560 100644 --- a/examples/python/notebook/partial_updates.ipynb +++ b/examples/python/notebook/partial_updates.ipynb @@ -105,7 +105,7 @@ "all_colors_slide_z = np.vstack([n * [(0, 0, 255)] * (positions < t) for t in times])\n", "\n", "rr.send_columns(\n", - " \"points\", [rr.IndexColumn(\"t\", sequence=times)], rr.Points3D.columns(colors=all_colors_slide_z).partition([n] * 10)\n", + " \"points\", [rr.IndexColumn(\"t\", seq=times)], rr.Points3D.columns(colors=all_colors_slide_z).partition([n] * 10)\n", ")" ] } diff --git a/examples/python/objectron/README.md b/examples/python/objectron/README.md index f6fd1897fae6..db300eb48f48 100644 --- a/examples/python/objectron/README.md +++ b/examples/python/objectron/README.md @@ -35,7 +35,7 @@ The visualizations in this example were created with the following Rerun code: For each processed frame, all data sent to Rerun is associated with the two [`timelines`](https://www.rerun.io/docs/concepts/timelines) `time` and `frame_idx`. ```python -rr.set_index("frame", sequence=sample.index) +rr.set_index("frame", seq=sample.index) rr.set_index("time", timedelta=sample.timestamp) ``` diff --git a/examples/python/objectron/objectron/__main__.py b/examples/python/objectron/objectron/__main__.py index 06a3a3d953d3..8757e12eeca4 100755 --- a/examples/python/objectron/objectron/__main__.py +++ b/examples/python/objectron/objectron/__main__.py @@ -109,7 +109,7 @@ def log_ar_frames(samples: Iterable[SampleARFrame], seq: Sequence) -> None: frame_times = [] for sample in samples: - rr.set_index("frame", sequence=sample.index) + rr.set_index("frame", seq=sample.index) rr.set_index("time", timedelta=sample.timestamp) frame_times.append(sample.timestamp) diff --git a/examples/python/open_photogrammetry_format/README.md b/examples/python/open_photogrammetry_format/README.md index 00c15f53170c..06495575b414 100644 --- a/examples/python/open_photogrammetry_format/README.md +++ b/examples/python/open_photogrammetry_format/README.md @@ -35,7 +35,7 @@ The visualizations in this example were created with the following Rerun code: For each processed frame, all data sent to Rerun is associated with specific time using [`timelines`](https://www.rerun.io/docs/concepts/timelines). ```python -rr.set_index("image", sequence=i) +rr.set_index("image", seq=i) ``` ### Video diff --git a/examples/python/open_photogrammetry_format/open_photogrammetry_format.py b/examples/python/open_photogrammetry_format/open_photogrammetry_format.py index 0939b05157e6..357df47675ff 100755 --- a/examples/python/open_photogrammetry_format/open_photogrammetry_format.py +++ b/examples/python/open_photogrammetry_format/open_photogrammetry_format.py @@ -143,7 +143,7 @@ def log_calibrated_cameras(self, jpeg_quality: int | None) -> None: continue if self.log_as_frames: - rr.set_index("image", sequence=i) + rr.set_index("image", seq=i) entity = "world/cameras" else: entity = f"world/cameras/{i}" diff --git a/examples/python/plots/README.md b/examples/python/plots/README.md index 20810ea119f4..1fa61bb9e283 100644 --- a/examples/python/plots/README.md +++ b/examples/python/plots/README.md @@ -56,7 +56,7 @@ def log_parabola() -> None: # Log a parabola as a time series for t in range(0, 1000, 10): - rr.set_index("frame_nr", sequence=t) + rr.set_index("frame_nr", seq=t) # … existing code … @@ -81,7 +81,7 @@ def log_trig() -> None: rr.log("trig/cos", rr.SeriesLine(color=[0, 255, 0], name="cos(0.01t)"), static=True) for t in range(0, int(tau * 2 * 100.0)): - rr.set_index("frame_nr", sequence=t) + rr.set_index("frame_nr", seq=t) sin_of_t = sin(float(t) / 100.0) rr.log("trig/sin", rr.Scalar(sin_of_t)) @@ -104,7 +104,7 @@ def log_classification() -> None: rr.log("classification/line", rr.SeriesLine(color=[255, 255, 0], width=3.0), static=True) for t in range(0, 1000, 2): - rr.set_index("frame_nr", sequence=t) + rr.set_index("frame_nr", seq=t) # … existing code … rr.log("classification/line", rr.Scalar(f_of_t)) diff --git a/examples/python/plots/plots.py b/examples/python/plots/plots.py index 810cf671a6e4..26d6990268d6 100755 --- a/examples/python/plots/plots.py +++ b/examples/python/plots/plots.py @@ -32,7 +32,7 @@ def clamp(n, smallest, largest): # type: ignore[no-untyped-def] def log_bar_chart() -> None: - rr.set_index("frame_nr", sequence=0) + rr.set_index("frame_nr", seq=0) # Log a gauss bell as a bar chart mean = 0 std = 1 @@ -51,7 +51,7 @@ def log_parabola() -> None: # Log a parabola as a time series for t in range(0, 1000, 10): - rr.set_index("frame_nr", sequence=t) + rr.set_index("frame_nr", seq=t) f_of_t = (t * 0.01 - 5) ** 3 + 1 width = clamp(abs(f_of_t) * 0.1, 0.5, 10.0) @@ -71,7 +71,7 @@ def log_parabola() -> None: def log_trig() -> None: for t in range(0, int(tau * 2 * 100.0)): - rr.set_index("frame_nr", sequence=t) + rr.set_index("frame_nr", seq=t) sin_of_t = sin(float(t) / 100.0) rr.log("trig/sin", rr.Scalar(sin_of_t)) @@ -90,13 +90,13 @@ def log_spiral() -> None: # want this in column major, and numpy is row-major by default scalars = np.array((x, y)).T rr.send_columns( - "spiral", indexes=[rr.IndexColumn("frame_nr", sequence=times)], columns=[*rr.Scalar.columns(scalar=scalars)] + "spiral", indexes=[rr.IndexColumn("frame_nr", seq=times)], columns=[*rr.Scalar.columns(scalar=scalars)] ) def log_classification() -> None: for t in range(0, 1000, 2): - rr.set_index("frame_nr", sequence=t) + rr.set_index("frame_nr", seq=t) f_of_t = (2 * 0.01 * t) + 2 rr.log("classification/line", rr.Scalar(f_of_t)) diff --git a/examples/python/rrt_star/rrt_star.py b/examples/python/rrt_star/rrt_star.py index f1402d7b27bf..7ce0e0317f7a 100755 --- a/examples/python/rrt_star/rrt_star.py +++ b/examples/python/rrt_star/rrt_star.py @@ -189,7 +189,7 @@ def rrt( intersects_obs = mp.intersects_obstacle(closest_node.pos, new_point) step += 1 - rr.set_index("step", sequence=step) + rr.set_index("step", seq=step) rr.log("map/new/close_nodes", rr.Clear(recursive=False)) rr.log( "map/tree/edges", @@ -283,7 +283,7 @@ def main() -> None: start_point = np.array([0.2, 0.5]) end_point = np.array([1.8, 0.5]) - rr.set_index("step", sequence=0) + rr.set_index("step", seq=0) rr.log("description", rr.TextDocument(DESCRIPTION, media_type=rr.MediaType.MARKDOWN), static=True) rr.log( "map/start", diff --git a/examples/python/segment_anything_model/README.md b/examples/python/segment_anything_model/README.md index 9309225d88ec..0fd1b3e98ed8 100644 --- a/examples/python/segment_anything_model/README.md +++ b/examples/python/segment_anything_model/README.md @@ -34,7 +34,7 @@ Rerun assigns a frame to each piece of logged data, and these timestamps are ass ```python for n, image_uri in enumerate(args.images): - rr.set_index("image", sequence=n) + rr.set_index("image", seq=n) image = load_image(image_uri) run_segmentation(mask_generator, image) ``` diff --git a/examples/python/segment_anything_model/segment_anything_model.py b/examples/python/segment_anything_model/segment_anything_model.py index 86d738229795..f06cf35b1449 100755 --- a/examples/python/segment_anything_model/segment_anything_model.py +++ b/examples/python/segment_anything_model/segment_anything_model.py @@ -202,7 +202,7 @@ def main() -> None: ] for n, image_uri in enumerate(args.images): - rr.set_index("image", sequence=n) + rr.set_index("image", seq=n) image = load_image(image_uri) run_segmentation(mask_generator, image) diff --git a/examples/python/structure_from_motion/README.md b/examples/python/structure_from_motion/README.md index 5b39b65e4856..c6a8a08db152 100644 --- a/examples/python/structure_from_motion/README.md +++ b/examples/python/structure_from_motion/README.md @@ -38,7 +38,7 @@ All data logged using Rerun in the following sections is connected to a specific Rerun assigns a frame id to each piece of logged data, and these frame ids are associated with a [`timeline`](https://www.rerun.io/docs/concepts/timelines). ```python -rr.set_index("frame", sequence=frame_idx) +rr.set_index("frame", seq=frame_idx) ``` ### Images diff --git a/examples/python/structure_from_motion/structure_from_motion/__main__.py b/examples/python/structure_from_motion/structure_from_motion/__main__.py index 84a4b8d9a385..ac46ce1a9635 100755 --- a/examples/python/structure_from_motion/structure_from_motion/__main__.py +++ b/examples/python/structure_from_motion/structure_from_motion/__main__.py @@ -132,7 +132,7 @@ def read_and_log_sparse_reconstruction(dataset_path: Path, filter_output: bool, if resize: visible_xys *= scale_factor - rr.set_index("frame", sequence=frame_idx) + rr.set_index("frame", seq=frame_idx) points = [point.xyz for point in visible_xyzs] point_colors = [point.rgb for point in visible_xyzs] diff --git a/rerun_py/rerun_sdk/rerun/_send_columns.py b/rerun_py/rerun_sdk/rerun/_send_columns.py index 5e920151d4d4..6fd5780a1919 100644 --- a/rerun_py/rerun_sdk/rerun/_send_columns.py +++ b/rerun_py/rerun_sdk/rerun/_send_columns.py @@ -36,7 +36,7 @@ class IndexColumn(TimeColumnLike): # These overloads ensures that mypy can catch errors that would otherwise not be caught until runtime. @overload - def __init__(self, timeline: str, *, sequence: Iterable[int] | None = None) -> None: ... + def __init__(self, timeline: str, *, seq: Iterable[int] | None = None) -> None: ... @overload def __init__( @@ -58,7 +58,7 @@ def __init__( self, timeline: str, *, - sequence: Iterable[int] | None = None, + seq: Iterable[int] | None = None, timedelta: Iterable[int] | Iterable[float] | Iterable[timedelta] | Iterable[np.timedelta64] | None = None, datetime: Iterable[int] | Iterable[float] | Iterable[datetime] | Iterable[np.datetime64] | None = None, ): @@ -67,7 +67,7 @@ def __init__( There is no requirement of monotonicity. You can move the time backwards if you like. - You are expected to set exactly ONE of the arguments `sequence`, `timedelta`, or `datetime`. + You are expected to set exactly ONE of the arguments `seq`, `timedelta`, or `datetime`. You may NOT change the type of a timeline, so if you use `timedelta` for a specific timeline, you must only use `timedelta` for that timeline going forward. @@ -75,7 +75,7 @@ def __init__( ---------- timeline: The name of the timeline. - sequence: + seq: Used for sequential indices, like `frame_nr`. Must be integers. timedelta: @@ -86,16 +86,16 @@ def __init__( Must either be in seconds since Unix epoch, [`datetime.datetime`][], or [`numpy.datetime64`][]. """ - if sum(x is not None for x in (sequence, timedelta, datetime)) != 1: + if sum(x is not None for x in (seq, timedelta, datetime)) != 1: raise ValueError( - "IndexColumn: Exactly one of `sequence`, `timedelta`, and `datetime` must be set (timeline='{timeline}')" + "IndexColumn: Exactly one of `seq`, `timedelta`, and `datetime` must be set (timeline='{timeline}')" ) self.timeline = timeline - if sequence is not None: + if seq is not None: self.type = pa.int64() - self.times = sequence + self.times = seq elif timedelta is not None: self.type = pa.duration("ns") self.times = [to_nanos(td) for td in timedelta] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/instance_poses3d.py b/rerun_py/rerun_sdk/rerun/archetypes/instance_poses3d.py index 236557b93240..1aee309f86e0 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/instance_poses3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/instance_poses3d.py @@ -48,14 +48,14 @@ class InstancePoses3D(Archetype): rr.init("rerun_example_instance_pose3d_combined", spawn=True) - rr.set_index("frame", sequence=0) + rr.set_index("frame", seq=0) # Log a box and points further down in the hierarchy. rr.log("world/box", rr.Boxes3D(half_sizes=[[1.0, 1.0, 1.0]])) rr.log("world/box/points", rr.Points3D(np.vstack([xyz.ravel() for xyz in np.mgrid[3 * [slice(-10, 10, 10j)]]]).T)) for i in range(0, 180): - rr.set_index("frame", sequence=i) + rr.set_index("frame", seq=i) # Log a regular transform which affects both the box and the points. rr.log("world/box", rr.Transform3D(rotation_axis_angle=rr.RotationAxisAngle([0, 0, 1], angle=rr.Angle(deg=i * 2)))) diff --git a/rerun_py/rerun_sdk/rerun/archetypes/mesh3d.py b/rerun_py/rerun_sdk/rerun/archetypes/mesh3d.py index ebbdda10404e..59448d5e88b8 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/mesh3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/mesh3d.py @@ -63,7 +63,7 @@ class Mesh3D(Mesh3DExt, Archetype): import rerun as rr rr.init("rerun_example_mesh3d_instancing", spawn=True) - rr.set_index("frame", sequence=0) + rr.set_index("frame", seq=0) rr.log( "shape", @@ -80,7 +80,7 @@ class Mesh3D(Mesh3DExt, Archetype): ) for i in range(0, 100): - rr.set_index("frame", sequence=i) + rr.set_index("frame", seq=i) rr.log( "shape", rr.InstancePoses3D( diff --git a/rerun_py/rerun_sdk/rerun/archetypes/points3d.py b/rerun_py/rerun_sdk/rerun/archetypes/points3d.py index aeb6f0bafe22..40efea703fc0 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/points3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/points3d.py @@ -134,7 +134,7 @@ class Points3D(Points3DExt, Archetype): positions = [[i, 0, 0] for i in range(0, 10)] - rr.set_index("frame", sequence=0) + rr.set_index("frame", seq=0) rr.log("points", rr.Points3D(positions)) for i in range(0, 10): @@ -142,11 +142,11 @@ class Points3D(Points3DExt, Archetype): radii = [0.6 if n < i else 0.2 for n in range(0, 10)] # Update only the colors and radii, leaving everything else as-is. - rr.set_index("frame", sequence=i) + rr.set_index("frame", seq=i) rr.log("points", rr.Points3D.from_fields(radii=radii, colors=colors)) # Update the positions and radii, and clear everything else in the process. - rr.set_index("frame", sequence=20) + rr.set_index("frame", seq=20) rr.log("points", rr.Points3D.from_fields(clear_unset=True, positions=positions, radii=0.3)) ```