Skip to content

Commit 7d5b2b4

Browse files
committed
Change default 2.5D WFS fs driving function
1 parent 2f631fa commit 7d5b2b4

File tree

2 files changed

+53
-54
lines changed

2 files changed

+53
-54
lines changed

SFS_monochromatic/driving_functions_mono/driving_function_mono_wfs_fs.m

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,33 @@
177177
xref = repmat(xref,[size(x0,1) 1]);
178178

179179
switch driving_functions
180-
case {'default', 'reference_point'}
180+
case {'default', 'reference_circle'}
181+
% Driving function with two stationary phase approximations,
182+
% reference to circle around the focused source with radius |xref-xs|
183+
%
184+
% r = |x0-xs|
185+
r = vector_norm(x0-xs,2);
186+
%
187+
% 2.5D correction factor
188+
% _____________
189+
% | r
190+
% g0 = _ |1 + ---------
191+
% \| |xref-xs|
192+
%
193+
g0 = sqrt( 1 + r./vector_norm(xref-xs,2) );
194+
% ___ ___
195+
% | 1 |-iw (xs-x0) nx0
196+
% D_2.5D(x0,w) = g0 _ |--- _ |--- ------------- e^(i w/c |x0-xs|)
197+
% \|2pi \| c |x0-xs|^(3/2)
198+
%
199+
% See http://sfstoolbox.org/en/update_wfs_ps/#equation-D.wfs.fs.2.5D
200+
%
201+
% Driving signal
202+
D = 1./sqrt(2.*pi) .* sqrt(-1i.*omega./c) .* g0 ...
203+
.* vector_product(xs-x0,nx0,2) ./ r.^(3./2) ...
204+
.* exp(+1i.*omega./c.*r);
205+
%
206+
case 'reference_point'
181207
% Driving function with only one stationary phase approximation,
182208
% reference to one point in field
183209
%
@@ -197,8 +223,6 @@
197223
% D_2.5D(x0,w) = g0 _ |--- _ |--- ------------- e^(i w/c |x0-xs|)
198224
% \|2pi \| c |x0-xs|^(3/2)
199225
%
200-
% See http://sfstoolbox.org/en/update_wfs_ps/#equation-D.wfs.fs.2.5D
201-
%
202226
% Driving signal
203227
D = 1./sqrt(2.*pi) .* sqrt(-1i.*omega./c) .* g0 ...
204228
.* vector_product(xs-x0,nx0,2) ./ r.^(3./2) ...
@@ -234,30 +258,6 @@
234258
.* vector_product(xs-x0,nx0,2) ./ r.^(3./2) ...
235259
.* exp(+1i.*omega./c.*r);
236260
%
237-
case {'reference_circle'}
238-
% Driving function with two stationary phase approximations,
239-
% reference to circle around the focused source with radius |xref-xs|
240-
%
241-
% r = |x0-xs|
242-
r = vector_norm(x0-xs,2);
243-
%
244-
% 2.5D correction factor
245-
% _____________
246-
% | r
247-
% g0 = _ |1 + ---------
248-
% \| |xref-xs|
249-
%
250-
g0 = sqrt( 1 + r./vector_norm(xref-xs,2) );
251-
% ___ ___
252-
% | 1 |-iw (xs-x0) nx0
253-
% D_2.5D(x0,w) = g0 _ |--- _ |--- ------------- e^(i w/c |x0-xs|)
254-
% \|2pi \| c |x0-xs|^(3/2)
255-
%
256-
% Driving signal
257-
D = 1./sqrt(2.*pi) .* sqrt(-1i.*omega./c) .* g0 ...
258-
.* vector_product(xs-x0,nx0,2) ./ r.^(3./2) ...
259-
.* exp(+1i.*omega./c.*r);
260-
%
261261
case 'legacy'
262262
% --- Old SFS Toolbox default ------------------------------------
263263
% 2.5D correction factor

SFS_time_domain/driving_functions_imp/driving_function_imp_wfs_fs.m

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,32 @@
148148
xref = repmat(xref,[size(x0,1) 1]);
149149

150150
switch driving_functions
151-
case {'default', 'reference_point'}
151+
case {'default', 'reference_circle'}
152+
% Driving function with two stationary phase approximations,
153+
% reference to circle around the focused source with radius |xref-xs|
154+
%
155+
% r = |x0-xs|
156+
r = vector_norm(x0-xs,2);
157+
%
158+
% 2.5D correction factor
159+
% _____________
160+
% | r
161+
% g0 = _ |1 + ---------
162+
% \| |xref-xs|
163+
%
164+
g0 = sqrt( 1 + r./vector_norm(xref-xs,2) );
165+
% ___
166+
% | 1 (xs-x0) nx0
167+
% d_2.5D(x0,t) = h_pre(-t) * g0 _ |--- ------------- delta(t+|x0-xs|/c)
168+
% \|2pi |x0-xs|^(3/2)
169+
%
170+
% See http://sfstoolbox.org/#equation-d.wfs.fs.2.5D
171+
%
172+
% Delay and amplitude weight
173+
delay = -1./c .* r;
174+
weight = g0 ./ sqrt(2.*pi) .* vector_product(xs-x0,nx0,2) ./ r.^(3./2);
175+
%
176+
case 'reference_point'
152177
% Driving function with only one stationary phase approximation,
153178
% reference to one point in field
154179
%
@@ -168,8 +193,6 @@
168193
% d_2.5D(x0,t) = h_pre(-t) * g0 _ |--- ------------- delta(t+|x0-xs|/c)
169194
% \|2pi |x0-xs|^(3/2)
170195
%
171-
% See http://sfstoolbox.org/#equation-d.wfs.fs.2.5D
172-
%
173196
% Delay and amplitude weight
174197
delay = -1./c .* r;
175198
weight = g0 ./ sqrt(2.*pi) .* vector_product(xs-x0,nx0,2) ./ r.^(3./2);
@@ -203,30 +226,6 @@
203226
delay = -1./c .* r;
204227
weight = g0 ./ sqrt(2.*pi) .* vector_product(xs-x0,nx0,2) ./ r.^(3./2);
205228
%
206-
case {'reference_circle'}
207-
% Driving function with two stationary phase approximations,
208-
% reference to circle around the focused source with radius |xref-xs|
209-
%
210-
% r = |x0-xs|
211-
r = vector_norm(x0-xs,2);
212-
%
213-
% 2.5D correction factor
214-
% _____________
215-
% | r
216-
% g0 = _ |1 + ---------
217-
% \| |xref-xs|
218-
%
219-
g0 = sqrt( 1 + r./vector_norm(xref-xs,2) );
220-
% ___
221-
% | 1 (xs-x0) nx0
222-
% d_2.5D(x0,t) = h_pre(-t) * g0 _ |--- ------------- delta(t+|x0-xs|/c)
223-
% \|2pi |x0-xs|^(3/2)
224-
%
225-
%
226-
% Delay and amplitude weight
227-
delay = -1./c .* r;
228-
weight = g0 ./ sqrt(2.*pi) .* vector_product(xs-x0,nx0,2) ./ r.^(3./2);
229-
%
230229
case 'legacy'
231230
% --- SFS Toolbox ------------------------------------------------
232231
% 2.5D correction factor

0 commit comments

Comments
 (0)