line continuation not needed

This commit is contained in:
Martin Diehl 2015-10-09 10:24:17 +00:00
parent 8fe443d068
commit 4c46d155ec
1 changed files with 184 additions and 184 deletions

View File

@ -944,212 +944,212 @@ class Orientation:
(me,other) = (0,1) if direction > 0 else (1,0)
planes = {'KS': \
np.array([[[ 1, 1, 1],[ 0, 1, 1]],\
[[ 1, 1, 1],[ 0, 1, 1]],\
[[ 1, 1, 1],[ 0, 1, 1]],\
[[ 1, 1, 1],[ 0, 1, 1]],\
[[ 1, 1, 1],[ 0, 1, 1]],\
[[ 1, 1, 1],[ 0, 1, 1]],\
[[ 1, -1, 1],[ 0, 1, 1]],\
[[ 1, -1, 1],[ 0, 1, 1]],\
[[ 1, -1, 1],[ 0, 1, 1]],\
[[ 1, -1, 1],[ 0, 1, 1]],\
[[ 1, -1, 1],[ 0, 1, 1]],\
[[ 1, -1, 1],[ 0, 1, 1]],\
[[ -1, 1, 1],[ 0, 1, 1]],\
[[ -1, 1, 1],[ 0, 1, 1]],\
[[ -1, 1, 1],[ 0, 1, 1]],\
[[ -1, 1, 1],[ 0, 1, 1]],\
[[ -1, 1, 1],[ 0, 1, 1]],\
[[ -1, 1, 1],[ 0, 1, 1]],\
[[ 1, 1, -1],[ 0, 1, 1]],\
[[ 1, 1, -1],[ 0, 1, 1]],\
[[ 1, 1, -1],[ 0, 1, 1]],\
[[ 1, 1, -1],[ 0, 1, 1]],\
[[ 1, 1, -1],[ 0, 1, 1]],\
np.array([[[ 1, 1, 1],[ 0, 1, 1]],
[[ 1, 1, 1],[ 0, 1, 1]],
[[ 1, 1, 1],[ 0, 1, 1]],
[[ 1, 1, 1],[ 0, 1, 1]],
[[ 1, 1, 1],[ 0, 1, 1]],
[[ 1, 1, 1],[ 0, 1, 1]],
[[ 1, -1, 1],[ 0, 1, 1]],
[[ 1, -1, 1],[ 0, 1, 1]],
[[ 1, -1, 1],[ 0, 1, 1]],
[[ 1, -1, 1],[ 0, 1, 1]],
[[ 1, -1, 1],[ 0, 1, 1]],
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1],[ -1, 0, 1]],
[[ -1, -1, 1],[ -1, -1, 0]],
[[ -1, -1, 1],[ 0, -1, 1]],
[[ -1, 1, 1],[ -1, 0, 1]],
[[ -1, 1, 1],[ -1, 1, 0]],
[[ -1, 1, 1],[ 0, 1, 1]],
[[ 1, -1, 1],[ 1, 0, 1]],
[[ 1, -1, 1],[ 1, -1, 0]],
[[ 1, -1, 1],[ 0, -1, 1]],
[[ 1, 1, 1],[ 1, 1, 0]],
[[ 1, 1, 1],[ 0, 1, 1]],
[[ 1, 1, 1],[ 1, 0, 1]],
[[ -1, -1, 1],[ -1, -1, 0]],
[[ -1, -1, 1],[ 0, -1, 1]],
[[ -1, -1, 1],[ -1, 0, 1]],
[[ -1, 1, 1],[ -1, 1, 0]],
[[ -1, 1, 1],[ 0, 1, 1]],
[[ -1, 1, 1],[ -1, 0, 1]],
[[ 1, -1, 1],[ 1, -1, 0]],
[[ 1, -1, 1],[ 0, -1, 1]],
[[ 1, -1, 1],[ 1, 0, 1]]]),
'GTdash': \
np.array([[[ 7, 17, 17],[ 12, 5, 17]],\
[[ 17, 7, 17],[ 17, 12, 5]],\
[[ 17, 17, 7],[ 5, 17, 12]],\
[[ -7,-17, 17],[-12, -5, 17]],\
[[-17, -7, 17],[-17,-12, 5]],\
[[-17,-17, 7],[ -5,-17, 12]],\
[[ 7,-17,-17],[ 12, -5,-17]],\
[[ 17, -7,-17],[ 17,-12, -5]],\
[[ 17,-17, -7],[ 5,-17,-12]],\
[[ -7, 17,-17],[-12, 5,-17]],\
[[-17, 7,-17],[-17, 12, -5]],\
[[-17, 17, -7],[ -5, 17,-12]],\
[[ 7, 17, 17],[ 12, 17, 5]],\
[[ 17, 7, 17],[ 5, 12, 17]],\
[[ 17, 17, 7],[ 17, 5, 12]],\
[[ -7,-17, 17],[-12,-17, 5]],\
[[-17, -7, 17],[ -5,-12, 17]],\
[[-17,-17, 7],[-17, -5, 12]],\
[[ 7,-17,-17],[ 12,-17, -5]],\
[[ 17, -7,-17],[ 5, -12,-17]],\
[[ 17,-17, 7],[ 17, -5,-12]],\
[[ -7, 17,-17],[-12, 17, -5]],\
[[-17, 7,-17],[ -5, 12,-17]],\
np.array([[[ 7, 17, 17],[ 12, 5, 17]],
[[ 17, 7, 17],[ 17, 12, 5]],
[[ 17, 17, 7],[ 5, 17, 12]],
[[ -7,-17, 17],[-12, -5, 17]],
[[-17, -7, 17],[-17,-12, 5]],
[[-17,-17, 7],[ -5,-17, 12]],
[[ 7,-17,-17],[ 12, -5,-17]],
[[ 17, -7,-17],[ 17,-12, -5]],
[[ 17,-17, -7],[ 5,-17,-12]],
[[ -7, 17,-17],[-12, 5,-17]],
[[-17, 7,-17],[-17, 12, -5]],
[[-17, 17, -7],[ -5, 17,-12]],
[[ 7, 17, 17],[ 12, 17, 5]],
[[ 17, 7, 17],[ 5, 12, 17]],
[[ 17, 17, 7],[ 17, 5, 12]],
[[ -7,-17, 17],[-12,-17, 5]],
[[-17, -7, 17],[ -5,-12, 17]],
[[-17,-17, 7],[-17, -5, 12]],
[[ 7,-17,-17],[ 12,-17, -5]],
[[ 17, -7,-17],[ 5, -12,-17]],
[[ 17,-17, 7],[ 17, -5,-12]],
[[ -7, 17,-17],[-12, 17, -5]],
[[-17, 7,-17],[ -5, 12,-17]],
[[-17, 17, -7],[-17, 5,-12]]]),
'NW': \
np.array([[[ 1, 1, 1],[ 0, 1, 1]],\
[[ 1, 1, 1],[ 0, 1, 1]],\
[[ 1, 1, 1],[ 0, 1, 1]],\
[[ -1, 1, 1],[ 0, 1, 1]],\
[[ -1, 1, 1],[ 0, 1, 1]],\
[[ -1, 1, 1],[ 0, 1, 1]],\
[[ 1, -1, 1],[ 0, 1, 1]],\
[[ 1, -1, 1],[ 0, 1, 1]],\
[[ 1, -1, 1],[ 0, 1, 1]],\
[[ -1, -1, 1],[ 0, 1, 1]],\
[[ -1, -1, 1],[ 0, 1, 1]],\
np.array([[[ 1, 1, 1],[ 0, 1, 1]],
[[ 1, 1, 1],[ 0, 1,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 -1, 0, 1],[ -1, -1, 1]],\
[[ -1, 0, 1],[ -1, 1, -1]],\
[[ 0, 1, -1],[ -1, -1, 1]],\
[[ 0, 1, -1],[ -1, 1, -1]],\
[[ 1, -1, 0],[ -1, -1, 1]],\
[[ 1, -1, 0],[ -1, 1, -1]],\
[[ 1, 0, -1],[ -1, -1, 1]],\
[[ 1, 0, -1],[ -1, 1, -1]],\
[[ -1, -1, 0],[ -1, -1, 1]],\
[[ -1, -1, 0],[ -1, 1, -1]],\
[[ 0, 1, 1],[ -1, -1, 1]],\
[[ 0, 1, 1],[ -1, 1, -1]],\
[[ 0, -1, 1],[ -1, -1, 1]],\
[[ 0, -1, 1],[ -1, 1, -1]],\
[[ -1, 0, -1],[ -1, -1, 1]],\
[[ -1, 0, -1],[ -1, 1, -1]],\
[[ 1, 1, 0],[ -1, -1, 1]],\
[[ 1, 1, 0],[ -1, 1, -1]],\
[[ -1, 1, 0],[ -1, -1, 1]],\
[[ -1, 1, 0],[ -1, 1, -1]],\
[[ 0, -1, -1],[ -1, -1, 1]],\
[[ 0, -1, -1],[ -1, 1, -1]],\
[[ 1, 0, 1],[ -1, -1, 1]],\
np.array([[[ -1, 0, 1],[ -1, -1, 1]],
[[ -1, 0, 1],[ -1, 1, -1]],
[[ 0, 1, -1],[ -1, -1, 1]],
[[ 0, 1, -1],[ -1, 1, -1]],
[[ 1, -1, 0],[ -1, -1, 1]],
[[ 1, -1, 0],[ -1, 1, -1]],
[[ 1, 0, -1],[ -1, -1, 1]],
[[ 1, 0, -1],[ -1, 1, -1]],
[[ -1, -1, 0],[ -1, -1, 1]],
[[ -1, -1, 0],[ -1, 1, -1]],
[[ 0, 1, 1],[ -1, -1, 1]],
[[ 0, 1, 1],[ -1, 1, -1]],
[[ 0, -1, 1],[ -1, -1, 1]],
[[ 0, -1, 1],[ -1, 1, -1]],
[[ -1, 0, -1],[ -1, -1, 1]],
[[ -1, 0, -1],[ -1, 1, -1]],
[[ 1, 1, 0],[ -1, -1, 1]],
[[ 1, 1, 0],[ -1, 1, -1]],
[[ -1, 1, 0],[ -1, -1, 1]],
[[ -1, 1, 0],[ -1, 1, -1]],
[[ 0, -1, -1],[ -1, -1, 1]],
[[ 0, -1, -1],[ -1, 1, -1]],
[[ 1, 0, 1],[ -1, -1, 1]],
[[ 1, 0, 1],[ -1, 1, -1]]]),
'GT': \
np.array([[[ -5,-12, 17],[-17, -7, 17]],\
[[ 17, -5,-12],[ 17,-17, -7]],\
[[-12, 17, -5],[ -7, 17,-17]],\
[[ 5, 12, 17],[ 17, 7, 17]],\
[[-17, 5,-12],[-17, 17, -7]],\
[[ 12,-17, -5],[ 7,-17,-17]],\
[[ -5, 12,-17],[-17, 7,-17]],\
[[ 17, 5, 12],[ 17, 17, 7]],\
[[-12,-17, 5],[ -7,-17, 17]],\
[[ 5,-12,-17],[ 17, -7,-17]],\
[[-17, -5, 12],[-17,-17, 7]],\
[[ 12, 17, 5],[ 7, 17, 17]],\
[[ -5, 17,-12],[-17, 17, -7]],\
[[-12, -5, 17],[ -7,-17, 17]],\
[[ 17,-12, -5],[ 17, -7,-17]],\
[[ 5,-17,-12],[ 17,-17, -7]],\
[[ 12, 5, 17],[ 7, 17, 17]],\
[[-17, 12, -5],[-17, 7,-17]],\
[[ -5,-17, 12],[-17,-17, 7]],\
[[-12, 5,-17],[ -7, 17,-17]],\
[[ 17, 12, 5],[ 17, 7, 17]],\
[[ 5, 17, 12],[ 17, 17, 7]],\
[[ 12, -5,-17],[ 7,-17,-17]],\
np.array([[[ -5,-12, 17],[-17, -7, 17]],
[[ 17, -5,-12],[ 17,-17, -7]],
[[-12, 17, -5],[ -7, 17,-17]],
[[ 5, 12, 17],[ 17, 7, 17]],
[[-17, 5,-12],[-17, 17, -7]],
[[ 12,-17, -5],[ 7,-17,-17]],
[[ -5, 12,-17],[-17, 7,-17]],
[[ 17, 5, 12],[ 17, 17, 7]],
[[-12,-17, 5],[ -7,-17, 17]],
[[ 5,-12,-17],[ 17, -7,-17]],
[[-17, -5, 12],[-17,-17, 7]],
[[ 12, 17, 5],[ 7, 17, 17]],
[[ -5, 17,-12],[-17, 17, -7]],
[[-12, -5, 17],[ -7,-17, 17]],
[[ 17,-12, -5],[ 17, -7,-17]],
[[ 5,-17,-12],[ 17,-17, -7]],
[[ 12, 5, 17],[ 7, 17, 17]],
[[-17, 12, -5],[-17, 7,-17]],
[[ -5,-17, 12],[-17,-17, 7]],
[[-12, 5,-17],[ -7, 17,-17]],
[[ 17, 12, 5],[ 17, 7, 17]],
[[ 5, 17, 12],[ 17, 17, 7]],
[[ 12, -5,-17],[ 7,-17,-17]],
[[-17,-12, 5],[-17, 7, 17]]]),
'GTdash': \
np.array([[[ 0, 1, -1],[ 1, 1, -1]],\
[[ -1, 0, 1],[ -1, 1, 1]],\
[[ 1, -1, 0],[ 1, -1, 1]],\
[[ 0, -1, -1],[ -1, -1, -1]],\
[[ 1, 0, 1],[ 1, -1, 1]],\
[[ 1, -1, 0],[ 1, -1, -1]],\
[[ 0, 1, -1],[ -1, 1, -1]],\
[[ 1, 0, 1],[ 1, 1, 1]],\
[[ -1, -1, 0],[ -1, -1, 1]],\
[[ 0, -1, -1],[ 1, -1, -1]],\
[[ -1, 0, 1],[ -1, -1, 1]],\
[[ -1, -1, 0],[ -1, -1, -1]],\
[[ 0, -1, 1],[ 1, -1, 1]],\
[[ 1, 0, -1],[ 1, 1, -1]],\
[[ -1, 1, 0],[ -1, 1, 1]],\
[[ 0, 1, 1],[ -1, 1, 1]],\
[[ -1, 0, -1],[ -1, -1, -1]],\
[[ -1, 1, 0],[ -1, 1, -1]],\
[[ 0, -1, 1],[ -1, -1, 1]],\
[[ -1, 0, -1],[ -1, 1, -1]],\
[[ 1, 1, 0],[ 1, 1, 1]],\
[[ 0, 1, 1],[ 1, 1, 1]],\
[[ 1, 0, -1],[ 1, -1, -1]],\
np.array([[[ 0, 1, -1],[ 1, 1, -1]],
[[ -1, 0, 1],[ -1, 1, 1]],
[[ 1, -1, 0],[ 1, -1, 1]],
[[ 0, -1, -1],[ -1, -1, -1]],
[[ 1, 0, 1],[ 1, -1, 1]],
[[ 1, -1, 0],[ 1, -1, -1]],
[[ 0, 1, -1],[ -1, 1, -1]],
[[ 1, 0, 1],[ 1, 1, 1]],
[[ -1, -1, 0],[ -1, -1, 1]],
[[ 0, -1, -1],[ 1, -1, -1]],
[[ -1, 0, 1],[ -1, -1, 1]],
[[ -1, -1, 0],[ -1, -1, -1]],
[[ 0, -1, 1],[ 1, -1, 1]],
[[ 1, 0, -1],[ 1, 1, -1]],
[[ -1, 1, 0],[ -1, 1, 1]],
[[ 0, 1, 1],[ -1, 1, 1]],
[[ -1, 0, -1],[ -1, -1, -1]],
[[ -1, 1, 0],[ -1, 1, -1]],
[[ 0, -1, 1],[ -1, -1, 1]],
[[ -1, 0, -1],[ -1, 1, -1]],
[[ 1, 1, 0],[ 1, 1, 1]],
[[ 0, 1, 1],[ 1, 1, 1]],
[[ 1, 0, -1],[ 1, -1, -1]],
[[ 1, 1, 0],[ 1, 1, -1]]]),
'NW': \
np.array([[[ 2, -1, -1],[ 0, -1, 1]],\
[[ -1, 2, -1],[ 0, -1, 1]],\
[[ -1, -1, 2],[ 0, -1, 1]],\
[[ -2, -1, -1],[ 0, -1, 1]],\
[[ 1, 2, -1],[ 0, -1, 1]],\
[[ 1, -1, 2],[ 0, -1, 1]],\
[[ 2, 1, -1],[ 0, -1, 1]],\
[[ -1, -2, -1],[ 0, -1, 1]],\
[[ -1, 1, 2],[ 0, -1, 1]],\
[[ -1, 2, 1],[ 0, -1, 1]],\
[[ -1, 2, 1],[ 0, -1, 1]],\
np.array([[[ 2, -1, -1],[ 0, -1, 1]],
[[ -1, 2, -1],[ 0, -1, 1]],
[[ -1, -1, 2],[ 0, -1, 1]],
[[ -2, -1, -1],[ 0, -1, 1]],
[[ 1, 2, -1],[ 0, -1, 1]],
[[ 1, -1, 2],[ 0, -1, 1]],
[[ 2, 1, -1],[ 0, -1, 1]],
[[ -1, -2, -1],[ 0, -1, 1]],
[[ -1, 1, 2],[ 0, -1, 1]],
[[ -1, 2, 1],[ 0, -1, 1]],
[[ -1, 2, 1],[ 0, -1, 1]],
[[ -1, -1, -2],[ 0, -1, 1]]]),
'Pitsch': \
np.array([[[ 1, 0, 1],[ 1, -1, 1]],\
[[ 1, 1, 0],[ 1, 1, -1]],\
[[ 0, 1, 1],[ -1, 1, 1]],\
[[ 0, 1, -1],[ -1, 1, -1]],\
[[ -1, 0, 1],[ -1, -1, 1]],\
[[ 1, -1, 0],[ 1, -1, -1]],\
[[ 1, 0, -1],[ 1, -1, -1]],\
[[ -1, 1, 0],[ -1, 1, -1]],\
[[ 0, -1, 1],[ -1, -1, 1]],\
[[ 0, 1, 1],[ -1, 1, 1]],\
[[ 1, 0, 1],[ 1, -1, 1]],\
np.array([[[ 1, 0, 1],[ 1, -1, 1]],
[[ 1, 1, 0],[ 1, 1, -1]],
[[ 0, 1, 1],[ -1, 1, 1]],
[[ 0, 1, -1],[ -1, 1, -1]],
[[ -1, 0, 1],[ -1, -1, 1]],
[[ 1, -1, 0],[ 1, -1, -1]],
[[ 1, 0, -1],[ 1, -1, -1]],
[[ -1, 1, 0],[ -1, 1, -1]],
[[ 0, -1, 1],[ -1, -1, 1]],
[[ 0, 1, 1],[ -1, 1, 1]],
[[ 1, 0, 1],[ 1, -1, 1]],
[[ 1, 1, 0],[ 1, 1, -1]]]),
'Bain': \
np.array([[[ 0, 1, 0],[ 0, 1, 1]],