From a103925aa59ec821604c06ced2f690bc1bc75946 Mon Sep 17 00:00:00 2001
From: Guillaume Demesy <guillaume.demesy@fresnel.fr>
Date: Wed, 19 Oct 2022 11:11:25 +0200
Subject: [PATCH] tweaks

---
 ElectromagneticScattering/scattererTmatrix_post.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ElectromagneticScattering/scattererTmatrix_post.py b/ElectromagneticScattering/scattererTmatrix_post.py
index 8f792df..1889119 100644
--- a/ElectromagneticScattering/scattererTmatrix_post.py
+++ b/ElectromagneticScattering/scattererTmatrix_post.py
@@ -1,10 +1,12 @@
 import numpy as np
-np.set_printoptions(precision=2)
+import sys
 
 def load_getdp_integral(filename):
     return np.loadtxt(filename)[1]+1j*np.loadtxt(filename)[2]
 
-p_max   = 3
+n_max = int(sys.argv[1])
+p_max = n_max*n_max+2*n_max
+
 Tmatrix = np.zeros((2*p_max,2*p_max),dtype=complex)
 
 for k1 in range(2*p_max):
@@ -18,6 +20,4 @@ for k1 in range(2*p_max):
         if k1>=p_max and k2>=p_max:
             Tmatrix[k1,k2] = load_getdp_integral('resT/feN_pe%gpo%g.dat'%(k1+1-p_max,k2+1-p_max))
 
-print('|2*Tmatrix+1|\n',np.abs(2*Tmatrix+1))
-print('Re Tmatrix\n',Tmatrix.real)
-print('Im Tmatrix\n',Tmatrix.imag)
\ No newline at end of file
+np.save('Tmatrix.npy',Tmatrix)
-- 
GitLab