From 6189918348f5fb6cad502ac27d908d7c69a0fd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Wed, 2 Sep 2020 09:30:23 +0300 Subject: [PATCH] finiterect-constants-driving always output the actual ccd_size --- misc/finiterectlat-constant-driving.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/finiterectlat-constant-driving.py b/misc/finiterectlat-constant-driving.py index 3d6ee5e..4d3a0ea 100755 --- a/misc/finiterectlat-constant-driving.py +++ b/misc/finiterectlat-constant-driving.py @@ -237,7 +237,9 @@ t, l, m = bspec.tlm() if not math.isnan(a.ccd_distance): logging.info("Computing the far fields") - ccd_size = (50 * a.ccd_distance / (max(Nx*px, Ny*py) * ssw.wavenumber.real)) if math.isnan(a.ccd_size) else a.ccd_size + if math.isnan(a.ccd_size): + a.ccd_size = (50 * a.ccd_distance / (max(Nx*px, Ny*py) *ssw.wavenumber.real)) + ccd_size = a.ccd_size ccd_x = np.linspace(-ccd_size/2, ccd_size/2, a.ccd_resolution) ccd_y = np.linspace(-ccd_size/2, ccd_size/2, a.ccd_resolution) ccd_grid = np.meshgrid(ccd_x, ccd_y, (a.ccd_distance,), indexing='ij')