From 12630903ae9d241fb06873edcdc32452e02839d7 Mon Sep 17 00:00:00 2001 From: Lorenz Kolb <133660779+elkolbo@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:42:28 +0100 Subject: [PATCH] Update io.py Comments and error messages in function now resemble functionality --- src/av2/utils/io.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/av2/utils/io.py b/src/av2/utils/io.py index 74599a57..bdaa0dcb 100644 --- a/src/av2/utils/io.py +++ b/src/av2/utils/io.py @@ -56,21 +56,22 @@ def read_lidar_sweep(fpath: Path, attrib_spec: str = "xyz") -> NDArrayFloat: y -> point y-coord z -> point z-coord - The following attributes are not loaded: + The following attributes can not be loaded with this function (use read_feather() with desired columns): intensity -> point intensity/reflectance laser_number -> laser number of laser from which point was returned offset_ns -> nanosecond timestamp offset per point, from sweep timestamp. + Returns: Array of shape (N, C). If attrib_str is invalid, `None` will be returned Raises: - ValueError: If any element of `attrib_spec` is not in (x, y, z, intensity, laser_number, offset_ns). + ValueError: If any element of `attrib_spec` is not in (x, y, z). """ possible_attributes = ["x", "y", "z"] if not all([a in possible_attributes for a in attrib_spec]): raise ValueError( - "Attributes must be in (x, y, z, intensity, laser_number, offset_ns)." + "Attributes must be in (x, y, z)." ) sweep_df = read_feather(fpath)