From 4b665cfe3170527fc42ddd9fdd58ba734d46f334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Thu, 16 Feb 2017 01:08:58 +0000 Subject: [PATCH] Fix of 'fix' Former-commit-id: dbe7380806dd273f431d09269c2656b5262a2dac --- misc/dispersion-SVD.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/misc/dispersion-SVD.py b/misc/dispersion-SVD.py index 2deb459..e16799e 100755 --- a/misc/dispersion-SVD.py +++ b/misc/dispersion-SVD.py @@ -378,14 +378,16 @@ for trfile in os.scandir(translations_dir): leftmatrixlist_s = np.reshape(leftmatrixlist,(klist.shape[0], 2*2*nelem,2*2*nelem))[nnlist] leftmatrixlist_TE = leftmatrixlist_s[np.ix_(np.arange(leftmatrixlist_s.shape[0]),TEč,TEč)] leftmatrixlist_TM = leftmatrixlist_s[np.ix_(np.arange(leftmatrixlist_s.shape[0]),TMč,TMč)] - svarr = np.linalg.svd(leftmatrixlist_TE, compute_uv=False) - argsortlist = np.argsort(svarr, axis=-1)[...,:svn] - minsvTElist[nnlist] = svarr[...,argsortlist] + #svarr = np.linalg.svd(leftmatrixlist_TE, compute_uv=False) + #argsortlist = np.argsort(svarr, axis=-1)[...,:svn] + #minsvTElist[nnlist] = svarr[...,argsortlist] #minsvTElist[nnlist] = np.amin(np.linalg.svd(leftmatrixlist_TE, compute_uv=False), axis=-1) - svarr = np.linalg.svd(leftmatrixlist_TM, compute_uv=False) - argsortlist = np.argsort(svarr, axis=-1)[...,:svn] - minsvTMlist[nnlist] = svarr[...,argsortlist] + minsvTElist[nnlist] = np.linalg.svd(leftmatrixlist_TE, compute_uv=False)[...,-svn:] + #svarr = np.linalg.svd(leftmatrixlist_TM, compute_uv=False) + #argsortlist = np.argsort(svarr, axis=-1)[...,:svn] + #minsvTMlist[nnlist] = svarr[...,argsortlist] #minsvTMlist[nnlist] = np.amin(np.linalg.svd(leftmatrixlist_TM, compute_uv=False), axis=-1) + minsvTMlist[nnlist] = np.linalg.svd(leftmatrixlist_TM, compute_uv=False)[...,-svn:] minsvTMlistlist.append(minsvTMlist) minsvTElistlist.append(minsvTElist)