From 39d4a8952e3127b8b345c24edda988076b65000b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Sun, 23 Jul 2017 18:29:06 +0000 Subject: [PATCH] TMatrix is now subclass of TMatrixSpec Former-commit-id: 05afa77c95034345e2ac8831937a7142a82f4c67 --- qpms/tmatrices.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qpms/tmatrices.py b/qpms/tmatrices.py index eb31a31..83a37a3 100644 --- a/qpms/tmatrices.py +++ b/qpms/tmatrices.py @@ -5,7 +5,7 @@ from scipy import interpolate from scipy.constants import hbar, e as eV, pi, c from qpms_c import get_mn_y, get_nelem ň = np.newaxis -from .types import NormalizationT +from .types import NormalizationT, TMatrixSpec # Transformations of spherical bases def WignerD_mm(l, quat): @@ -337,9 +337,12 @@ def get_TMatrix_fromspec(tmatrix_spec): raise ValueError('not implemented: ', optype) return (TMatrices, freqs, lMax) -class TMatrix(object): +class TMatrix(TMatrixSpec): def __init__(self, tmatrix_spec): - self.specification = tmatrix_spec + #self.specification = tmatrix_spec + self.lMax_override = tmatrix_spec.lMax_override + self.tmatrix_path = tmatrix_spec.tmatrix_path + self.ops = tmatrix_spec.ops self.tmdata, self.freqs, self.lMax = get_TMatrix_fromspec(tmatrix_spec) self.nelem = get_nelem(self.lMax) #self._interpolators = dict()