finiterect-constants-driving always output the actual ccd_size

This commit is contained in:
Marek Nečada 2020-09-02 09:30:23 +03:00
parent 031397aacd
commit 6189918348
1 changed files with 3 additions and 1 deletions

View File

@ -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')