From 9dc5973a5d3c9ad3844a244c895bccc246f7cebf Mon Sep 17 00:00:00 2001 From: Niklas Wahl Date: Mon, 22 Feb 2021 00:18:09 +0100 Subject: [PATCH] fix in photon dose calculation to consider quadratic field shape in effictive cutoff computation (and some comment spelling errors fixed) --- matRad_calcPhotonDose.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matRad_calcPhotonDose.m b/matRad_calcPhotonDose.m index 7c2b8e49c..e237aa96e 100644 --- a/matRad_calcPhotonDose.m +++ b/matRad_calcPhotonDose.m @@ -124,7 +124,7 @@ intConvResolution: ... (kernelLimit-1)*intConvResolution); -% precalculate convoluted kernel size and distances +% precalculate convolved kernel size and distances kernelConvLimit = fieldLimit + gaussLimit + kernelLimit; [convMx_X, convMx_Z] = meshgrid(-kernelConvLimit*intConvResolution: ... intConvResolution: ... @@ -134,7 +134,7 @@ % define an effective lateral cutoff where dose will be calculated. note % that storage within the influence matrix may be subject to sampling -effectiveLateralCutoff = lateralCutoff + fieldWidth/2; +effectiveLateralCutoff = lateralCutoff + fieldWidth/sqrt(2); counter = 0; matRad_cfg.dispInfo('matRad: Photon dose calculation...\n'); @@ -206,7 +206,7 @@ % apply the primary fluence to the field Fx = F .* Psi; - % convolute with the gaussian + % convolve with the gaussian Fx = real( ifft2(fft2(Fx,gaussConvSize,gaussConvSize).* fft2(gaussFilter,gaussConvSize,gaussConvSize)) ); % 2D convolution of Fluence and Kernels in fourier domain