From b86d91e8a48d363525349673d687cbd3cf6f8329 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 11 Nov 2016 06:42:35 +0100 Subject: [PATCH] not used --- lib/damask/util.py | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/lib/damask/util.py b/lib/damask/util.py index 6cea7c54b..c8aba4a5a 100644 --- a/lib/damask/util.py +++ b/lib/damask/util.py @@ -101,29 +101,6 @@ def execute(cmd, if process.returncode != 0: raise RuntimeError('{} failed with returncode {}'.format(cmd,process.returncode)) return out,error - -# ----------------------------- -# Matlab like trigonometric functions that take and return angles in degrees. -# ----------------------------- -for f in ['cos', 'sin', 'tan']: - exec('def %sd(deg): return (np.%s(np.deg2rad(deg)))'%(f,f)) - exec('def a%sd(val): return (np.rad2deg(np.arc%s(val)))'%(f,f)) - - -# ----------------------------- -def gridLocation(idx,res): - return ( idx % res[0], \ - ( idx // res[0]) % res[1], \ - ( idx // res[0] // res[1]) % res[2] ) - - -# ----------------------------- -def gridIndex(location,res): - return ( location[0] % res[0] + \ - ( location[1] % res[1]) * res[0] + \ - ( location[2] % res[2]) * res[1] * res[0] ) - - # ----------------------------- class extendableOption(Option): """ @@ -469,4 +446,4 @@ def curve_fit_bound(f, xdata, ydata, p0=None, sigma=None, bounds=None, **kw): else: pcov = np.inf - return (popt, pcov, infodict, errmsg, ier) if return_full else (popt, pcov) \ No newline at end of file + return (popt, pcov, infodict, errmsg, ier) if return_full else (popt, pcov)