correct normalization at the corners

This commit is contained in:
Martin Diehl 2020-04-08 12:23:28 +02:00
parent 4e06e9a410
commit b6f5548d8a
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ def ball_to_cube(ball):
https://doi.org/10.1088/0965-0393/22/7/075013
"""
ball_ = ball/np.linalg.norm(ball) if np.isclose(np.linalg.norm(ball),R1) else ball
ball_ = ball/np.linalg.norm(ball)*R1 if np.isclose(np.linalg.norm(ball),R1) else ball
rs = np.linalg.norm(ball_)
if rs > R1:
raise ValueError