6. Scattering by a small cylinder

[1]:
%load_ext autoreload
%autoreload 2
[2]:
from matplotlib import rcParams
rcParams['figure.dpi']=125
from matplotlib import cm
[3]:
from diffractio import np, sp, plt, nm, um, mm, degrees

from diffractio.scalar_sources_X import Scalar_source_X
from diffractio.scalar_masks_XZ import Scalar_mask_XZ
number of processors: 8
total memory        : 15.5 Gb
available memory    : 20 %
max frequency       : 3100 GHz
[4]:
def scattering_small_cylinder(n_out=1.33, n_in= 1.59, r_sphere= 1*um, wavelength = 600*nm):
    x0 = np.linspace(-2*r_sphere,2*r_sphere , 1024)
    z0 = np.linspace(0,4*r_sphere, 1024) #26 mm
    u0 = Scalar_source_X(x0, wavelength)
    u0.plane_wave(A=1, theta=0 * degrees)

    vesicula = Scalar_mask_XZ(x=x0,z=z0,wavelength=wavelength,n_background=n_out)
    vesicula.incident_field(u0)
    mascara=vesicula.sphere(r0=(0*um,1.25*r_sphere), radius=(r_sphere,r_sphere),
                angle=0, refraction_index= n_in )

    vesicula.WPM(verbose=False)

    #mascara=1 - mascara
    #vesicula.u=vesicula.u*mascara
    vesicula.draw(kind='intensity', logarithm=True, draw_borders=True, scale='scaled')
    #plt.ylim(-2*r_sphere,2*r_sphere)
    plt.suptitle("$n_{{out}} = {:2.2f}\,\, /\,\, n_{{in}} = {:2.2f}$".format(n_out, n_in),
             fontsize=15)
    #plt.clim(vmin=0,vmax=2)
    return vesicula

6.1. Scattering by a big, transparent cylinder

[5]:
vesicula=scattering_small_cylinder(n_out=1.33, n_in= 1.7, r_sphere= 12*um, wavelength = 600*nm)
../../../_images/source_examples_optics_scattering_small_cylinders_6_0.png
[6]:
    vesicula.draw(kind='phase', logarithm=False, draw_borders=True, scale='scaled')

[6]:
<matplotlib.image.AxesImage at 0x7f7cdf05e550>
../../../_images/source_examples_optics_scattering_small_cylinders_7_1.png

6.2. Scattering by a small, transparent cylinder

[7]:
vesicula=scattering_small_cylinder(n_out=1.33, n_in= 1.59, r_sphere= 2*um, wavelength = 600*nm)
../../../_images/source_examples_optics_scattering_small_cylinders_9_0.png
[8]:
vesicula.draw(kind='phase', logarithm=False, draw_borders=True, scale='scaled')

[8]:
<matplotlib.image.AxesImage at 0x7f7ce01dafd0>
../../../_images/source_examples_optics_scattering_small_cylinders_10_1.png

6.3. Scattering by a very small, transparent cylinder

[9]:
vesicula=scattering_small_cylinder(n_out=1.33, n_in= 1.59, r_sphere= 1*um, wavelength = 600*nm)
../../../_images/source_examples_optics_scattering_small_cylinders_12_0.png
[10]:
vesicula.draw(kind='phase', logarithm=False, draw_borders=True, scale='scaled')

[10]:
<matplotlib.image.AxesImage at 0x7f7ce01a42e0>
../../../_images/source_examples_optics_scattering_small_cylinders_13_1.png
[19]:
vesicula=scattering_small_cylinder(n_out=8, n_in= 1, r_sphere= 1*um, wavelength = 600*nm)
../../../_images/source_examples_optics_scattering_small_cylinders_14_0.png
[20]:
vesicula.draw(kind='phase', logarithm=False, draw_borders=True, scale='scaled')

[20]:
<matplotlib.image.AxesImage at 0x7f7cdef4e220>
../../../_images/source_examples_optics_scattering_small_cylinders_15_1.png
[26]:
vesicula=scattering_small_cylinder(n_out=1.33, n_in= 16, r_sphere= 1*um, wavelength = 600*nm)
../../../_images/source_examples_optics_scattering_small_cylinders_16_0.png
[27]:
vesicula.draw(kind='phase', logarithm=False, draw_borders=True, scale='scaled')

[27]:
<matplotlib.image.AxesImage at 0x7f7cded80070>
../../../_images/source_examples_optics_scattering_small_cylinders_17_1.png

6.4. Scattering by a very small, transparent cylinder (n_cylinder < n_environment)

[11]:
vesicula=scattering_small_cylinder(n_out=1.59, n_in= 1.33, r_sphere= 2*um, wavelength = 600*nm)
../../../_images/source_examples_optics_scattering_small_cylinders_19_0.png
[12]:
vesicula.draw(kind='phase', logarithm=False, draw_borders=True, scale='scaled')

[12]:
<matplotlib.image.AxesImage at 0x7f7cdf1d9400>
../../../_images/source_examples_optics_scattering_small_cylinders_20_1.png

7. Scattering by a small, absorbent cylinder

[13]:
vesicula=scattering_small_cylinder(n_out=1.33, n_in= 1.59+10j, r_sphere= 2*um, wavelength = 600*nm)
../../../_images/source_examples_optics_scattering_small_cylinders_22_0.png
[14]:
vesicula.draw(kind='phase', logarithm=False, draw_borders=True, scale='scaled')

[14]:
<matplotlib.image.AxesImage at 0x7f7ce00a3490>
../../../_images/source_examples_optics_scattering_small_cylinders_23_1.png

7.1. Scattering by a small, slightlya aborbing cylinder

[15]:
vesicula=scattering_small_cylinder(n_out=1.33, n_in= 1.59+.066j, r_sphere= 2*um, wavelength = 600*nm)
../../../_images/source_examples_optics_scattering_small_cylinders_25_0.png
[16]:
vesicula.draw(kind='phase', logarithm=False, draw_borders=True, scale='scaled')
[16]:
<matplotlib.image.AxesImage at 0x7f7cdff9cfa0>
../../../_images/source_examples_optics_scattering_small_cylinders_26_1.png
[ ]: