Commit 4efea17c authored by James Harle's avatar James Harle
Browse files

Solving bug with vector quantities (Issue 3, jdha/PyNEMO)

parent e817b678
......@@ -10,13 +10,16 @@ def sub2ind(shap, subx, suby):
ind = (subx * shap[0]) + suby
return ind
# THIS FUNCTION MAY BE BROKEN
def rot_rep(pxin, pyin, dummy, cd_todo, gcos, gsin):
"""rotate function"""
if cd_todo.lower() in ['en to i', 'ij to e']:
if cd_todo.lower() == 'en to i':
x_var, y_var = pxin, pyin
elif cd_todo.lower() in ['en to j', 'ij to n']:
elif cd_todo.lower() == 'en to j':
x_var, y_var = pyin, pxin*-1
elif cd_todo.lower() == 'ij to e':
x_var, y_var = pxin, pyin*-1
elif cd_todo.lower() == 'ij to n':
x_var, y_var = pyin, pxin
else:
raise SyntaxError('rot_rep cd_todo %s is invalid' %cd_todo)
return x_var * gcos + y_var * gsin
......@@ -124,4 +127,4 @@ def bdy_transport():
Keyword arguments:
"""
raise NotImplementedError
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment