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
3af6ff04
Commit
3af6ff04
authored
May 28, 2021
by
Lucas Laplanche
Browse files
correction de l'impossibilité de calculer le dernier temps des cartes de chaleur
parent
65484b71
Changes
4
Hide whitespace changes
Inline
Side-by-side
calculation.py
View file @
3af6ff04
...
@@ -2,6 +2,7 @@ import numpy as np
...
@@ -2,6 +2,7 @@ import numpy as np
from
scipy.interpolate
import
splrep
,
splev
from
scipy.interpolate
import
splrep
,
splev
import
epitaxy
as
epx
import
oes
as
oe
import
oes
as
oe
import
optic
as
op
import
optic
as
op
import
pandas_tools
as
pt
import
pandas_tools
as
pt
...
@@ -33,6 +34,33 @@ def reflectivity(bypass_dbr=True, start_wavelength=820e-9, stop_wavelength=880e-
...
@@ -33,6 +34,33 @@ def reflectivity(bypass_dbr=True, start_wavelength=820e-9, stop_wavelength=880e-
plt
.
plot_reflectivity
(
wavelength
,
r
)
plt
.
plot_reflectivity
(
wavelength
,
r
)
def
reflectivity_heatmap
(
bypass_dbr
=
True
,
start_wavelength
=
700e-9
,
stop_wavelength
=
1000e-9
,
electric_field
=
0.
,
n_wavelength
=
90
,
n_time
=
160
,
v_ga6
=
100
,
v_ga11
=
850
,
v_al5
=
900
,
v_al12
=
150
,
r_file_name
=
'default_name'
):
time
,
wavelength
,
r
=
epx
.
reflectivity_heatmap
(
bypass_dbr
=
bypass_dbr
,
start_wavelength
=
start_wavelength
,
stop_wavelength
=
stop_wavelength
,
electric_field
=
electric_field
,
n_wavelength
=
n_wavelength
,
n_time
=
n_time
,
v_ga6
=
v_ga6
,
v_ga11
=
v_ga11
,
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
)
plt
.
plot_reflectivity_heatmap
(
time
,
wavelength
,
r
)
def
electromagnetic_amplitude
(
bypass_dbr
=
True
,
electric_field
=
0.
,
wavelength
=
850e-9
):
def
electromagnetic_amplitude
(
bypass_dbr
=
True
,
electric_field
=
0.
,
wavelength
=
850e-9
):
...
...
epitaxy.py
View file @
3af6ff04
...
@@ -239,8 +239,8 @@ def reflectivity_heatmap(bypass_dbr=True,
...
@@ -239,8 +239,8 @@ def reflectivity_heatmap(bypass_dbr=True,
start_wavelength
=
700e-9
,
start_wavelength
=
700e-9
,
stop_wavelength
=
1000e-9
,
stop_wavelength
=
1000e-9
,
electric_field
=
0.
,
electric_field
=
0.
,
n_wavelength
=
200
,
n_wavelength
=
9
,
n_time
=
6
00
,
n_time
=
1
6
,
v_ga6
=
100
,
v_ga6
=
100
,
v_ga11
=
850
,
v_ga11
=
850
,
v_al5
=
900
,
v_al5
=
900
,
...
@@ -281,15 +281,15 @@ def reflectivity_heatmap(bypass_dbr=True,
...
@@ -281,15 +281,15 @@ def reflectivity_heatmap(bypass_dbr=True,
# wavelength in [m]
# wavelength in [m]
# wavelength must be a numpy array
# wavelength must be a numpy array
for
j
in
range
(
len
(
wavelength
)):
for
j
in
range
(
len
(
wavelength
)):
sl_
i
=
op
.
algaas_super_lattice_refractive_index
(
sl_i
,
electric_field
,
wavelength
[
j
],
lengyel
=
False
)
sl_
j
=
op
.
algaas_super_lattice_refractive_index
(
sl_i
,
electric_field
,
wavelength
[
j
],
lengyel
=
False
)
n
=
sl_
i
[
'refractive_index'
].
to_numpy
(
dtype
=
np
.
complex128
)
n
=
sl_
j
[
'refractive_index'
].
to_numpy
(
dtype
=
np
.
complex128
)
d
=
sl_
i
[
'thickness'
].
to_numpy
(
dtype
=
np
.
complex128
)
d
=
sl_
j
[
'thickness'
].
to_numpy
(
dtype
=
np
.
complex128
)
r
[
j
,
i
]
=
op
.
reflection
(
n
,
d
,
wavelength
[
j
])
r
[
j
,
i
]
=
op
.
reflection
(
n
,
d
,
wavelength
[
j
])
plt
.
plot_reflectivity_heatmap
(
time
,
wavelength
,
r
)
return
time
,
wavelength
,
r
...
...
macro.py
0 → 100755
View file @
3af6ff04
import
calculation
as
cl
def
eams_heatmaps
():
cl
.
reflectivity_heatmap
(
bypass_dbr
=
False
,
n_wavelength
=
1080
,
n_time
=
1920
,
r_file_name
=
'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
pandas_tools.py
View file @
3af6ff04
...
@@ -106,7 +106,11 @@ def cut_sl_at_time(sl, time):
...
@@ -106,7 +106,11 @@ def cut_sl_at_time(sl, time):
idx
-=
1
idx
-=
1
# calculate its modified thickness
# calculate its modified thickness
ratio
=
(
time
-
sl
.
at
[
idx
,
'start_time'
])
/
(
sl
.
at
[
idx
,
'stop_time'
]
-
sl
.
at
[
idx
,
'start_time'
])
if
idx
>
0
:
ratio
=
(
time
-
sl
.
at
[
idx
,
'start_time'
])
/
(
sl
.
at
[
idx
,
'stop_time'
]
-
sl
.
at
[
idx
,
'start_time'
])
# air case
else
:
ratio
=
1.
corrected_thickness
=
ratio
*
sl
.
at
[
idx
,
'thickness'
]
corrected_thickness
=
ratio
*
sl
.
at
[
idx
,
'thickness'
]
# copy and remove the unneeded
# copy and remove the unneeded
...
...
Write
Preview
Supports
Markdown
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