From 41cd94fe48fdd1521c1e833e49e43e916e07bd82 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Tue, 9 Jul 2019 20:07:44 -0700 Subject: [PATCH] More detailed logging --- fdfd_tools/bloch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fdfd_tools/bloch.py b/fdfd_tools/bloch.py index 598aa5d..9c252e7 100644 --- a/fdfd_tools/bloch.py +++ b/fdfd_tools/bloch.py @@ -92,6 +92,7 @@ try: import pyfftw.interfaces.numpy_fft import pyfftw.interfaces import multiprocessing + logger.info('Using pyfftw') pyfftw.interfaces.cache.enable() pyfftw.interfaces.cache.set_keepalive_time(3600) @@ -109,6 +110,7 @@ try: except ImportError: from numpy.fft import fftn, ifftn + logger.info('Using numpy fft') def generate_kmn(k0: numpy.ndarray, @@ -483,7 +485,7 @@ def eigsolve(num_modes: int, G = (AZU - Z @ U @ ZtAZU) * sgn if i > 0 and abs(E - prev_E) < tolerance * 0.5 * (E + prev_E + 1e-7): - logging.info('Optimization succeded: {} - 5e-8 < {} * {} / 2'.format(abs(E - prev_E), tolerance, E + prev_E)) + logger.info('Optimization succeded: {} - 5e-8 < {} * {} / 2'.format(abs(E - prev_E), tolerance, E + prev_E)) break KG = scipy_iop @ G