From 8b969994849b2bead282d1a1a7da2aca377651f8 Mon Sep 17 00:00:00 2001 From: Hagen Wierstorf Date: Mon, 21 Aug 2017 15:08:27 +0200 Subject: [PATCH] Change default 2.5D WFS fs driving function --- .../driving_function_mono_wfs_fs.m | 54 +++++++++---------- .../driving_function_imp_wfs_fs.m | 53 +++++++++--------- 2 files changed, 53 insertions(+), 54 deletions(-) diff --git a/SFS_monochromatic/driving_functions_mono/driving_function_mono_wfs_fs.m b/SFS_monochromatic/driving_functions_mono/driving_function_mono_wfs_fs.m index 442ff053..2589089e 100644 --- a/SFS_monochromatic/driving_functions_mono/driving_function_mono_wfs_fs.m +++ b/SFS_monochromatic/driving_functions_mono/driving_function_mono_wfs_fs.m @@ -177,7 +177,33 @@ xref = repmat(xref,[size(x0,1) 1]); switch driving_functions - case {'default', 'reference_point'} + case {'default', 'reference_circle'} + % Driving function with two stationary phase approximations, + % reference to circle around the focused source with radius |xref-xs| + % + % r = |x0-xs| + r = vector_norm(x0-xs,2); + % + % 2.5D correction factor + % _____________ + % | r + % g0 = _ |1 + --------- + % \| |xref-xs| + % + g0 = sqrt( 1 + r./vector_norm(xref-xs,2) ); + % ___ ___ + % | 1 |-iw (xs-x0) nx0 + % D_2.5D(x0,w) = g0 _ |--- _ |--- ------------- e^(i w/c |x0-xs|) + % \|2pi \| c |x0-xs|^(3/2) + % + % See http://sfstoolbox.org/en/update_wfs_ps/#equation-D.wfs.fs.2.5D + % + % Driving signal + D = 1./sqrt(2.*pi) .* sqrt(-1i.*omega./c) .* g0 ... + .* vector_product(xs-x0,nx0,2) ./ r.^(3./2) ... + .* exp(+1i.*omega./c.*r); + % + case 'reference_point' % Driving function with only one stationary phase approximation, % reference to one point in field % @@ -197,8 +223,6 @@ % D_2.5D(x0,w) = g0 _ |--- _ |--- ------------- e^(i w/c |x0-xs|) % \|2pi \| c |x0-xs|^(3/2) % - % See http://sfstoolbox.org/en/update_wfs_ps/#equation-D.wfs.fs.2.5D - % % Driving signal D = 1./sqrt(2.*pi) .* sqrt(-1i.*omega./c) .* g0 ... .* vector_product(xs-x0,nx0,2) ./ r.^(3./2) ... @@ -234,30 +258,6 @@ .* vector_product(xs-x0,nx0,2) ./ r.^(3./2) ... .* exp(+1i.*omega./c.*r); % - case {'reference_circle'} - % Driving function with two stationary phase approximations, - % reference to circle around the focused source with radius |xref-xs| - % - % r = |x0-xs| - r = vector_norm(x0-xs,2); - % - % 2.5D correction factor - % _____________ - % | r - % g0 = _ |1 + --------- - % \| |xref-xs| - % - g0 = sqrt( 1 + r./vector_norm(xref-xs,2) ); - % ___ ___ - % | 1 |-iw (xs-x0) nx0 - % D_2.5D(x0,w) = g0 _ |--- _ |--- ------------- e^(i w/c |x0-xs|) - % \|2pi \| c |x0-xs|^(3/2) - % - % Driving signal - D = 1./sqrt(2.*pi) .* sqrt(-1i.*omega./c) .* g0 ... - .* vector_product(xs-x0,nx0,2) ./ r.^(3./2) ... - .* exp(+1i.*omega./c.*r); - % case 'legacy' % --- Old SFS Toolbox default ------------------------------------ % 2.5D correction factor diff --git a/SFS_time_domain/driving_functions_imp/driving_function_imp_wfs_fs.m b/SFS_time_domain/driving_functions_imp/driving_function_imp_wfs_fs.m index 3b6fc112..c5ab308c 100644 --- a/SFS_time_domain/driving_functions_imp/driving_function_imp_wfs_fs.m +++ b/SFS_time_domain/driving_functions_imp/driving_function_imp_wfs_fs.m @@ -148,7 +148,32 @@ xref = repmat(xref,[size(x0,1) 1]); switch driving_functions - case {'default', 'reference_point'} + case {'default', 'reference_circle'} + % Driving function with two stationary phase approximations, + % reference to circle around the focused source with radius |xref-xs| + % + % r = |x0-xs| + r = vector_norm(x0-xs,2); + % + % 2.5D correction factor + % _____________ + % | r + % g0 = _ |1 + --------- + % \| |xref-xs| + % + g0 = sqrt( 1 + r./vector_norm(xref-xs,2) ); + % ___ + % | 1 (xs-x0) nx0 + % d_2.5D(x0,t) = h_pre(-t) * g0 _ |--- ------------- delta(t+|x0-xs|/c) + % \|2pi |x0-xs|^(3/2) + % + % See http://sfstoolbox.org/#equation-d.wfs.fs.2.5D + % + % Delay and amplitude weight + delay = -1./c .* r; + weight = g0 ./ sqrt(2.*pi) .* vector_product(xs-x0,nx0,2) ./ r.^(3./2); + % + case 'reference_point' % Driving function with only one stationary phase approximation, % reference to one point in field % @@ -168,8 +193,6 @@ % d_2.5D(x0,t) = h_pre(-t) * g0 _ |--- ------------- delta(t+|x0-xs|/c) % \|2pi |x0-xs|^(3/2) % - % See http://sfstoolbox.org/#equation-d.wfs.fs.2.5D - % % Delay and amplitude weight delay = -1./c .* r; weight = g0 ./ sqrt(2.*pi) .* vector_product(xs-x0,nx0,2) ./ r.^(3./2); @@ -203,30 +226,6 @@ delay = -1./c .* r; weight = g0 ./ sqrt(2.*pi) .* vector_product(xs-x0,nx0,2) ./ r.^(3./2); % - case {'reference_circle'} - % Driving function with two stationary phase approximations, - % reference to circle around the focused source with radius |xref-xs| - % - % r = |x0-xs| - r = vector_norm(x0-xs,2); - % - % 2.5D correction factor - % _____________ - % | r - % g0 = _ |1 + --------- - % \| |xref-xs| - % - g0 = sqrt( 1 + r./vector_norm(xref-xs,2) ); - % ___ - % | 1 (xs-x0) nx0 - % d_2.5D(x0,t) = h_pre(-t) * g0 _ |--- ------------- delta(t+|x0-xs|/c) - % \|2pi |x0-xs|^(3/2) - % - % - % Delay and amplitude weight - delay = -1./c .* r; - weight = g0 ./ sqrt(2.*pi) .* vector_product(xs-x0,nx0,2) ./ r.^(3./2); - % case 'legacy' % --- SFS Toolbox ------------------------------------------------ % 2.5D correction factor