Note

Click here to download the full example code or to run this example in your browser via Binder

# Two photonic crystal slabs#

Mechanically tunable photonic crystal structure consisting of coupled photonic crystal slabs.

```
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import nannos as nn
```

We will code the structures studied in [Suh2003].

Define the problem

Fig 2 (a) from [Suh2003].

```
def compute_transmission(fn):
pw = nn.PlaneWave(wavelength=1 / fn, angles=(0, 0, 0))
sim = nn.Simulation(stack, pw, nh)
R, T = sim.diffraction_efficiencies()
print(f"f = {fn} (normalized)")
print("T = ", T)
return T
#
freqs_norma = np.linspace(0.49, 0.6, 30)
freqs_adapted, transmission = nn.adaptive_sampler(
compute_transmission,
freqs_norma,
)
plt.figure()
plt.plot(freqs_adapted, transmission, c="#be4c83")
plt.xlim(freqs_norma[0], freqs_norma[-1])
plt.ylim(0, 1)
plt.xlabel(r"frequency ($2\pi c / a$)")
plt.ylabel("Transmission")
plt.tight_layout()
```

Out:

```
f = 0.49 (normalized)
T = 0.9845910272336017
f = 0.49379310344827587 (normalized)
T = 0.9999341513659246
f = 0.4975862068965517 (normalized)
T = 0.9769428878609837
f = 0.5013793103448275 (normalized)
T = 0.8767335476261815
f = 0.5051724137931034 (normalized)
T = 0.6819614986550931
f = 0.5089655172413793 (normalized)
T = 0.43944918491782203
f = 0.5127586206896552 (normalized)
T = 0.23067729350581348
f = 0.516551724137931 (normalized)
T = 0.09636651755605909
f = 0.5203448275862069 (normalized)
T = 0.02811450375672226
f = 0.5241379310344827 (normalized)
T = 0.0027358426983726558
f = 0.5279310344827586 (normalized)
T = 0.0016544384044449398
f = 0.5317241379310345 (normalized)
T = 0.013646566599988079
f = 0.5355172413793103 (normalized)
T = 0.032666306647312154
f = 0.5393103448275862 (normalized)
T = 0.055666288492744874
f = 0.5431034482758621 (normalized)
T = 0.08122997733051848
f = 0.5468965517241379 (normalized)
T = 0.10881895149231448
f = 0.5506896551724138 (normalized)
T = 0.13837707657474385
f = 0.5544827586206896 (normalized)
T = 0.17012550144132896
f = 0.5582758620689655 (normalized)
T = 0.204456675631421
f = 0.5620689655172414 (normalized)
T = 0.24187831456810652
f = 0.5658620689655172 (normalized)
T = 0.28298012070103146
f = 0.569655172413793 (normalized)
T = 0.3284061326957889
f = 0.5734482758620689 (normalized)
T = 0.37881884983001857
f = 0.5772413793103448 (normalized)
T = 0.4348401400305083
f = 0.5810344827586207 (normalized)
T = 0.49694944458337476
f = 0.5848275862068966 (normalized)
T = 0.5653129003258625
f = 0.5886206896551724 (normalized)
T = 0.6395103701923203
f = 0.5924137931034482 (normalized)
T = 0.7181288136206226
f = 0.5962068965517241 (normalized)
T = 0.7982190259324771
f = 0.6 (normalized)
T = 0.8747060683869557
f = 0.4994827586206896 (normalized)
T = 0.9387028078218311
f = 0.5032758620689655 (normalized)
T = 0.7899333972193815
f = 0.5146551724137931 (normalized)
T = 0.15399576894361586
f = 0.518448275862069 (normalized)
T = 0.05542943341108327
f = 0.5004310344827585 (normalized)
T = 0.9108490724807619
```

Figs 2 (b-c) from [Suh2003].

```
phc_slab_top = lattice.Layer("PC slab top", thickness=0.55)
phc_slab_top.epsilon = epsgrid
phc_slab_bot = phc_slab_top.copy("PC slab bottom")
plt.figure()
seps = [1.35, 1.1, 0.95, 0.85, 0.75, 0.65, 0.55]
colors = plt.cm.turbo(np.linspace(0, 1, len(seps)))
for i, sep in enumerate(seps):
spacer = lattice.Layer("Spacer", epsilon=1, thickness=sep)
stack = [sup, phc_slab_top, spacer, phc_slab_bot, sub]
def compute_transmission(fn):
pw = nn.PlaneWave(wavelength=1 / fn, angles=(0, 0, 0))
sim = nn.Simulation(stack, pw, nh)
R, T = sim.diffraction_efficiencies()
print(f"f = {fn} (normalized)")
print("T = ", T)
return T
freqs_norma = np.linspace(0.49, 0.6, 30)
freqs_adapted, transmission = nn.adaptive_sampler(
compute_transmission,
freqs_norma,
)
plt.plot(freqs_adapted, transmission, c=colors[i], label=rf"$d = {sep}a$")
plt.xlim(freqs_norma[0], freqs_norma[-1])
plt.ylim(0, 1)
plt.xlabel(r"frequency ($2\pi c / a$)")
plt.ylabel("Transmission")
plt.tight_layout()
plt.pause(0.1)
plt.legend(loc=(1.05, 0.3))
plt.tight_layout()
plt.show()
```

Out:

```
f = 0.49 (normalized)
T = 0.944504598961793
f = 0.49379310344827587 (normalized)
T = 0.9997682511298964
f = 0.4975862068965517 (normalized)
T = 0.9540820015844339
f = 0.5013793103448275 (normalized)
T = 0.8771839203172563
f = 0.5051724137931034 (normalized)
T = 0.9375406178769572
f = 0.5089655172413793 (normalized)
T = 0.736077822837734
f = 0.5127586206896552 (normalized)
T = 0.0733492396843332
f = 0.516551724137931 (normalized)
T = 0.005324445907027502
f = 0.5203448275862069 (normalized)
T = 0.00026257252450569564
f = 0.5241379310344827 (normalized)
T = 3.8523680381423257e-07
f = 0.5279310344827586 (normalized)
T = 7.0320262415164594e-09
f = 0.5317241379310345 (normalized)
T = 3.8371562117928745e-05
f = 0.5355172413793103 (normalized)
T = 0.0002552940742640874
f = 0.5393103448275862 (normalized)
T = 0.0008130193282536664
f = 0.5431034482758621 (normalized)
T = 0.0019237711141293528
f = 0.5468965517241379 (normalized)
T = 0.003935919827773884
f = 0.5506896551724138 (normalized)
T = 0.007487108309831267
f = 0.5544827586206896 (normalized)
T = 0.013819465709062112
f = 0.5582758620689655 (normalized)
T = 0.02549992285749322
f = 0.5620689655172414 (normalized)
T = 0.04819892570151781
f = 0.5658620689655172 (normalized)
T = 0.09534185503419094
f = 0.569655172413793 (normalized)
T = 0.1999794072205419
f = 0.5734482758620689 (normalized)
T = 0.4324649251770885
f = 0.5772413793103448 (normalized)
T = 0.8135247574027467
f = 0.5810344827586207 (normalized)
T = 0.9993088714501585
f = 0.5848275862068966 (normalized)
T = 0.8689863537800412
f = 0.5886206896551724 (normalized)
T = 0.7215289601199935
f = 0.5924137931034482 (normalized)
T = 0.6483288067496742
f = 0.5962068965517241 (normalized)
T = 0.643592905352085
f = 0.6 (normalized)
T = 0.6998666814085787
f = 0.49189655172413793 (normalized)
T = 0.9825860355851708
f = 0.4994827586206896 (normalized)
T = 0.9096763681399543
f = 0.5032758620689655 (normalized)
T = 0.8799935661336198
f = 0.5070689655172413 (normalized)
T = 0.9992690233576602
f = 0.5108620689655172 (normalized)
T = 0.26780567061461186
f = 0.5146551724137931 (normalized)
T = 0.019855637450107627
f = 0.518448275862069 (normalized)
T = 0.001314929096917906
f = 0.5677586206896551 (normalized)
T = 0.13707678023229405
f = 0.571551724137931 (normalized)
T = 0.29461019139464284
f = 0.5753448275862069 (normalized)
T = 0.6154027675814344
f = 0.5791379310344827 (normalized)
T = 0.9587902863584116
f = 0.5829310344827586 (normalized)
T = 0.9521336285500523
f = 0.5867241379310345 (normalized)
T = 0.78706268149511
f = 0.5943103448275862 (normalized)
T = 0.638067057784897
f = 0.598103448275862 (normalized)
T = 0.6642908999788143
f = 0.5042241379310344 (normalized)
T = 0.9015525795954157
f = 0.5080172413793103 (normalized)
T = 0.9332460535904632
f = 0.5099137931034483 (normalized)
T = 0.47635913942471375
f = 0.5118103448275861 (normalized)
T = 0.14132455717142517
f = 0.5137068965517242 (normalized)
T = 0.038103506894098534
f = 0.515603448275862 (normalized)
T = 0.010330932299664633
f = 0.5687068965517241 (normalized)
T = 0.1652923106965631
f = 0.570603448275862 (normalized)
T = 0.24256837322292402
f = 0.5725 (normalized)
T = 0.35757712027102956
f = 0.5800862068965518 (normalized)
T = 0.9926715731749276
f = 0.5838793103448277 (normalized)
T = 0.912131753416142
f = 0.5905172413793103 (normalized)
T = 0.6755990384777344
f = 0.5061206896551724 (normalized)
T = 0.979976997137992
f = 0.5084913793103447 (normalized)
T = 0.8499114242549473
f = 0.5113362068965517 (normalized)
T = 0.19535189718861004
f = 0.5122844827586206 (normalized)
T = 0.10186250401788087
f = 0.5132327586206897 (normalized)
T = 0.05284115156948627
f = 0.5781896551724137 (normalized)
T = 0.8973780311619376
f = 0.5876724137931035 (normalized)
T = 0.751883201255802
f = 0.5075431034482758 (normalized)
T = 0.9814982068825037
f = 0.5103879310344828 (normalized)
T = 0.3615866672884838
f = 0.5796120689655173 (normalized)
T = 0.9792808582968326
f = 0.5082543103448275 (normalized)
T = 0.8959279226823901
f = 0.5786637931034482 (normalized)
T = 0.9313277126219535
/builds/nannos/nannos.gitlab.io/nannos/examples/basic/plot_double_phc.py:119: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
plt.pause(0.1)
f = 0.49 (normalized)
T = 0.9509248374803108
f = 0.49379310344827587 (normalized)
T = 0.9995958662377399
f = 0.4975862068965517 (normalized)
T = 0.915228435191264
f = 0.5013793103448275 (normalized)
T = 0.6361891294506574
f = 0.5051724137931034 (normalized)
T = 0.3607660883108226
f = 0.5089655172413793 (normalized)
T = 0.20491063762837305
f = 0.5127586206896552 (normalized)
T = 0.1486487526868172
f = 0.516551724137931 (normalized)
T = 0.39553037670451374
f = 0.5203448275862069 (normalized)
T = 0.007362910798855364
f = 0.5241379310344827 (normalized)
T = 4.1045725682404996e-07
f = 0.5279310344827586 (normalized)
T = 1.4214339479644635e-06
f = 0.5317241379310345 (normalized)
T = 7.565338837679413e-05
f = 0.5355172413793103 (normalized)
T = 0.0004424786470621168
f = 0.5393103448275862 (normalized)
T = 0.001151297815934148
f = 0.5431034482758621 (normalized)
T = 0.00222375816327689
f = 0.5468965517241379 (normalized)
T = 0.003720095390493702
f = 0.5506896551724138 (normalized)
T = 0.0057666956839609275
f = 0.5544827586206896 (normalized)
T = 0.008586796495483771
f = 0.5582758620689655 (normalized)
T = 0.012555047685519632
f = 0.5620689655172414 (normalized)
T = 0.018300362539769504
f = 0.5658620689655172 (normalized)
T = 0.026903242855931358
f = 0.569655172413793 (normalized)
T = 0.040284195212692143
f = 0.5734482758620689 (normalized)
T = 0.061988448579420416
f = 0.5772413793103448 (normalized)
T = 0.09878263473767974
f = 0.5810344827586207 (normalized)
T = 0.16371036172634906
f = 0.5848275862068966 (normalized)
T = 0.28023701314912314
f = 0.5886206896551724 (normalized)
T = 0.4777606871524965
f = 0.5924137931034482 (normalized)
T = 0.7419767134052684
f = 0.5962068965517241 (normalized)
T = 0.9460523569702128
f = 0.6 (normalized)
T = 0.9999984823952999
f = 0.49189655172413793 (normalized)
T = 0.9814438284227078
f = 0.4994827586206896 (normalized)
T = 0.7909855418133528
f = 0.5070689655172413 (normalized)
T = 0.2684005744453019
f = 0.5108620689655172 (normalized)
T = 0.16538740350437917
f = 0.5146551724137931 (normalized)
T = 0.16937866457761638
f = 0.518448275862069 (normalized)
T = 0.2252297117680178
f = 0.5791379310344827 (normalized)
T = 0.12654903916771268
f = 0.5829310344827586 (normalized)
T = 0.2135970034246014
f = 0.5867241379310345 (normalized)
T = 0.3676323367026197
f = 0.598103448275862 (normalized)
T = 0.98920405985108
f = 0.4956896551724138 (normalized)
T = 0.984207497494991
f = 0.5032758620689655 (normalized)
T = 0.4853088496545762
f = 0.5080172413793103 (normalized)
T = 0.23338141762002268
f = 0.5099137931034483 (normalized)
T = 0.18237857174796157
f = 0.515603448275862 (normalized)
T = 0.22132836682360668
f = 0.5175000000000001 (normalized)
T = 0.9888374561050698
f = 0.5222413793103449 (normalized)
T = 0.0003570505547110811
f = 0.5943103448275862 (normalized)
T = 0.8615839315844374
f = 0.49474137931034484 (normalized)
T = 0.9975547298991128
f = 0.49853448275862067 (normalized)
T = 0.8590042098698005
f = 0.5137068965517242 (normalized)
T = 0.15175678191563513
f = 0.5160775862068965 (normalized)
T = 0.28014858081029703
f = 0.5170258620689656 (normalized)
T = 0.6405887319977981
f = 0.5193965517241379 (normalized)
T = 0.034369619769678776
f = 0.521293103448276 (normalized)
T = 0.001715221394335854
f = 0.5971551724137931 (normalized)
T = 0.9725140300290609
f = 0.4966379310344827 (normalized)
T = 0.9571589823304459
f = 0.5151293103448276 (normalized)
T = 0.18857096636800263
f = 0.5163146551724138 (normalized)
T = 0.3275456488003168
f = 0.5167887931034483 (normalized)
T = 0.495201295063351
f = 0.5179741379310345 (normalized)
T = 0.6462897866995136
f = 0.5189224137931034 (normalized)
T = 0.08268845116736763
f = 0.5198706896551724 (normalized)
T = 0.015535354230500594
f = 0.5952586206896551 (normalized)
T = 0.909001315895314
f = 0.5158405172413792 (normalized)
T = 0.2462162213352091
f = 0.5161961206896551 (normalized)
T = 0.3017976553877442
f = 0.5166702586206897 (normalized)
T = 0.4405385919994103
f = 0.5169073275862069 (normalized)
T = 0.5614096459800559
f = 0.5177370689655173 (normalized)
T = 0.9235220936359131
f = 0.5186853448275862 (normalized)
T = 0.13415990895779584
f = 0.5191594827586207 (normalized)
T = 0.05261220833469252
f = 0.5172629310344828 (normalized)
T = 0.831769989716537
f = 0.517855603448276 (normalized)
T = 0.796146349990624
f = 0.5182112068965518 (normalized)
T = 0.38697560561938454
f = 0.5188038793103449 (normalized)
T = 0.10487766931489255
f = 0.519040948275862 (normalized)
T = 0.06571701759529228
f = 0.5176185344827586 (normalized)
T = 0.9929925859925981
f = 0.5183297413793104 (normalized)
T = 0.2948987539569064
f = 0.5185668103448275 (normalized)
T = 0.17311892424764008
f = 0.5173814655172415 (normalized)
T = 0.9254205541767377
f = 0.5176778017241379 (normalized)
T = 0.9672046432158141
f = 0.5177963362068967 (normalized)
T = 0.8650226170927938
f = 0.5173221982758622 (normalized)
T = 0.8805966089717129
f = 0.5175592672413794 (normalized)
T = 0.9998373985266759
f = 0.5171443965517242 (normalized)
T = 0.7323457347937036
f = 0.5174407327586208 (normalized)
T = 0.9627906262866301
f = 0.49 (normalized)
T = 0.9759429670513387
f = 0.49379310344827587 (normalized)
T = 0.9995052954555299
f = 0.4975862068965517 (normalized)
T = 0.9356654651890614
f = 0.5013793103448275 (normalized)
T = 0.633229949233016
f = 0.5051724137931034 (normalized)
T = 0.2858009488743433
f = 0.5089655172413793 (normalized)
T = 0.10511337880932631
f = 0.5127586206896552 (normalized)
T = 0.035822625720203755
f = 0.516551724137931 (normalized)
T = 0.011039980174728573
f = 0.5203448275862069 (normalized)
T = 0.0026015460723169156
f = 0.5241379310344827 (normalized)
T = 0.0002575481560227834
f = 0.5279310344827586 (normalized)
T = 0.006838160625004081
f = 0.5317241379310345 (normalized)
T = 0.0016066043751389513
f = 0.5355172413793103 (normalized)
T = 0.0029773289788209887
f = 0.5393103448275862 (normalized)
T = 0.004622408750717701
f = 0.5431034482758621 (normalized)
T = 0.006480324330750918
f = 0.5468965517241379 (normalized)
T = 0.008598932172928403
f = 0.5506896551724138 (normalized)
T = 0.01108786907585502
f = 0.5544827586206896 (normalized)
T = 0.014117892331973338
f = 0.5582758620689655 (normalized)
T = 0.017942134358908554
f = 0.5620689655172414 (normalized)
T = 0.022940836665034735
f = 0.5658620689655172 (normalized)
T = 0.02970264981346169
f = 0.569655172413793 (normalized)
T = 0.039171483424817286
f = 0.5734482758620689 (normalized)
T = 0.05291770762071098
f = 0.5772413793103448 (normalized)
T = 0.07365108575589392
f = 0.5810344827586207 (normalized)
T = 0.10619894438909552
f = 0.5848275862068966 (normalized)
T = 0.15929488354106155
f = 0.5886206896551724 (normalized)
T = 0.24820946953666032
f = 0.5924137931034482 (normalized)
T = 0.3949809760885566
f = 0.5962068965517241 (normalized)
T = 0.610217838357362
f = 0.6 (normalized)
T = 0.8387889313295448
f = 0.49189655172413793 (normalized)
T = 0.9890386651512483
f = 0.4994827586206896 (normalized)
T = 0.8130454797765618
f = 0.5070689655172413 (normalized)
T = 0.1756483540407184
f = 0.5108620689655172 (normalized)
T = 0.061864561282200616
f = 0.5146551724137931 (normalized)
T = 0.020264968704021884
f = 0.5829310344827586 (normalized)
T = 0.12940960662979423
f = 0.5867241379310345 (normalized)
T = 0.19800125803568364
f = 0.5943103448275862 (normalized)
T = 0.4951973413125564
f = 0.4956896551724138 (normalized)
T = 0.9905076198220713
f = 0.5004310344827585 (normalized)
T = 0.7278778043692842
f = 0.5032758620689655 (normalized)
T = 0.44289985321520925
f = 0.5080172413793103 (normalized)
T = 0.1362110616342178
f = 0.5099137931034483 (normalized)
T = 0.0807905481607855
f = 0.5905172413793103 (normalized)
T = 0.3129572942187314
f = 0.49474137931034484 (normalized)
T = 0.9989268356788913
f = 0.49853448275862067 (normalized)
T = 0.8832250947798995
f = 0.5061206896551724 (normalized)
T = 0.22504541630597438
f = 0.4966379310344827 (normalized)
T = 0.9706035692695761
f = 0.4980603448275862 (normalized)
T = 0.9117126440132786
f = 0.49 (normalized)
T = 0.9909512116769138
f = 0.49379310344827587 (normalized)
T = 0.9993313770031272
f = 0.4975862068965517 (normalized)
T = 0.9629748115460839
f = 0.5013793103448275 (normalized)
T = 0.6964734046136716
f = 0.5051724137931034 (normalized)
T = 0.30115374870126543
f = 0.5089655172413793 (normalized)
T = 0.09468942169356286
f = 0.5127586206896552 (normalized)
T = 0.026623737073805234
f = 0.516551724137931 (normalized)
T = 0.0067226602874054155
f = 0.5203448275862069 (normalized)
T = 0.001380677538272178
f = 0.5241379310344827 (normalized)
T = 0.0002382166804109996
f = 0.5279310344827586 (normalized)
T = 0.00019926067721351127
f = 0.5317241379310345 (normalized)
T = 0.0023802446251425685
f = 0.5355172413793103 (normalized)
T = 0.08831428897245507
f = 0.5393103448275862 (normalized)
T = 0.16723902214184652
f = 0.5431034482758621 (normalized)
T = 0.05201338540834842
f = 0.5468965517241379 (normalized)
T = 0.03729976257434809
f = 0.5506896551724138 (normalized)
T = 0.033702264356075796
f = 0.5544827586206896 (normalized)
T = 0.03370859193227329
f = 0.5582758620689655 (normalized)
T = 0.035743497242498146
f = 0.5620689655172414 (normalized)
T = 0.03949667814679234
f = 0.5658620689655172 (normalized)
T = 0.04516100871287313
f = 0.569655172413793 (normalized)
T = 0.0533097847061271
f = 0.5734482758620689 (normalized)
T = 0.06498995259363925
f = 0.5772413793103448 (normalized)
T = 0.08199592447528514
f = 0.5810344827586207 (normalized)
T = 0.10741748022253046
f = 0.5848275862068966 (normalized)
T = 0.1466662540912216
f = 0.5886206896551724 (normalized)
T = 0.20923287283612743
f = 0.5924137931034482 (normalized)
T = 0.31075727130475816
f = 0.5962068965517241 (normalized)
T = 0.47060827751390466
f = 0.6 (normalized)
T = 0.6874315118314549
f = 0.4994827586206896 (normalized)
T = 0.8678461795981972
f = 0.5032758620689655 (normalized)
T = 0.48631795945884193
f = 0.5070689655172413 (normalized)
T = 0.17250361384732515
f = 0.5108620689655172 (normalized)
T = 0.05072204877766979
f = 0.5146551724137931 (normalized)
T = 0.013624666279921203
f = 0.5336206896551724 (normalized)
T = 0.011529337553691092
f = 0.5412068965517242 (normalized)
T = 0.07623358626153741
f = 0.5867241379310345 (normalized)
T = 0.17421924280537276
f = 0.5943103448275862 (normalized)
T = 0.38243249237586824
f = 0.4956896551724138 (normalized)
T = 0.9962320895158205
f = 0.5004310344827585 (normalized)
T = 0.7906883646829952
f = 0.5061206896551724 (normalized)
T = 0.2295614642933907
f = 0.5080172413793103 (normalized)
T = 0.128291602129895
f = 0.5099137931034483 (normalized)
T = 0.06947817994661892
f = 0.5345689655172414 (normalized)
T = 0.02896736278948076
f = 0.5374137931034483 (normalized)
T = 0.9600834900619738
f = 0.5421551724137932 (normalized)
T = 0.06111073445069057
f = 0.5905172413793103 (normalized)
T = 0.25388974147623905
f = 0.49853448275862067 (normalized)
T = 0.9249719401260081
f = 0.534094827586207 (normalized)
T = 0.017966675455682864
f = 0.5364655172413793 (normalized)
T = 0.38124409276996674
f = 0.5383620689655173 (normalized)
T = 0.3564824368685533
f = 0.5402586206896551 (normalized)
T = 0.10438529907713107
f = 0.4980603448275862 (normalized)
T = 0.9461879091634738
f = 0.5350431034482759 (normalized)
T = 0.04894869753203607
f = 0.5359913793103448 (normalized)
T = 0.17432977886398796
f = 0.5369396551724137 (normalized)
T = 0.8088700047786087
f = 0.5378879310344828 (normalized)
T = 0.6038792638969975
f = 0.5397844827586207 (normalized)
T = 0.12878144542306239
f = 0.5407327586206896 (normalized)
T = 0.0879109623321181
f = 0.5357543103448276 (normalized)
T = 0.1224982951058546
f = 0.536228448275862 (normalized)
T = 0.25491003741013496
f = 0.5367025862068965 (normalized)
T = 0.5709721292335092
f = 0.537176724137931 (normalized)
T = 0.9834335633828317
f = 0.5376508620689655 (normalized)
T = 0.7893230162319048
f = 0.5388362068965518 (normalized)
T = 0.23293585725338886
f = 0.5358728448275862 (normalized)
T = 0.14564249671420276
f = 0.5361099137931034 (normalized)
T = 0.21010386424579164
f = 0.5363469827586207 (normalized)
T = 0.31109537618241867
f = 0.5365840517241378 (normalized)
T = 0.46763432122032944
f = 0.5370581896551724 (normalized)
T = 0.9148878087375298
f = 0.537532327586207 (normalized)
T = 0.8836918002472047
f = 0.5381250000000001 (normalized)
T = 0.45923797455229326
f = 0.5385991379310345 (normalized)
T = 0.28436226174800316
f = 0.539073275862069 (normalized)
T = 0.19537213608275067
f = 0.5395474137931034 (normalized)
T = 0.14566985137651112
f = 0.5371174568965518 (normalized)
T = 0.9551555114823405
f = 0.5372952586206896 (normalized)
T = 0.9984203499039679
f = 0.5384806034482759 (normalized)
T = 0.3172896944314989
f = 0.5374730603448277 (normalized)
T = 0.9253695122960484
f = 0.49 (normalized)
T = 0.9989480015948915
f = 0.49379310344827587 (normalized)
T = 0.9988209287528915
f = 0.4975862068965517 (normalized)
T = 0.9892786754900251
f = 0.5013793103448275 (normalized)
T = 0.8089103841651114
f = 0.5051724137931034 (normalized)
T = 0.3747757184207562
f = 0.5089655172413793 (normalized)
T = 0.10869962785949948
f = 0.5127586206896552 (normalized)
T = 0.027866065599374653
f = 0.516551724137931 (normalized)
T = 0.006963413270114696
f = 0.5203448275862069 (normalized)
T = 0.001747106389659688
f = 0.5241379310344827 (normalized)
T = 0.0005556750078363457
f = 0.5279310344827586 (normalized)
T = 0.0004357956957829062
f = 0.5317241379310345 (normalized)
T = 0.0010127429170740533
f = 0.5355172413793103 (normalized)
T = 0.0036114321618736143
f = 0.5393103448275862 (normalized)
T = 0.014408014737827967
f = 0.5431034482758621 (normalized)
T = 0.06876330828666109
f = 0.5468965517241379 (normalized)
T = 0.49380278005376876
f = 0.5506896551724138 (normalized)
T = 0.7244278703405882
f = 0.5544827586206896 (normalized)
T = 0.271266994094727
f = 0.5582758620689655 (normalized)
T = 0.1616016296549974
f = 0.5620689655172414 (normalized)
T = 0.12409778481698727
f = 0.5658620689655172 (normalized)
T = 0.10966813625680735
f = 0.569655172413793 (normalized)
T = 0.10616434503080092
f = 0.5734482758620689 (normalized)
T = 0.10998366144837446
f = 0.5772413793103448 (normalized)
T = 0.12057484692027834
f = 0.5810344827586207 (normalized)
T = 0.1392233661167067
f = 0.5848275862068966 (normalized)
T = 0.16916048674906156
f = 0.5886206896551724 (normalized)
T = 0.21649811057107282
f = 0.5924137931034482 (normalized)
T = 0.2918979283340893
f = 0.5962068965517241 (normalized)
T = 0.4116373566428639
f = 0.6 (normalized)
T = 0.5900734061434229
f = 0.4994827586206896 (normalized)
T = 0.9385613956955
f = 0.5032758620689655 (normalized)
T = 0.5980671227716614
f = 0.5070689655172413 (normalized)
T = 0.20825226579259482
f = 0.5108620689655172 (normalized)
T = 0.055304070745427425
f = 0.5146551724137931 (normalized)
T = 0.01396442761324105
f = 0.5412068965517242 (normalized)
T = 0.030370610283603054
f = 0.5487931034482758 (normalized)
T = 0.9897381536866808
f = 0.5525862068965517 (normalized)
T = 0.4152726322938085
f = 0.5563793103448276 (normalized)
T = 0.20048082132287584
f = 0.5601724137931035 (normalized)
T = 0.13847691297378845
f = 0.5867241379310345 (normalized)
T = 0.19011752383699063
f = 0.5943103448275862 (normalized)
T = 0.3450573103085402
f = 0.598103448275862 (normalized)
T = 0.493406766709803
f = 0.4956896551724138 (normalized)
T = 0.9998536500857351
f = 0.5004310344827585 (normalized)
T = 0.8854111202741918
f = 0.5023275862068965 (normalized)
T = 0.7106632631878215
f = 0.5080172413793103 (normalized)
T = 0.1511975192255377
f = 0.5099137931034483 (normalized)
T = 0.07767525459775332
f = 0.5118103448275861 (normalized)
T = 0.03928757632060547
f = 0.5449999999999999 (normalized)
T = 0.17434909408717708
f = 0.5497413793103447 (normalized)
T = 0.9280522858409407
f = 0.5535344827586206 (normalized)
T = 0.32968510248007943
f = 0.5554310344827587 (normalized)
T = 0.23020867400707837
f = 0.5573275862068965 (normalized)
T = 0.1783852612897531
f = 0.5905172413793103 (normalized)
T = 0.24979525756875767
f = 0.49853448275862067 (normalized)
T = 0.9714390729827225
f = 0.500905172413793 (normalized)
T = 0.8501144172481189
f = 0.5061206896551724 (normalized)
T = 0.28249604355804053
f = 0.5421551724137932 (normalized)
T = 0.04518235674040532
f = 0.5459482758620688 (normalized)
T = 0.2917766126055191
f = 0.5478448275862069 (normalized)
T = 0.780812638891756
f = 0.5502155172413792 (normalized)
T = 0.830034795796287
f = 0.5516379310344828 (normalized)
T = 0.5426228843650082
f = 0.5540086206896551 (normalized)
T = 0.2978012136470717
f = 0.5549568965517242 (normalized)
T = 0.24901402803491715
f = 0.49995689655172404 (normalized)
T = 0.9147943154600121
f = 0.544051724137931 (normalized)
T = 0.10767332220179231
f = 0.5464224137931033 (normalized)
T = 0.3801990425795099
f = 0.5473706896551724 (normalized)
T = 0.63153175582138
f = 0.5492672413793103 (normalized)
T = 0.9912623894403886
f = 0.5511637931034483 (normalized)
T = 0.6267070308270235
f = 0.5530603448275861 (normalized)
T = 0.3682778436821722
f = 0.5445258620689655 (normalized)
T = 0.1364132834558079
f = 0.5454741379310344 (normalized)
T = 0.22474294207710444
f = 0.5483189655172414 (normalized)
T = 0.9126067907573119
f = 0.5495043103448275 (normalized)
T = 0.9660339880168052
f = 0.549978448275862 (normalized)
T = 0.8814462700346888
f = 0.5485560344827586 (normalized)
T = 0.9600091241578991
f = 0.549030172413793 (normalized)
T = 0.999993609195038
f = 0.49 (normalized)
T = 0.9995399957487827
f = 0.49379310344827587 (normalized)
T = 0.9972363782541647
f = 0.4975862068965517 (normalized)
T = 0.9999094600447666
f = 0.5013793103448275 (normalized)
T = 0.9384767633145435
f = 0.5051724137931034 (normalized)
T = 0.5407833885445197
f = 0.5089655172413793 (normalized)
T = 0.15919811332724326
f = 0.5127586206896552 (normalized)
T = 0.03952466316902527
f = 0.516551724137931 (normalized)
T = 0.010612623102604577
f = 0.5203448275862069 (normalized)
T = 0.003394970491294475
f = 0.5241379310344827 (normalized)
T = 0.0015293463815786337
f = 0.5279310344827586 (normalized)
T = 0.0011854170000144275
f = 0.5317241379310345 (normalized)
T = 0.0015640901058669608
f = 0.5355172413793103 (normalized)
T = 0.0028171402711010293
f = 0.5393103448275862 (normalized)
T = 0.005769981800866056
f = 0.5431034482758621 (normalized)
T = 0.01249904572132764
f = 0.5468965517241379 (normalized)
T = 0.028484889772336503
f = 0.5506896551724138 (normalized)
T = 0.07031207562554798
f = 0.5544827586206896 (normalized)
T = 0.19663122687045465
f = 0.5582758620689655 (normalized)
T = 0.5945645218548865
f = 0.5620689655172414 (normalized)
T = 0.9963414590944951
f = 0.5658620689655172 (normalized)
T = 0.6645296673714395
f = 0.569655172413793 (normalized)
T = 0.42084091120438877
f = 0.5734482758620689 (normalized)
T = 0.31266599361802205
f = 0.5772413793103448 (normalized)
T = 0.2653591306716488
f = 0.5810344827586207 (normalized)
T = 0.24931024177906044
f = 0.5848275862068966 (normalized)
T = 0.25454907594325826
f = 0.5886206896551724 (normalized)
T = 0.2798540411360966
f = 0.5924137931034482 (normalized)
T = 0.3299830494819911
f = 0.5962068965517241 (normalized)
T = 0.4157914731097816
f = 0.6 (normalized)
T = 0.5526114380508186
f = 0.4994827586206896 (normalized)
T = 0.9925550012082017
f = 0.5032758620689655 (normalized)
T = 0.7849333444608089
f = 0.5108620689655172 (normalized)
T = 0.07914888635429852
f = 0.5146551724137931 (normalized)
T = 0.020164149344799397
f = 0.5525862068965517 (normalized)
T = 0.11548926972160863
f = 0.5563793103448276 (normalized)
T = 0.3446016140350225
f = 0.5601724137931035 (normalized)
T = 0.8913283756926892
f = 0.571551724137931 (normalized)
T = 0.35589315002207766
f = 0.5753448275862069 (normalized)
T = 0.28393948831910537
f = 0.5867241379310345 (normalized)
T = 0.26453101518766325
f = 0.5943103448275862 (normalized)
T = 0.3675047278052654
f = 0.598103448275862 (normalized)
T = 0.4769464185630869
f = 0.5004310344827585 (normalized)
T = 0.9748016378549055
f = 0.5023275862068965 (normalized)
T = 0.8763257293868354
f = 0.5042241379310344 (normalized)
T = 0.6688012465346013
f = 0.5070689655172413 (normalized)
T = 0.3094716406337747
f = 0.5118103448275861 (normalized)
T = 0.05582429735999039
f = 0.5535344827586206 (normalized)
T = 0.15001754334682865
f = 0.5554310344827587 (normalized)
T = 0.25973396739672333
f = 0.5573275862068965 (normalized)
T = 0.45604236991671576
f = 0.5611206896551724 (normalized)
T = 0.9817149851911747
f = 0.5639655172413793 (normalized)
T = 0.8551236019715359
f = 0.5677586206896551 (normalized)
T = 0.518940720205664
f = 0.5725 (normalized)
T = 0.3320993021398624
f = 0.5905172413793103 (normalized)
T = 0.3012870472167171
f = 0.5018534482758621 (normalized)
T = 0.9109875724140332
f = 0.5080172413793103 (normalized)
T = 0.2237415502535077
f = 0.5099137931034483 (normalized)
T = 0.11237979012833817
f = 0.5592241379310345 (normalized)
T = 0.7492217109874284
f = 0.5615948275862068 (normalized)
T = 0.9987021993424066
f = 0.5630172413793104 (normalized)
T = 0.9442424265129269
f = 0.5687068965517241 (normalized)
T = 0.46485055634161965
f = 0.570603448275862 (normalized)
T = 0.3850490579182775
f = 0.5606465517241379 (normalized)
T = 0.9451902220256936
f = 0.562543103448276 (normalized)
T = 0.9769576777297143
f = 0.5608836206896551 (normalized)
T = 0.9658115244742486
f = 0.49 (normalized)
T = 0.9971991048843037
f = 0.49379310344827587 (normalized)
T = 0.9920003583208664
f = 0.4975862068965517 (normalized)
T = 0.9793384472657545
f = 0.5013793103448275 (normalized)
T = 0.9998300471122671
f = 0.5051724137931034 (normalized)
T = 0.8216337811632767
f = 0.5089655172413793 (normalized)
T = 0.2976064440418464
f = 0.5127586206896552 (normalized)
T = 0.07435616247737478
f = 0.516551724137931 (normalized)
T = 0.021622046725915958
f = 0.5203448275862069 (normalized)
T = 0.008290733135485806
f = 0.5241379310344827 (normalized)
T = 0.004452095558933203
f = 0.5279310344827586 (normalized)
T = 0.0034135612893616643
f = 0.5317241379310345 (normalized)
T = 0.003536993108803652
f = 0.5355172413793103 (normalized)
T = 0.004492444950380377
f = 0.5393103448275862 (normalized)
T = 0.006428045451064928
f = 0.5431034482758621 (normalized)
T = 0.009850272637559422
f = 0.5468965517241379 (normalized)
T = 0.015801255855619166
f = 0.5506896551724138 (normalized)
T = 0.026390419456527606
f = 0.5544827586206896 (normalized)
T = 0.04611705992451231
f = 0.5582758620689655 (normalized)
T = 0.08528463267031602
f = 0.5620689655172414 (normalized)
T = 0.16901570766715365
f = 0.5658620689655172 (normalized)
T = 0.35636957203586545
f = 0.569655172413793 (normalized)
T = 0.7157531935571895
f = 0.5734482758620689 (normalized)
T = 0.9967176912498533
f = 0.5772413793103448 (normalized)
T = 0.8686923490892952
f = 0.5810344827586207 (normalized)
T = 0.6591193655030599
f = 0.5848275862068966 (normalized)
T = 0.5299400609278134
f = 0.5886206896551724 (normalized)
T = 0.4695791070738817
f = 0.5924137931034482 (normalized)
T = 0.45848678276959853
f = 0.5962068965517241 (normalized)
T = 0.4911288872262258
f = 0.6 (normalized)
T = 0.5738012872323945
f = 0.5032758620689655 (normalized)
T = 0.9718830075306422
f = 0.5070689655172413 (normalized)
T = 0.5480757608965087
f = 0.5108620689655172 (normalized)
T = 0.148458848422442
f = 0.5146551724137931 (normalized)
T = 0.038908279529557964
f = 0.518448275862069 (normalized)
T = 0.012880171192295224
f = 0.5601724137931035 (normalized)
T = 0.11896620362083939
f = 0.5677586206896551 (normalized)
T = 0.5160643890120815
f = 0.5753448275862069 (normalized)
T = 0.9683524041853008
f = 0.5791379310344827 (normalized)
T = 0.7561491544029062
f = 0.5829310344827586 (normalized)
T = 0.5842720182334015
f = 0.5867241379310345 (normalized)
T = 0.4927019359201997
f = 0.598103448275862 (normalized)
T = 0.5254820848297117
f = 0.5042241379310344 (normalized)
T = 0.9164337392552797
f = 0.5061206896551724 (normalized)
T = 0.69250704605586
f = 0.5099137931034483 (normalized)
T = 0.21096134526844124
f = 0.5118103448275861 (normalized)
T = 0.10466462194580761
f = 0.5137068965517242 (normalized)
T = 0.053423496464689676
f = 0.5611206896551724 (normalized)
T = 0.1414774327326054
f = 0.5639655172413793 (normalized)
T = 0.24419712049362752
f = 0.571551724137931 (normalized)
T = 0.9033177774259439
f = 0.5762931034482759 (normalized)
T = 0.9231767709055657
f = 0.5857758620689655 (normalized)
T = 0.50939083345143
f = 0.5023275862068965 (normalized)
T = 0.9956251907715058
f = 0.5046982758620688 (normalized)
T = 0.8740095748848018
f = 0.5080172413793103 (normalized)
T = 0.4113705457606329
f = 0.5113362068965517 (normalized)
T = 0.12457136129211097
f = 0.5630172413793104 (normalized)
T = 0.20278156878418632
f = 0.5668103448275861 (normalized)
T = 0.43000763770758554
f = 0.5725 (normalized)
T = 0.9657847297437955
f = 0.5743965517241378 (normalized)
T = 0.9957211553398281
f = 0.5037499999999999 (normalized)
T = 0.9488080392441336
f = 0.570603448275862 (normalized)
T = 0.8162907185815412
f = 0.5720258620689656 (normalized)
T = 0.9381955067723076
/builds/nannos/nannos.gitlab.io/nannos/examples/basic/plot_double_phc.py:124: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
plt.show()
```

**Total running time of the script:** ( 0 minutes 25.441 seconds)

**Estimated memory usage:** 9 MB