Skip to content

Commit b6eb6e0

Browse files
Chris Holdmgeier
Chris Hold
authored andcommitted
Test cart2sph against pre-defined values
1 parent 1c7f250 commit b6eb6e0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: tests/test_util.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
import pytest
44
import sfs
55

6+
67
cart_sph_data = [
78
((1, 1, 1), (np.pi / 4, np.arccos(1 / np.sqrt(3)), np.sqrt(3))),
8-
((-1, 1, 1), (np.arctan2(1, -1), np.arccos(1 / np.sqrt(3)), np.sqrt(3))),
9+
((-1, 1, 1), (3 / 4 * np.pi, np.arccos(1 / np.sqrt(3)), np.sqrt(3))),
910
((1, -1, 1), (-np.pi / 4, np.arccos(1 / np.sqrt(3)), np.sqrt(3))),
10-
((-1, -1, 1), (np.arctan2(-1, -1), np.arccos(1 / np.sqrt(3)), np.sqrt(3))),
11+
((-1, -1, 1), (-3 / 4 * np.pi, np.arccos(1 / np.sqrt(3)), np.sqrt(3))),
1112
((1, 1, -1), (np.pi / 4, np.arccos(-1 / np.sqrt(3)), np.sqrt(3))),
12-
((-1, 1, -1), (np.arctan2(1, -1), np.arccos(-1 / np.sqrt(3)), np.sqrt(3))),
13+
((-1, 1, -1), (3 / 4 * np.pi, np.arccos(-1 / np.sqrt(3)), np.sqrt(3))),
1314
((1, -1, -1), (-np.pi / 4, np.arccos(-1 / np.sqrt(3)), np.sqrt(3))),
14-
((-1, -1, -1), (np.arctan2(-1, -1),
15-
np.arccos(-1 / np.sqrt(3)), np.sqrt(3))),
15+
((-1, -1, -1), (-3 / 4 * np.pi, np.arccos(-1 / np.sqrt(3)), np.sqrt(3))),
1616
]
1717

1818

0 commit comments

Comments
 (0)