Multipole Decomposition 3

Author: Adelin Patoux

New module ``multipole`` in v1.1.2

!!CAUTION!! : ``multipole`` is a new functionality. Please report possible problems and errors.

Here we analyze the contributions of the electric and magnetic dipole modes to the extinction spectra of a silicon nano-disc and study the impact of a hole in the nanodisc.

The example is based on the exact multipole decomposition described in reference [1].

[1] Alaee, R., Rockstuhl, C. and Fernandez-Corbaton, I. An electromagnetic multipole expansion beyond the long-wavelength approximation. Optics Communications 407, 17-21 (2018)

[1]:
from __future__ import print_function, division

## --- load the modules
import numpy as np
import matplotlib.pyplot as plt

from pyGDM2 import structures
from pyGDM2 import materials
from pyGDM2 import fields
from pyGDM2 import core
from pyGDM2 import propagators
from pyGDM2 import visu
from pyGDM2 import tools
from pyGDM2 import linear
from pyGDM2 import multipole

Config and run simulation

Si nanocube of 160 nm side-length in vacuum, plane wave illumination.

We discretize with 10 nm to achieve a relatively fast inversion for this demonstration.

[2]:
## --- simulation initialization ---

## --- geometry
mesh = 'hex'
step = 10         # in nm
radius = 60       # in nm
height = 120      # in nm
hole_radius = 25  # in nm


## --- Full nanodisc
geometry_0 = structures.nanodisc(step, R=radius/step,
                                       H=height//step, mesh=mesh)
## --- Holed nanodisc
## We copy the full nanodisc meshpoints except where the hole is
X_h, _, Z_h = geometry_0.T
X_h = X_h - np.mean(X_h) + radius / 2.   # hole center = radius/2
Z_h = Z_h - np.mean(Z_h)
geometry_1 = geometry_0.copy()[X_h**2 + Z_h**2 > hole_radius**2]

material = materials.silicon()
struct_0 = structures.struct(step, geometry_0, material)
struct_1 = structures.struct(step, geometry_1, material)


## --- incident field: lin. pol plane wave
field_generator = fields.plane_wave
wavelengths = np.arange(400, 700, 5)
kwargs = dict(theta=0.0, inc_angle=180)   ## normal incidence from top
efield = fields.efield(field_generator,
                       wavelengths=wavelengths, kwargs=kwargs)


## --- environment
dyads = propagators.DyadsQuasistatic123(n1=1, n2=1)


## --- create simulation instance
sim_0 = core.simulation(struct_0, efield, dyads)
sim_1 = core.simulation(struct_1, efield, dyads)

visu.structure(sim_0, projection = 'XZ')
print("full:   N dp={}".format(len(geometry_0)))
visu.structure(sim_1, projection = 'XZ')
print("hole:   N dp={}".format(len(geometry_0)))

## --- run the main simulation ---
sim_0.scatter()
sim_1.scatter()

structure initialization - automatic mesh detection: hex
structure initialization - consistency check: 1960/1960 dipoles valid
structure initialization - automatic mesh detection: hex
structure initialization - consistency check: 1681/1681 dipoles valid
../../_images/examples_multipole_exampleMultipole_ex3_hole_3_1.png
full:   N dp=1960
../../_images/examples_multipole_exampleMultipole_ex3_hole_3_3.png
hole:   N dp=1960
/home/hans/.local/lib/python3.8/site-packages/numba/core/dispatcher.py:241: UserWarning: Numba extension module 'numba_scipy' failed to load due to 'VersionConflict((scipy 1.7.1 (/home/hans/.local/lib/python3.8/site-packages), Requirement.parse('scipy<=1.6.2,>=0.16')))'.
  entrypoints.init_all()
timing for wl=400.00nm - setup: EE 5843.2ms, inv.: 1307.5ms, repropa.: 4144.1ms (1 field configs), tot: 11295.0ms
timing for wl=405.00nm - setup: EE 160.2ms, inv.: 1303.3ms, repropa.: 53.7ms (1 field configs), tot: 1517.6ms
timing for wl=410.00nm - setup: EE 158.5ms, inv.: 1255.7ms, repropa.: 53.3ms (1 field configs), tot: 1467.9ms
timing for wl=415.00nm - setup: EE 193.0ms, inv.: 1387.1ms, repropa.: 55.0ms (1 field configs), tot: 1635.4ms
timing for wl=420.00nm - setup: EE 168.7ms, inv.: 1274.1ms, repropa.: 53.2ms (1 field configs), tot: 1496.1ms
timing for wl=425.00nm - setup: EE 163.6ms, inv.: 1309.5ms, repropa.: 54.8ms (1 field configs), tot: 1528.1ms
timing for wl=430.00nm - setup: EE 190.6ms, inv.: 1408.3ms, repropa.: 60.2ms (1 field configs), tot: 1659.3ms
timing for wl=435.00nm - setup: EE 189.7ms, inv.: 1367.7ms, repropa.: 53.5ms (1 field configs), tot: 1611.3ms
timing for wl=440.00nm - setup: EE 160.4ms, inv.: 1268.6ms, repropa.: 55.4ms (1 field configs), tot: 1484.6ms
timing for wl=445.00nm - setup: EE 157.7ms, inv.: 1272.2ms, repropa.: 55.1ms (1 field configs), tot: 1485.2ms
timing for wl=450.00nm - setup: EE 166.0ms, inv.: 1290.7ms, repropa.: 53.5ms (1 field configs), tot: 1510.5ms
timing for wl=455.00nm - setup: EE 162.7ms, inv.: 1314.0ms, repropa.: 55.5ms (1 field configs), tot: 1532.4ms
timing for wl=460.00nm - setup: EE 159.7ms, inv.: 1399.9ms, repropa.: 53.5ms (1 field configs), tot: 1613.3ms
timing for wl=465.00nm - setup: EE 168.4ms, inv.: 1390.4ms, repropa.: 55.4ms (1 field configs), tot: 1614.4ms
timing for wl=470.00nm - setup: EE 163.8ms, inv.: 1266.5ms, repropa.: 52.9ms (1 field configs), tot: 1483.5ms
timing for wl=475.00nm - setup: EE 156.3ms, inv.: 1283.0ms, repropa.: 53.0ms (1 field configs), tot: 1492.7ms
timing for wl=480.00nm - setup: EE 160.7ms, inv.: 1290.8ms, repropa.: 52.1ms (1 field configs), tot: 1503.8ms
timing for wl=485.00nm - setup: EE 176.1ms, inv.: 1314.8ms, repropa.: 53.8ms (1 field configs), tot: 1544.9ms
timing for wl=490.00nm - setup: EE 171.0ms, inv.: 1303.7ms, repropa.: 53.7ms (1 field configs), tot: 1528.5ms
timing for wl=495.00nm - setup: EE 160.7ms, inv.: 1342.4ms, repropa.: 53.7ms (1 field configs), tot: 1557.1ms
timing for wl=500.00nm - setup: EE 162.4ms, inv.: 1275.7ms, repropa.: 53.4ms (1 field configs), tot: 1491.8ms
timing for wl=505.00nm - setup: EE 162.4ms, inv.: 1285.9ms, repropa.: 54.5ms (1 field configs), tot: 1503.1ms
timing for wl=510.00nm - setup: EE 164.0ms, inv.: 1313.2ms, repropa.: 53.5ms (1 field configs), tot: 1530.8ms
timing for wl=515.00nm - setup: EE 160.9ms, inv.: 1317.6ms, repropa.: 52.8ms (1 field configs), tot: 1531.9ms
timing for wl=520.00nm - setup: EE 170.0ms, inv.: 1305.0ms, repropa.: 54.9ms (1 field configs), tot: 1530.0ms
timing for wl=525.00nm - setup: EE 166.5ms, inv.: 1382.9ms, repropa.: 54.0ms (1 field configs), tot: 1603.6ms
timing for wl=530.00nm - setup: EE 185.0ms, inv.: 1344.5ms, repropa.: 53.8ms (1 field configs), tot: 1583.4ms
timing for wl=535.00nm - setup: EE 166.3ms, inv.: 1422.6ms, repropa.: 54.7ms (1 field configs), tot: 1643.7ms
timing for wl=540.00nm - setup: EE 157.8ms, inv.: 1451.9ms, repropa.: 55.6ms (1 field configs), tot: 1665.5ms
timing for wl=545.00nm - setup: EE 198.8ms, inv.: 1382.4ms, repropa.: 53.5ms (1 field configs), tot: 1634.8ms
timing for wl=550.00nm - setup: EE 197.3ms, inv.: 1352.5ms, repropa.: 53.5ms (1 field configs), tot: 1603.6ms
timing for wl=555.00nm - setup: EE 164.2ms, inv.: 1462.7ms, repropa.: 53.0ms (1 field configs), tot: 1680.1ms
timing for wl=560.00nm - setup: EE 160.6ms, inv.: 1324.4ms, repropa.: 54.4ms (1 field configs), tot: 1539.7ms
timing for wl=565.00nm - setup: EE 175.4ms, inv.: 1527.1ms, repropa.: 53.2ms (1 field configs), tot: 1756.0ms
timing for wl=570.00nm - setup: EE 168.7ms, inv.: 1339.0ms, repropa.: 55.9ms (1 field configs), tot: 1563.8ms
timing for wl=575.00nm - setup: EE 180.8ms, inv.: 1421.9ms, repropa.: 56.1ms (1 field configs), tot: 1658.9ms
timing for wl=580.00nm - setup: EE 193.7ms, inv.: 1390.7ms, repropa.: 62.0ms (1 field configs), tot: 1646.6ms
timing for wl=585.00nm - setup: EE 161.9ms, inv.: 1388.7ms, repropa.: 55.7ms (1 field configs), tot: 1606.4ms
timing for wl=590.00nm - setup: EE 167.4ms, inv.: 1440.5ms, repropa.: 54.3ms (1 field configs), tot: 1662.5ms
timing for wl=595.00nm - setup: EE 175.9ms, inv.: 1367.3ms, repropa.: 55.3ms (1 field configs), tot: 1598.7ms
timing for wl=600.00nm - setup: EE 170.7ms, inv.: 1423.2ms, repropa.: 53.8ms (1 field configs), tot: 1648.2ms
timing for wl=605.00nm - setup: EE 169.0ms, inv.: 1317.8ms, repropa.: 62.0ms (1 field configs), tot: 1549.1ms
timing for wl=610.00nm - setup: EE 161.6ms, inv.: 1295.6ms, repropa.: 53.8ms (1 field configs), tot: 1511.3ms
timing for wl=615.00nm - setup: EE 168.7ms, inv.: 1373.0ms, repropa.: 55.0ms (1 field configs), tot: 1596.8ms
timing for wl=620.00nm - setup: EE 171.2ms, inv.: 1522.7ms, repropa.: 54.4ms (1 field configs), tot: 1748.7ms
timing for wl=625.00nm - setup: EE 169.0ms, inv.: 1348.5ms, repropa.: 53.8ms (1 field configs), tot: 1571.5ms
timing for wl=630.00nm - setup: EE 163.5ms, inv.: 1417.4ms, repropa.: 56.2ms (1 field configs), tot: 1637.2ms
timing for wl=635.00nm - setup: EE 179.9ms, inv.: 1492.9ms, repropa.: 54.2ms (1 field configs), tot: 1727.5ms
timing for wl=640.00nm - setup: EE 181.2ms, inv.: 1321.6ms, repropa.: 53.5ms (1 field configs), tot: 1556.6ms
timing for wl=645.00nm - setup: EE 169.8ms, inv.: 1545.3ms, repropa.: 56.3ms (1 field configs), tot: 1771.6ms
timing for wl=650.00nm - setup: EE 181.2ms, inv.: 1465.6ms, repropa.: 59.8ms (1 field configs), tot: 1706.7ms
timing for wl=655.00nm - setup: EE 176.3ms, inv.: 1469.6ms, repropa.: 55.8ms (1 field configs), tot: 1701.9ms
timing for wl=660.00nm - setup: EE 176.2ms, inv.: 1490.3ms, repropa.: 55.8ms (1 field configs), tot: 1722.4ms
timing for wl=665.00nm - setup: EE 162.9ms, inv.: 1507.5ms, repropa.: 53.5ms (1 field configs), tot: 1724.2ms
timing for wl=670.00nm - setup: EE 180.4ms, inv.: 1544.1ms, repropa.: 55.1ms (1 field configs), tot: 1779.9ms
timing for wl=675.00nm - setup: EE 177.5ms, inv.: 1520.9ms, repropa.: 55.9ms (1 field configs), tot: 1754.8ms
timing for wl=680.00nm - setup: EE 161.7ms, inv.: 1380.5ms, repropa.: 54.0ms (1 field configs), tot: 1596.6ms
timing for wl=685.00nm - setup: EE 158.4ms, inv.: 1315.6ms, repropa.: 54.7ms (1 field configs), tot: 1529.1ms
timing for wl=690.00nm - setup: EE 166.9ms, inv.: 1422.7ms, repropa.: 54.6ms (1 field configs), tot: 1644.5ms
timing for wl=695.00nm - setup: EE 173.6ms, inv.: 1331.9ms, repropa.: 55.6ms (1 field configs), tot: 1561.3ms
timing for wl=400.00nm - setup: EE 145.2ms, inv.: 952.0ms, repropa.: 45.2ms (1 field configs), tot: 1142.5ms
timing for wl=405.00nm - setup: EE 125.9ms, inv.: 903.6ms, repropa.: 45.5ms (1 field configs), tot: 1075.3ms
timing for wl=410.00nm - setup: EE 140.9ms, inv.: 1088.9ms, repropa.: 45.2ms (1 field configs), tot: 1275.6ms
timing for wl=415.00nm - setup: EE 124.5ms, inv.: 929.4ms, repropa.: 45.1ms (1 field configs), tot: 1099.4ms
timing for wl=420.00nm - setup: EE 130.1ms, inv.: 1014.6ms, repropa.: 45.5ms (1 field configs), tot: 1190.3ms
timing for wl=425.00nm - setup: EE 142.0ms, inv.: 1077.9ms, repropa.: 47.3ms (1 field configs), tot: 1267.5ms
timing for wl=430.00nm - setup: EE 128.4ms, inv.: 978.1ms, repropa.: 48.3ms (1 field configs), tot: 1155.0ms
timing for wl=435.00nm - setup: EE 130.5ms, inv.: 1009.1ms, repropa.: 46.8ms (1 field configs), tot: 1186.8ms
timing for wl=440.00nm - setup: EE 131.0ms, inv.: 1211.5ms, repropa.: 58.1ms (1 field configs), tot: 1400.7ms
timing for wl=445.00nm - setup: EE 134.4ms, inv.: 1099.0ms, repropa.: 47.0ms (1 field configs), tot: 1280.6ms
timing for wl=450.00nm - setup: EE 148.9ms, inv.: 1152.8ms, repropa.: 49.5ms (1 field configs), tot: 1351.8ms
timing for wl=455.00nm - setup: EE 133.9ms, inv.: 1055.7ms, repropa.: 45.9ms (1 field configs), tot: 1235.7ms
timing for wl=460.00nm - setup: EE 134.0ms, inv.: 1109.1ms, repropa.: 47.2ms (1 field configs), tot: 1290.5ms
timing for wl=465.00nm - setup: EE 141.1ms, inv.: 1012.3ms, repropa.: 52.2ms (1 field configs), tot: 1205.8ms
timing for wl=470.00nm - setup: EE 133.0ms, inv.: 1157.7ms, repropa.: 47.1ms (1 field configs), tot: 1338.1ms
timing for wl=475.00nm - setup: EE 140.0ms, inv.: 1232.9ms, repropa.: 45.6ms (1 field configs), tot: 1418.7ms
timing for wl=480.00nm - setup: EE 149.3ms, inv.: 1128.3ms, repropa.: 49.6ms (1 field configs), tot: 1327.4ms
timing for wl=485.00nm - setup: EE 151.6ms, inv.: 1173.1ms, repropa.: 45.3ms (1 field configs), tot: 1370.3ms
timing for wl=490.00nm - setup: EE 139.4ms, inv.: 993.9ms, repropa.: 45.5ms (1 field configs), tot: 1179.0ms
timing for wl=495.00nm - setup: EE 124.5ms, inv.: 928.8ms, repropa.: 45.5ms (1 field configs), tot: 1099.2ms
timing for wl=500.00nm - setup: EE 129.5ms, inv.: 1084.0ms, repropa.: 47.1ms (1 field configs), tot: 1261.1ms
timing for wl=505.00nm - setup: EE 124.4ms, inv.: 1022.1ms, repropa.: 47.7ms (1 field configs), tot: 1194.5ms
timing for wl=510.00nm - setup: EE 129.2ms, inv.: 1180.2ms, repropa.: 45.7ms (1 field configs), tot: 1355.3ms
timing for wl=515.00nm - setup: EE 136.6ms, inv.: 961.1ms, repropa.: 48.1ms (1 field configs), tot: 1146.3ms
timing for wl=520.00nm - setup: EE 128.9ms, inv.: 924.6ms, repropa.: 46.2ms (1 field configs), tot: 1100.0ms
timing for wl=525.00nm - setup: EE 131.3ms, inv.: 1025.0ms, repropa.: 44.7ms (1 field configs), tot: 1201.2ms
timing for wl=530.00nm - setup: EE 132.9ms, inv.: 902.9ms, repropa.: 45.3ms (1 field configs), tot: 1081.5ms
timing for wl=535.00nm - setup: EE 141.1ms, inv.: 900.6ms, repropa.: 46.1ms (1 field configs), tot: 1087.8ms
timing for wl=540.00nm - setup: EE 128.3ms, inv.: 948.5ms, repropa.: 44.5ms (1 field configs), tot: 1121.5ms
timing for wl=545.00nm - setup: EE 135.1ms, inv.: 957.4ms, repropa.: 45.0ms (1 field configs), tot: 1137.7ms
timing for wl=550.00nm - setup: EE 125.7ms, inv.: 938.8ms, repropa.: 45.6ms (1 field configs), tot: 1110.3ms
timing for wl=555.00nm - setup: EE 123.9ms, inv.: 905.9ms, repropa.: 47.9ms (1 field configs), tot: 1077.9ms
timing for wl=560.00nm - setup: EE 134.8ms, inv.: 914.1ms, repropa.: 44.8ms (1 field configs), tot: 1093.8ms
timing for wl=565.00nm - setup: EE 127.6ms, inv.: 940.4ms, repropa.: 46.3ms (1 field configs), tot: 1114.7ms
timing for wl=570.00nm - setup: EE 129.5ms, inv.: 969.2ms, repropa.: 46.5ms (1 field configs), tot: 1145.3ms
timing for wl=575.00nm - setup: EE 123.1ms, inv.: 887.4ms, repropa.: 45.4ms (1 field configs), tot: 1056.0ms
timing for wl=580.00nm - setup: EE 140.6ms, inv.: 888.7ms, repropa.: 45.7ms (1 field configs), tot: 1075.2ms
timing for wl=585.00nm - setup: EE 125.4ms, inv.: 936.9ms, repropa.: 45.8ms (1 field configs), tot: 1108.5ms
timing for wl=590.00nm - setup: EE 125.9ms, inv.: 917.2ms, repropa.: 44.3ms (1 field configs), tot: 1088.0ms
timing for wl=595.00nm - setup: EE 124.4ms, inv.: 1019.1ms, repropa.: 45.2ms (1 field configs), tot: 1188.8ms
timing for wl=600.00nm - setup: EE 140.7ms, inv.: 1010.2ms, repropa.: 46.0ms (1 field configs), tot: 1197.1ms
timing for wl=605.00nm - setup: EE 156.4ms, inv.: 999.8ms, repropa.: 45.6ms (1 field configs), tot: 1202.1ms
timing for wl=610.00nm - setup: EE 131.0ms, inv.: 1027.8ms, repropa.: 45.9ms (1 field configs), tot: 1204.9ms
timing for wl=615.00nm - setup: EE 134.0ms, inv.: 1399.5ms, repropa.: 49.9ms (1 field configs), tot: 1583.8ms
timing for wl=620.00nm - setup: EE 140.1ms, inv.: 1005.5ms, repropa.: 47.5ms (1 field configs), tot: 1193.3ms
timing for wl=625.00nm - setup: EE 136.0ms, inv.: 926.1ms, repropa.: 44.9ms (1 field configs), tot: 1107.2ms
timing for wl=630.00nm - setup: EE 126.7ms, inv.: 942.0ms, repropa.: 45.2ms (1 field configs), tot: 1114.1ms
timing for wl=635.00nm - setup: EE 130.1ms, inv.: 957.5ms, repropa.: 45.8ms (1 field configs), tot: 1133.5ms
timing for wl=640.00nm - setup: EE 128.6ms, inv.: 943.4ms, repropa.: 45.9ms (1 field configs), tot: 1118.0ms
timing for wl=645.00nm - setup: EE 128.9ms, inv.: 991.5ms, repropa.: 51.1ms (1 field configs), tot: 1171.7ms
timing for wl=650.00nm - setup: EE 159.5ms, inv.: 1063.2ms, repropa.: 44.7ms (1 field configs), tot: 1267.7ms
timing for wl=655.00nm - setup: EE 129.1ms, inv.: 962.9ms, repropa.: 44.7ms (1 field configs), tot: 1136.9ms
timing for wl=660.00nm - setup: EE 137.3ms, inv.: 1092.8ms, repropa.: 45.3ms (1 field configs), tot: 1275.6ms
timing for wl=665.00nm - setup: EE 134.2ms, inv.: 969.6ms, repropa.: 45.6ms (1 field configs), tot: 1149.6ms
timing for wl=670.00nm - setup: EE 127.4ms, inv.: 948.2ms, repropa.: 44.9ms (1 field configs), tot: 1120.7ms
timing for wl=675.00nm - setup: EE 134.5ms, inv.: 924.9ms, repropa.: 45.4ms (1 field configs), tot: 1105.1ms
timing for wl=680.00nm - setup: EE 128.4ms, inv.: 926.2ms, repropa.: 46.8ms (1 field configs), tot: 1101.5ms
timing for wl=685.00nm - setup: EE 128.0ms, inv.: 939.4ms, repropa.: 46.3ms (1 field configs), tot: 1114.0ms
timing for wl=690.00nm - setup: EE 131.7ms, inv.: 981.8ms, repropa.: 45.7ms (1 field configs), tot: 1159.4ms
timing for wl=695.00nm - setup: EE 148.2ms, inv.: 893.7ms, repropa.: 45.1ms (1 field configs), tot: 1087.2ms
[2]:
1

Extinction spectra

[6]:
## -- spectra of extinction sections per multipole moment
wl, spec1 = tools.calculate_spectrum(sim_0, 0, linear.extinct)
ex_0, sc_0, ab_0 = spec1.T
wl, spec2 = tools.calculate_spectrum(sim_0, 0, multipole.extinct)
ex_p_0, ex_m_0, ex_qe_0, ex_qm_0 = spec2.T

plt.figure()
plt.title("full disc")
plt.plot(wl, ex_0, label='extinct')
plt.plot(wl, ex_p_0, label='p')
plt.plot(wl, ex_m_0, label='m')
plt.plot(wl, ex_p_0 + ex_m_0, label='dipole sum', dashes=[2,2])

plt.legend()
plt.xlabel("wavelength (nm)")
plt.ylabel("extinction cross section (nm^2)")
plt.show()



## -- spectra of extinction sections per multipole moment
wl, spec1 = tools.calculate_spectrum(sim_1, 0, linear.extinct)
ex_1, sc_1, ab_1 = spec1.T
wl, spec2 = tools.calculate_spectrum(sim_1, 0, multipole.extinct)
ex_p_1, ex_m_1, ex_qe_1, ex_qm_1 = spec2.T

plt.figure()
plt.title("disc with hole")
plt.plot(wl, ex_1, label='extinct')
plt.plot(wl, ex_p_1, label='p')
plt.plot(wl, ex_m_1, label='m')
plt.plot(wl, ex_qe_1, label='Qe')
plt.plot(wl, ex_qm_1, label='Qm')
plt.plot(wl, ex_p_1 + ex_m_1 + ex_qe_1 + ex_qm_1, label='multipole sum', dashes=[2,2])

plt.legend()
plt.xlabel("wavelength (nm)")
plt.ylabel("extinction cross section (nm^2)")
plt.show()
../../_images/examples_multipole_exampleMultipole_ex3_hole_5_0.png
../../_images/examples_multipole_exampleMultipole_ex3_hole_5_1.png

nearfield intensity across discs

[5]:
## -- nearfield intensity map: full disc
wl_0 = 540  # MD resonance
delta_wl = np.abs(wl - wl_0)
i_0 = np.argmin(delta_wl)
plt.figure()
MAP = tools.generate_NF_map_XZ(-150,150,51, -100,200,51, Y0 = 0)
Etot_0 = linear.nearfield(sim_0, field_index=i_0, r_probe=MAP, which_fields=['Et'])[0]
visu.vectorfield_color(Etot_0, cmap='jet', projection="XZ",
                       fieldComp='I', clim=(0,30), tit='full disc',
                       interpolation='bicubic', show=True)


## -- nearfield intensity map: with hole
wl_1 = 476  # MD resonance
delta_wl = np.abs(wl - wl_1)
i_1 = np.argmin(delta_wl)
plt.figure()
MAP = tools.generate_NF_map_XZ(-150,150,51, -100,200,51, Y0 = 0)
Etot_1 = linear.nearfield(sim_1, field_index=i_1, r_probe=MAP, which_fields=['Et'])[0]
visu.vectorfield_color(Etot_1, cmap='jet', projection="XZ",
                       fieldComp='I', clim=(0,30), tit='with hole',
                       interpolation='bicubic', show=True)
../../_images/examples_multipole_exampleMultipole_ex3_hole_7_0.png
../../_images/examples_multipole_exampleMultipole_ex3_hole_7_1.png