Skip to content

Commit

Permalink
[SymForce] Fix returns in docstrings
Browse files Browse the repository at this point in the history
To all use the "Returns" syntax, which we've marked as a params_style
block

Topic: sf-docs-returns
Relative: sf-docs-furo
GitOrigin-RevId: a04b6df061e131c9640b202bde5a76409be41e51
aaron-skydio committed May 31, 2023
1 parent 2dc5dda commit ee77f27
Showing 24 changed files with 42 additions and 45 deletions.
4 changes: 2 additions & 2 deletions gen/cpp/sym/atan_camera_cal.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/cpp/sym/camera.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/cpp/sym/double_sphere_camera_cal.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/cpp/sym/equirectangular_camera_cal.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/cpp/sym/linear_camera_cal.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gen/cpp/sym/polynomial_camera_cal.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gen/cpp/sym/posed_camera.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gen/cpp/sym/spherical_camera_cal.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/python/sym/atan_camera_cal.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/python/sym/double_sphere_camera_cal.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/python/sym/equirectangular_camera_cal.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/python/sym/linear_camera_cal.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/python/sym/ops/atan_camera_cal/camera_ops.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/python/sym/ops/double_sphere_camera_cal/camera_ops.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/python/sym/ops/equirectangular_camera_cal/camera_ops.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gen/python/sym/ops/linear_camera_cal/camera_ops.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gen/python/sym/ops/polynomial_camera_cal/camera_ops.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gen/python/sym/ops/spherical_camera_cal/camera_ops.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gen/python/sym/polynomial_camera_cal.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gen/python/sym/spherical_camera_cal.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions symforce/__init__.py
Original file line number Diff line number Diff line change
@@ -220,9 +220,6 @@ def set_symbolic_api(name: str) -> None:
def get_symbolic_api() -> str:
"""
Return the current symbolic API as a string.
Returns:
str:
"""
assert _symbolic_api is not None
return _symbolic_api
4 changes: 2 additions & 2 deletions symforce/cam/camera.py
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ def pixel_from_camera_point(
"""
Project a 3D point in the camera frame into 2D pixel coordinates.
Return:
Returns:
pixel: (x, y) coordinate in pixels if valid
is_valid: 1 if the operation is within bounds (including image_size bounds) else 0
"""
@@ -77,7 +77,7 @@ def camera_ray_from_pixel(
Args:
normalize: Whether camera_ray will be normalized (False by default)
Return:
Returns:
camera_ray: The ray in the camera frame
is_valid: 1 if the operation is within bounds else 0
"""
6 changes: 3 additions & 3 deletions symforce/cam/posed_camera.py
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ def pixel_from_global_point(
point: Vector written in camera frame.
epsilon: Small value intended to prevent division by 0.
Return:
Returns:
pixel: UV coodinates in pixel units, assuming the point is in view
is_valid: 1 if point is valid
"""
@@ -67,7 +67,7 @@ def global_point_from_pixel(
range_to_point: Distance of the returned point along the ray passing through pixel
epsilon: Small value intended to prevent division by 0.
Return:
Returns:
global_point: The point in the global frame.
is_valid: 1 if point is valid
"""
@@ -92,7 +92,7 @@ def warp_pixel(
inverse_range: Inverse distance along the ray to the global point
target_cam: Camera to project global point into
Return:
Returns:
pixel: Pixel in the target camera
is_valid: 1 if given point is valid in source camera and target camera
"""
4 changes: 2 additions & 2 deletions symforce/codegen/cam_package_codegen.py
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ def pixel_from_camera_point_with_jacobians(
"""
Project a 3D point in the camera frame into 2D pixel coordinates.
Return:
Returns:
pixel: (x, y) coordinate in pixels if valid
is_valid: 1 if the operation is within bounds else 0
pixel_D_cal: Derivative of pixel with respect to intrinsic calibration parameters
@@ -48,7 +48,7 @@ def camera_ray_from_pixel_with_jacobians(
"""
Backproject a 2D pixel coordinate into a 3D ray in the camera frame.
Return:
Returns:
camera_ray: The ray in the camera frame (NOT normalized)
is_valid: 1 if the operation is within bounds else 0
point_D_cal: Derivative of point with respect to intrinsic calibration parameters

0 comments on commit ee77f27

Please sign in to comment.