@@ -346,7 +346,7 @@ def esa_edge_2d_plane(omega, x0, n=[0, 1, 0], alpha=3/2*np.pi, Nc=None, c=None):
346346 phi = np .where (phi < 0 , phi + 2 * np .pi , phi )
347347
348348 if Nc is None :
349- Nc = 2 * np .ceil (k * np .max (r ))
349+ Nc = np .ceil (2 * k * np .max (r ) * alpha / np . pi )
350350
351351 epsilon = np .ones (Nc ) # weights for series expansion
352352 epsilon [0 ] = 2
@@ -403,7 +403,7 @@ def esa_edge_dipole_2d_plane(omega, x0, n=[0, 1, 0], alpha=3/2*np.pi, Nc=None, c
403403 phi = np .where (phi < 0 , phi + 2 * np .pi , phi )
404404
405405 if Nc is None :
406- Nc = 2 * np .ceil (k * np .max (r ))
406+ Nc = np .ceil (2 * k * np .max (r ) * alpha / np . pi )
407407
408408 epsilon = np .ones (Nc ) # weights for series expansion
409409 epsilon [0 ] = 2
@@ -461,7 +461,7 @@ def esa_edge_2d_line(omega, x0, xs, alpha=3/2*np.pi, Nc=None, c=None):
461461 phi = np .where (phi < 0 , phi + 2 * np .pi , phi )
462462
463463 if Nc is None :
464- Nc = 2 * np .ceil (k * np .max (r ))
464+ Nc = np .ceil (2 * k * np .max (r ) * alpha / np . pi )
465465
466466 epsilon = np .ones (Nc ) # weights for series expansion
467467 epsilon [0 ] = 2
@@ -568,7 +568,7 @@ def esa_edge_dipole_2d_line(omega, x0, xs, alpha=3/2*np.pi, Nc=None, c=None):
568568 phi = np .where (phi < 0 , phi + 2 * np .pi , phi )
569569
570570 if Nc is None :
571- Nc = 2 * np .ceil (k * np .max (r ))
571+ Nc = np .ceil (2 * k * np .max (r ) * alpha / np . pi )
572572
573573 epsilon = np .ones (Nc ) # weights for series expansion
574574 epsilon [0 ] = 2
0 commit comments