diff --git a/qpms/tmatrices.py b/qpms/tmatrices.py index 7546595..ce1eaee 100644 --- a/qpms/tmatrices.py +++ b/qpms/tmatrices.py @@ -146,22 +146,34 @@ def parity_yy(lmax): def _scuffTMatrixConvert_EM_01(EM): #print(EM) if (EM == b'E'): - return 0 - elif (EM == b'M'): return 1 + elif (EM == b'M'): + return 0 else: return None -def loadScuffTMatrices(fileName, normalisation = 1): +def loadScuffTMatrices(fileName, normalisation = 1, version = 'old'): """ TODO doc + + version describes version of scuff-em. It is either 'old' or 'new' """ + oldversion = (version == 'old') μm = 1e-6 table = np.genfromtxt(fileName, - converters={1: _scuffTMatrixConvert_EM_01, 4: _scuffTMatrixConvert_EM_01}, - dtype=[('freq', '