From 791a46b4467f8fc7475ca931e77120e1ce66068d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Mon, 18 Mar 2019 09:35:10 +0200 Subject: [PATCH] Fix M, N reordering in python T-matrix loader. Former-commit-id: dd9709a5c82c19c33877e508a3336dce43c35b67 --- qpms/tmatrices.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qpms/tmatrices.py b/qpms/tmatrices.py index 83d58ac..02203c3 100644 --- a/qpms/tmatrices.py +++ b/qpms/tmatrices.py @@ -221,9 +221,9 @@ def loadScuffTMatrices(fileName, normalisation = 1, version = 'old', freqscale = if ((order == ('N', 'M')) and not oldversion): # reverse order for the new version reorder = (1,0) # TODO reverse order for the old version... - for inc_type in reorder: - for outc_type in reorder: - TMatrices[:,outc_type,:,inc_type,:] = TMatrices_tmp_real[:,:,outc_type,:,inc_type]+1j*TMatrices_tmp_imag[:,:,outc_type,:,inc_type] + for inc_type in (0,1): + for outc_type in (0,1): + TMatrices[:,reorder[outc_type],:,reorder[inc_type],:] = TMatrices_tmp_real[:,:,outc_type,:,inc_type]+1j*TMatrices_tmp_imag[:,:,outc_type,:,inc_type] # IMPORTANT: now we are going from Reid's/Kristensson's/Jackson's/whoseever convention to Taylor's convention # TODO make these consistent with what is defined in qpms_types.h (implement all possibilities) if normalisation == 1: