From b7f634d2917ba90af0e1f990db24370017b592ff Mon Sep 17 00:00:00 2001 From: "Olivier J.N. Bertrand" <olivier.bertrand@uni-bielefeld.de> Date: Wed, 29 Aug 2018 18:15:10 +0200 Subject: [PATCH] correct spherical to cartesians --- navipy/maths/coordinates.py | 9 +++------ setup.py | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/navipy/maths/coordinates.py b/navipy/maths/coordinates.py index d6809c3..d82e4e1 100644 --- a/navipy/maths/coordinates.py +++ b/navipy/maths/coordinates.py @@ -18,12 +18,9 @@ def cartesian_to_spherical(x, y, z): def spherical_to_cartesian(elevation, azimuth, radius=1): - cartesian = np.zeros_like(elevation) - cartesian = np.tile(cartesian[..., np.newaxis], (3,)) - x = np.cos(elevation) * np.cos(azimuth) - y = np.cos(elevation) * np.sin(azimuth) - z = np.sin(elevation) - cartesian = radius * cartesian + x = radius*np.cos(elevation) * np.cos(azimuth) + y = radius*np.cos(elevation) * np.sin(azimuth) + z = radius*np.sin(elevation) return x, y, z diff --git a/setup.py b/setup.py index 8dc76a0..9ffca2d 100644 --- a/setup.py +++ b/setup.py @@ -65,8 +65,7 @@ setup_dict = {'name': 'navipy', 'Pillow', 'tables', 'nbsphinx', - 'opencv-python', - 'coverage'], + 'opencv-python'], 'package_data': {'navipy': package_data_files("navipy")}, 'include_package_data': True, -- GitLab