Here is to show how the thickness of air layers changes the photonic bands of the stack. And I believe that, ultimately, the photonic band structure is what controls our focusing ability.
The following are 6 stack samples with no thickness variation in either type of layers. This is to show the bands more clearly. When there's significant variation, periodic structures are expected to follow these bands.
The air gap thicknesses for the following 6 stacks are respectively: 100, 50, 25, 10, 1, 0.1 micron, with the last one close to what you have (0.14 micron). All other parameters are the same as yours.
In [7]:
from stack import *
N = 60;
L = 100.0e3; dL=0.0*L;
L1= 100.0e3; dL1=0.000*L1;
n0= 1.0; n1=1.5
stacks = map(lambda q:random_stack(N,n0,n1,dL,L,dL1=dL1,L1=q*L1),[1.0,0.5,0.25,0.1,0.01,0.001])
def costum_plot(s):
pyplot.figure(figsize=(18,5))
s.plot()
output = map(costum_plot,stacks)
Now I'm scanning the transmission spectram around 800nm like you did).
As you can see below (where air gap = 100, 50, 25 microns), the periodicity wavelength is really where we have exactly repeated structure (in the first case, it is the set of one big bump followed by three thinner ones). So what's most important is that each fully periodic structure has several sub-passband.
And when we decrease the air gap thickness, such periodicity length of courses increases.
</font>
In [8]:
wlrange = [750.0,850.0]
#wlrange = [400.0,405.0]
Nmodes = 2000
dw = (wlrange[1]-wlrange[0])/float(Nmodes)
#print 1.0/dw,"data points per nm"
#print dw,"nm per data point"
In [9]:
specs = map(lambda s:s.scan('transmission',[800.0,830.0],Nmodes,style='-'),stacks[0:3])
Now when the air gaps are even smaller (10, 1, 0.1 microns), the periodicity length gets really large (not even shown in the range of the scan in the 1-micron and 0.1-micron cases).
Meanwhile, what's more important, is that the number of sub-passbands is increasing. And eventually, they become really periodic themselves. In the case when air gap is below 1 micron, we can clearly see the sub-passbands getting very periodic, at around 2nm periodic length, like you discovered.
I believe this explains my problem exactly (plots are at the bottom): With my choice of 300 micron air gaps, I estimate my periodicity length is over 5nm. But what I missed is that there are in fact a couple of sub-passbands within this fully periodic range! That's why I lose focusing ability when I get close to 1nm resolution (which is more than half the smallest sub-passband).
</font>So I belive the conclusion is really this: we have control/focus ability as long as our shaping resolution is well within the width of the smallest passbands (as opposed to the exact periodicity length).
</font>
In [10]:
specs = map(lambda s:s.scan('transmission',[750.0,850.0],Nmodes,style='-'),stacks[3:6])
Below is the case when I used 300 micron air gaps. You can see the "true periodicity length" encompasses 3 sub-passbands, and the smallest passbands are ~2.5nm.
In [3]:
from stack import *
N = 200;
L = 100.0e3; dL=0.0*L;
L1= 300.0e3; dL1=0.000*L1;
n0= 1.0; n1=1.35
stack = random_stack(N,n0,n1,dL,L,dL1=dL1,L1=L1)
pyplot.figure(figsize=(18,5))
stack.plot()
spec = stack.scan('transmission',[1605.0,1635.0],1000,style='-')
In [4]:
"""
def multiplot(corrs):
for corr in corrs:
pyplot.figure(figsize=(18,5))
pyplot.xlabel('wavelength displaced (nm)',fontsize=20)
pyplot.plot(np.arange(len(corr))*dw,abs(corr),'-')
#pyplot.plot(corr,'-o')
pyplot.show()
corrs = map(lambda s:autocorrelate(abs(s[:,1])**2,100),specs)
#avg_corr = reduce(lambda x,y:x+y,corrs)
#multiplot([avg_corr])
multiplot(corrs)
"""
Out[4]:
In [33]:
"""
fs = map(lambda c:abs(np.fft.rfft(c)),corrs)
for f in fs:
pyplot.figure(figsize=(18,5))
#pyplot.axis([2,20,0,1000])
pyplot.plot(f[1:200],'-o');pyplot.show()
"""
Out[33]: