-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdef_GaAs_WG_AR8.m
51 lines (40 loc) · 1.33 KB
/
def_GaAs_WG_AR8.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
%% Define Lumerical construction script for structure
% Michael Nickerson 2021-07-05
%
% Creates script by merging:
% templateHeader
% structScript
% epiScript
% instScript
% templateFooter
%
clear; %close('all');
%% Definitions
% Common components
lsfDir = "../lsf/";
templateHeader = lsfDir + "10_header_template.lsf";
templateFooter = lsfDir + "90_footer.lsf";
% Define naming
epiType = "GaAs";
epiName = "AR8";
componentName = "WG";
% Epitaxial components
mqwScript = lsfDir + "25_epi_" + epiType + "_MQW.lsf";
epiScript = lsfDir + "30_epi_" + epiType + "_" + epiName + ".lsf";
% Structure and instrumentation (sources, monitors) definition
etchScript = lsfDir + "20_etch_" + epiType + "_" + componentName + ".lsf";
instScript = lsfDir + "40_inst_" + epiType + ".lsf";
% Script naming
scriptName = epiType + "_" + epiName + "_" + componentName;
% Default variable alterations, if any
setVars = {"sim2D", 1, "Vpad", 0};
%% Process
% Assemble script
script = string(fileread(templateHeader)) + "\n\n";
script = script + string(fileread(etchScript)) + "\n\n";
script = script + string(fileread(mqwScript)) + "\n\n";
script = script + string(fileread(epiScript)) + "\n\n";
script = script + string(fileread(instScript)) + "\n\n";
script = script + string(fileread(templateFooter));
%% Clean up
clearvars -except script scriptName setVars