Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lucas Laplanche
EAM VCSEL
Commits
b0d6cd9a
Commit
b0d6cd9a
authored
Jun 02, 2021
by
Lucas Laplanche
Browse files
maj
parent
f66be4b1
Changes
6
Hide whitespace changes
Inline
Side-by-side
calculation.py
View file @
b0d6cd9a
import
numpy
as
np
from
scipy.interpolate
import
splrep
,
splev
from
tqdm
import
tqdm
import
epitaxy
as
epx
...
...
@@ -30,11 +31,12 @@ def al_doping(bypass_dbr=True):
def
reflectivity
(
vcsel_only
=
False
,
eam_only
=
True
,
bypass_dbr
=
Tru
e
,
bypass_dbr
=
Fals
e
,
start_wavelength
=
820e-9
,
stop_wavelength
=
880e-9
,
electric_field
=
0.
,
n_points
=
100
,
l_eam_clad
=
13e-9
,
l_vcsel_clad
=
32e-9
):
wavelength
=
np
.
linspace
(
start_wavelength
,
stop_wavelength
,
num
=
n_points
)
r
=
op
.
reflectivity
(
bypass_dbr
,
...
...
@@ -42,6 +44,7 @@ def reflectivity(vcsel_only=False,
wavelength
,
vcsel_only
=
vcsel_only
,
eam_only
=
eam_only
,
l_eam_clad
=
l_eam_clad
,
l_vcsel_clad
=
l_vcsel_clad
)
plt
.
plot_reflectivity
(
wavelength
,
r
)
...
...
@@ -56,7 +59,7 @@ def reflectivity_heatmap(bypass_dbr=True,
v_ga11
=
850
,
v_al5
=
900
,
v_al12
=
150
,
r_file_name
=
'
reflectivity_
heatmap'
):
r_file_name
=
'heatmap
_r
'
):
time
,
wavelength
,
r
=
epx
.
reflectivity_heatmap
(
bypass_dbr
=
bypass_dbr
,
start_wavelength
=
start_wavelength
,
stop_wavelength
=
stop_wavelength
,
...
...
@@ -68,15 +71,15 @@ def reflectivity_heatmap(bypass_dbr=True,
v_al5
=
v_al5
,
v_al12
=
v_al12
)
np
.
savez_compressed
(
r_file_name
,
r
)
np
.
savez_compressed
(
'time'
,
time
)
np
.
savez_compressed
(
'wavelength'
,
wavelength
)
np
.
savez_compressed
(
'
heatmap_
time'
,
time
)
np
.
savez_compressed
(
'
heatmap_
wavelength'
,
wavelength
)
plt
.
plot_reflectivity_heatmap
(
time
,
wavelength
,
r
)
def
electromagnetic_amplitude
(
bypass_dbr
=
Tru
e
,
electric_field
=
0.
,
wavelength
=
850e-9
):
sl
=
st
.
structure_eam_vcsel
(
eam_only
=
True
,
bypass_dbr
=
bypass_dbr
)
def
electromagnetic_amplitude
(
bypass_dbr
=
Fals
e
,
electric_field
=
0.
,
wavelength
=
850
.2
e-9
):
sl
=
st
.
structure_eam_vcsel
(
eam_only
=
False
,
vcsel_only
=
True
,
bypass_dbr
=
bypass_dbr
)
sl
=
op
.
algaas_super_lattice_refractive_index
(
sl
,
electric_field
,
wavelength
)
sl
=
pt
.
cut_in_equal_layers_thickness
(
sl
,
1e-9
)
em
=
op
.
em_amplitude_smm
(
sl
,
wavelength
)
...
...
@@ -84,6 +87,28 @@ def electromagnetic_amplitude(bypass_dbr=True, electric_field=0., wavelength=850
plt
.
plot_refra_em
(
sl
)
def
vcsel_electromagnetic_resonnance
(
electric_field
=
0.
,
start_wavelength
=
820e-9
,
stop_wavelength
=
880e-9
,
n_points
=
300
):
wavelength
=
np
.
linspace
(
start_wavelength
,
stop_wavelength
,
num
=
n_points
)
max_em_amp
=
np
.
zeros
(
n_points
)
for
i
in
tqdm
(
range
(
len
(
wavelength
))):
sl
=
st
.
structure_eam_vcsel
(
vcsel_only
=
True
)
sl
=
op
.
algaas_super_lattice_refractive_index
(
sl
,
electric_field
,
wavelength
[
i
],
lengyel
=
False
)
sl
[
'refractive_index'
]
=
sl
[
'refractive_index'
].
apply
(
np
.
real
).
astype
(
float
)
sl
=
pt
.
cut_in_equal_layers_thickness
(
sl
,
1e-8
)
em
=
op
.
em_amplitude_smm
(
sl
,
wavelength
[
i
],
normalize
=
False
)
max_em_amp
[
i
]
=
np
.
max
(
em
)
# normalize
max_em_amp
=
max_em_amp
/
np
.
max
(
max_em_amp
)
np
.
savez_compressed
(
'max_vcsel_em_amp_'
+
str
(
n_points
)
+
'_pts'
,
max_em_amp
)
plt
.
plot_xy
(
wavelength
,
max_em_amp
)
def
clad_coupling_electromagnetic_amplitude
(
bypass_dbr
=
False
,
electric_field
=
0.
,
wavelength
=
850e-9
):
sl1
=
st
.
structure_eam_vcsel
(
bypass_dbr
=
bypass_dbr
,
l_eam_clad
=
10e-9
,
amount_eam_qw
=
25
)
sl2
=
st
.
structure_eam_vcsel
(
bypass_dbr
=
bypass_dbr
,
l_eam_clad
=
10e-9
,
amount_eam_qw
=
25
)
...
...
macro.py
View file @
b0d6cd9a
...
...
@@ -7,8 +7,8 @@ def eams_heatmaps():
cl
.
reflectivity_heatmap
(
bypass_dbr
=
False
,
n_wavelength
=
1080
,
n_time
=
1920
,
r_file_name
=
'r_eam_1'
)
r_file_name
=
'
heatmap_
r_eam_1'
)
cl
.
reflectivity_heatmap
(
bypass_dbr
=
True
,
n_wavelength
=
1080
,
n_time
=
1920
,
r_file_name
=
'r_eam_2'
)
\ No newline at end of file
r_file_name
=
'heatmap_r_eam_2'
)
\ No newline at end of file
optic.py
View file @
b0d6cd9a
...
...
@@ -182,13 +182,14 @@ def reflectivity(bypass_dbr,
wavelength
,
vcsel_only
=
False
,
eam_only
=
True
,
l_eam_clad
=
13e-9
,
l_vcsel_clad
=
32e-9
):
r
=
np
.
zeros
(
len
(
wavelength
))
# wavelength in [m]
# wavelength must be a numpy array
for
i
in
tqdm
(
range
(
len
(
wavelength
))):
sl
=
st
.
structure_eam_vcsel
(
vcsel_only
=
vcsel_only
,
eam_only
=
eam_only
,
bypass_dbr
=
bypass_dbr
,
l_vcsel_clad
=
l_vcsel_clad
)
sl
=
st
.
structure_eam_vcsel
(
vcsel_only
=
vcsel_only
,
eam_only
=
eam_only
,
bypass_dbr
=
bypass_dbr
,
l_eam_clad
=
l_eam_clad
,
l_vcsel_clad
=
l_vcsel_clad
)
sl
=
algaas_super_lattice_refractive_index
(
sl
,
electric_field
,
wavelength
[
i
])
n
=
sl
[
'refractive_index'
].
to_numpy
(
dtype
=
np
.
complex128
)
...
...
@@ -497,7 +498,7 @@ def redheffer_star_product(sg, si):
return
s
def
em_amplitude_smm
(
super_lattice
,
wavelength
):
def
em_amplitude_smm
(
super_lattice
,
wavelength
,
normalize
=
True
):
# compute the amplitude of the electromagnetic field through the structure
# using scattering matrix method
# based on 'TMM using scattering matrices' by EMPossible
...
...
@@ -530,7 +531,7 @@ def em_amplitude_smm(super_lattice, wavelength):
# loop forward through layers
for
i
in
tqdm
(
range
(
n_layers
)
)
:
for
i
in
range
(
n_layers
):
# calculate parameters for layer i
k_zt_i
=
super_lattice
.
at
[
i
,
'refractive_index'
]
l
=
super_lattice
.
at
[
i
,
'thickness'
]
...
...
@@ -565,7 +566,7 @@ def em_amplitude_smm(super_lattice, wavelength):
# loop backward through layers
for
i
in
tqdm
(
range
(
n_layers
)
)
:
for
i
in
range
(
n_layers
):
# iterator from n to 0
di
=
n_layers
-
i
-
1
...
...
@@ -600,7 +601,8 @@ def em_amplitude_smm(super_lattice, wavelength):
# normalize
e
=
e
/
np
.
max
(
e
)
if
normalize
:
e
=
e
/
np
.
max
(
e
)
return
e
...
...
pandas_tools.py
View file @
b0d6cd9a
...
...
@@ -49,7 +49,7 @@ def insert_row(row_number, df, row_value):
def
cut_in_equal_layers_thickness
(
super_lattice
,
step
,
ignore_air
=
True
):
def
cut_in_equal_layers_thickness
(
super_lattice
,
step
,
ignore_air
=
True
,
progress_bar
=
False
):
if
ignore_air
:
i
=
0
else
:
...
...
@@ -61,8 +61,11 @@ def cut_in_equal_layers_thickness(super_lattice, step, ignore_air=True):
total
=
total
[:
-
1
]
# compute the total lenght to cut
total
=
total
.
sum
()
/
step
# set the progress bar total
pbar
=
tqdm
(
total
=
total
)
if
progress_bar
:
pbar
=
tqdm
(
total
=
total
)
while
i
<
(
super_lattice
.
shape
[
0
]
-
1
)
:
ini
=
i
...
...
@@ -95,8 +98,10 @@ def cut_in_equal_layers_thickness(super_lattice, step, ignore_air=True):
super_lattice
=
super_lattice
.
drop
(
super_lattice
.
index
[[
ini
]])
super_lattice
=
super_lattice
.
reset_index
(
drop
=
True
)
pbar
.
update
(
i
-
ini
)
pbar
.
close
()
if
progress_bar
:
pbar
.
update
(
i
-
ini
)
if
progress_bar
:
pbar
.
close
()
return
super_lattice
...
...
plot.py
View file @
b0d6cd9a
...
...
@@ -17,6 +17,49 @@ pio.renderers.default = 'browser'
def
plot_xy
(
x
,
y
):
# create a figure
fig
=
go
.
Figure
()
# add the traces
fig
.
add_trace
(
go
.
Scatter
(
x
=
x
,
y
=
y
,
name
=
'curve'
))
# create axis objects
fig
.
update_layout
(
xaxis
=
dict
(
title
=
'x'
),
yaxis
=
dict
(
title
=
'y'
,
titlefont
=
dict
(
color
=
'#1f77b4'
),
tickfont
=
dict
(
color
=
'#1f77b4'
)
)
)
# update layout properties
fig
.
update_layout
(
title_text
=
'y as a function of x'
,
width
=
1600
,
)
# show the figure
fig
.
show
()
def
plot_refra_doping
(
sl
):
# remove the substrate layer
sl
=
sl
.
drop
(
sl
.
shape
[
0
]
-
1
,
axis
=
0
)
...
...
super_lattice_structure.py
View file @
b0d6cd9a
...
...
@@ -130,7 +130,8 @@ def structure_eam_vcsel(vcsel_only = False,
# eam mqw
if
eam_mqw
:
mqw
=
structure_mqw
(
amount_qw
=
amount_eam_qw
,
mqw
=
structure_mqw
(
name
=
'eam'
,
amount_qw
=
amount_eam_qw
,
mean_al
=
eam_mean_al
,
l_qw
=
l_eam_qw
,
l_cb
=
l_eam_cb
,
...
...
@@ -181,6 +182,7 @@ def structure_eam_vcsel(vcsel_only = False,
# middle contact
if
middle_contact
&
(
not
bypass_dbr
):
middle_contact
,
previous_layer_is_dbr
=
structure_middle_contact
(
bypass_dbr
=
bypass_dbr
,
vcsel_only
=
vcsel_only
,
grading_type
=
grading_type
,
grading_width
=
grading_width
,
grading_period
=
grading_period
)
...
...
@@ -219,7 +221,8 @@ def structure_eam_vcsel(vcsel_only = False,
v_ga11
=
v_ga11
,
v_al5
=
v_al5
)
linear_grading_high_to_low_al
=
linear_grading_low_to_high_al
[::
-
1
].
copy
()
mqw
=
structure_mqw
(
amount_qw
=
amount_vcsel_qw
,
mqw
=
structure_mqw
(
name
=
'vcsel'
,
amount_qw
=
amount_vcsel_qw
,
mean_al
=
vcsel_mean_al
,
l_qw
=
l_vcsel_qw
,
l_cb
=
l_vcsel_cb
,
...
...
@@ -260,7 +263,8 @@ def structure_eam_vcsel(vcsel_only = False,
def
structure_mqw
(
amount_qw
=
3
,
def
structure_mqw
(
name
=
'vcsel'
,
amount_qw
=
3
,
mean_al
=
0.3
,
l_clad
=
15e-9
,
l_cb
=
10e-9
,
...
...
@@ -279,20 +283,20 @@ def structure_mqw(amount_qw = 3,
# cladding
clad
=
structure_standard_digital_alloy_15_60_hlh
(
l_clad
,
mean_al
=
mean_al
,
layer_name
=
'
cladding'
,
layer_name
=
name
+
'
cladding'
,
v_ga6
=
v_ga6
,
v_ga11
=
v_ga11
,
v_al12
=
v_al12
)
# confinement barrier
cb
=
structure_standard_digital_alloy_15_60_hlh
(
l_cb
,
mean_al
=
mean_al
,
layer_name
=
'
confinement barrier'
,
layer_name
=
name
+
'
confinement barrier'
,
v_ga6
=
v_ga6
,
v_ga11
=
v_ga11
,
v_al12
=
v_al12
)
# quantum well
l_qw
=
true_epitaxy_thickness
(
l_qw
,
v_ga6
,
ga6
=
True
)
quantum_well
=
pd
.
DataFrame
([[
'
quantum well'
,
l_qw
,
0.
,
0.
,
0.
,
True
,
False
,
False
,
False
]],
quantum_well
=
pd
.
DataFrame
([[
name
+
'
quantum well'
,
l_qw
,
0.
,
0.
,
0.
,
True
,
False
,
False
,
False
]],
columns
=
[
'name'
,
'thickness'
,
'al'
,
'na'
,
'nd'
,
'ga6'
,
'ga11'
,
'al5'
,
'al12'
])
...
...
@@ -494,6 +498,7 @@ def structure_linear_grading(grading_width = 20e-9,
def
structure_middle_contact
(
bypass_dbr
=
False
,
vcsel_only
=
False
,
grading_type
=
'linear'
,
grading_width
=
20e-9
,
grading_period
=
10
,
...
...
@@ -540,7 +545,7 @@ def structure_middle_contact(bypass_dbr = False,
if
grading_type
==
'linear'
:
sl
=
sl
.
append
(
linear_grading_high_to_low_al
,
ignore_index
=
True
)
sl
=
sl
.
append
(
pd
.
DataFrame
([[
'middle contact'
,
l_low_al
-
grading_width
,
low_al
,
5e18
,
0.
,
False
,
True
,
False
,
True
]],
sl
=
sl
.
append
(
pd
.
DataFrame
([[
'middle contact'
,
l_low_al
-
grading_width
*
3
/
4
,
low_al
,
5e18
,
0.
,
False
,
True
,
False
,
True
]],
columns
=
[
'name'
,
'thickness'
,
'al'
,
'na'
,
'nd'
,
'ga6'
,
'ga11'
,
'al5'
,
'al12'
]),
ignore_index
=
True
)
...
...
@@ -552,9 +557,15 @@ def structure_middle_contact(bypass_dbr = False,
# normal contact
else
:
if
grading_type
==
'linear'
:
sl
=
sl
.
append
(
pd
.
DataFrame
([[
'middle contact'
,
l_low_al
-
grading_width
,
low_al
,
5e18
,
0.
,
False
,
True
,
False
,
True
]],
columns
=
[
'name'
,
'thickness'
,
'al'
,
'na'
,
'nd'
,
'ga6'
,
'ga11'
,
'al5'
,
'al12'
]),
ignore_index
=
True
)
if
vcsel_only
:
sl
=
sl
.
append
(
linear_grading_high_to_low_al
[
9
:
19
],
ignore_index
=
True
)
sl
=
sl
.
append
(
pd
.
DataFrame
([[
'middle contact'
,
l_low_al
-
grading_width
,
low_al
,
5e18
,
0.
,
False
,
True
,
False
,
True
]],
columns
=
[
'name'
,
'thickness'
,
'al'
,
'na'
,
'nd'
,
'ga6'
,
'ga11'
,
'al5'
,
'al12'
]),
ignore_index
=
True
)
else
:
sl
=
sl
.
append
(
pd
.
DataFrame
([[
'middle contact'
,
l_low_al
-
grading_width
,
low_al
,
5e18
,
0.
,
False
,
True
,
False
,
True
]],
columns
=
[
'name'
,
'thickness'
,
'al'
,
'na'
,
'nd'
,
'ga6'
,
'ga11'
,
'al5'
,
'al12'
]),
ignore_index
=
True
)
else
:
sl
=
sl
.
append
(
pd
.
DataFrame
([[
'middle contact'
,
l_low_al
,
low_al
,
5e18
,
0.
,
False
,
True
,
False
,
True
]],
columns
=
[
'name'
,
'thickness'
,
'al'
,
'na'
,
'nd'
,
'ga6'
,
'ga11'
,
'al5'
,
'al12'
]),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment