GTPhPixelSmooth[pixel map]
gives a smoothed pixel map.
Details and Options
Examples
Basic Examples
See Also
Related Guides
GroupTheory`
GroupTheory`
GTPhPixelSmooth
GTPhPixelSmooth[pixel map]
gives a smoothed pixel map.
Details and Options
- A large number of plane waves is necessary in the calculation of photonic band structures to get converged results. The main reason is the abrupt change of the permittivity in the structure. In case of the pixelwise definition of the permittivity it can be smoothed by means of a five-point averinging procedure. Periodic boundary conditions are used in the averaging process.
-
GOSmooth "5Points" method - See: W. Hergert, M. Geilhufe, Group Theory in Solid State Physics and Photonics. Problem Solving with Mathematica, chapter 10.4
Examples
Basic Examples (1)
Needs["GroupTheory`"]A permittivity map is defined.
nmax = 20;rad = 8;
map = Table[1, {nmax}, {nmax}];
Do[Do[
If[Sqrt[(i - nmax / 2) ^ 2 + (j - nmax / 2) ^ 2] ≤ rad,
map[[i, j]] = 5, None]
, {i, 1, nmax}], {j, 1, nmax}]The unit cell is a square, i.e.
struct = {1, 1, π / 2};The structure is plotted. There is no modification defined.
GTPhPixelStructure[map, {}, struct]The structure is smoothed and replotted again.
map1 = GTPhPixelSmooth[map];GTPhPixelStructure[map1, {}, {1, 1, π / 2}]The next example demonstrates the action of the cylic boundary conditions.
map = Table[1, {30}, {30}];
Do[Do[
If[i <= 10 && (j <= 10 || j ≥ 20),
map[[i, j]] = 5, None]
If[i ≥ 20 && (j <= 10 || j ≥ 20),
map[[i, j]] = 5, None]
, {i, 1, 30}], {j, 1, 30}]GTPhPixelStructure[map, {}, struct]1A correct smoothing of the pattern is achieved.
map1 = GTPhPixelSmooth[map];GTPhPixelStructure[map1, {}, {1, 1, π / 2}]