Skip to content

Commit

Permalink
Merge pull request #15 from lukasc-ubc/master
Browse files Browse the repository at this point in the history
Update from Master
  • Loading branch information
jaspreetj committed Mar 21, 2016
2 parents c1e04f9 + d9533b7 commit 0971c7e
Show file tree
Hide file tree
Showing 46 changed files with 14,843 additions and 29,714 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ docs/_build/

# PyBuilder
target/

*.ldf
Binary file modified Lumerical_EBeam_CML/ebeam_v1.2/ebeam_dc_halfring_straight_te1550.ice
100644 → 100755
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
gap=6e-08;
radius=3e-06;
gap=8e-08;
radius=5e-06;
wg_width=5e-07;
wg_thickness=2.2e-07;
setnamed("::model","gap",gap);
setnamed("::model","radius",radius);
setnamed("::model","si_thickness",wg_thickness);
setnamed("::model","wg_width",wg_width);
save("/Users/lukasc/Documents/ebeam_v1.2/fdtd/ebeam_dc_halfring_straight_te1550/ebeam_dc_halfring_straight_te1550_gap=60nm_radius=3um_width=500nm_thickness=220nm.fsp");ebeam_dc_halfring_straight_te1550_generate_s_parameters;exit;
save("/Users/lukasc/Documents/ebeam_v1.2/fdtd/ebeam_dc_halfring_straight_te1550/ebeam_dc_halfring_straight_te1550_gap=80nm_radius=5um_width=500nm_thickness=220nm.fsp");ebeam_dc_halfring_straight_te1550_generate_s_parameters;exit;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
# test passivity of S matrix
make_plot=0;
FREQ_PTS=101;
S_norm = matrix(1,FREQ_PTS);
S_err = S_norm;
for (ff=1:FREQ_PTS)
{
S=[S11(ff),S12(ff),S13(ff),S14(ff);
S21(ff),S22(ff),S23(ff),S24(ff);
S31(ff),S32(ff),S33(ff),S34(ff);
S41(ff),S42(ff),S43(ff),S44(ff)];

S_norm(ff) = norm(S);
S_err(ff) = max(abs( S-transpose(S)));
}

if (max(S_err) > 0.05){
? '******* Warning: S parameters violate reciprocity by more than 5% *********';
}

if (max(S_norm) > 1+1e-6){
? '******* Warning: S parameters not passive *********';
?max(S_norm);

? 'scaled S parameters to make passive';
scale_factor = 1/max(S_norm)*0.9999999;
scale_s_parameters;
}
else {
? '******* S paramters are passive ********';
}
if (make_plot==1 ){
plot(f, S_norm, 'Wavelength (um)', 'Norm |S|', 'g=' + num2str(gap*1e9) +'nm Lc=' + num2str(Lc*1e6) + ' um');
plot(c/f*1e6, S_err, 'Wavelength (um)', 'abs(S-transpose(S))', 'Reciprocity');
}




# prepare data and write

S11_data=[f,abs(S11),unwrap(angle(S11))];
write(sfile,"('port 1',"+mode_label+','+mode_ID+','+"'port 1',"+mode_ID+','+"'transmission')"
Expand Down Expand Up @@ -113,38 +153,4 @@ write(sfile,"('port 4',"+mode_label+','+mode_ID+','+"'port 4',"+mode_ID+','+"'tr
+num2str(length(f))
+",3)"
+endl+num2str(S44_data)
);

# test passivity of Smatrix
make_plot=0;
FREQ_PTS=101;
S_norm = matrix(1,FREQ_PTS);
S_err = S_norm;
for (ff=1:FREQ_PTS)
{
S=[S11(ff),S12(ff),S13(ff),S14(ff);
S21(ff),S22(ff),S23(ff),S24(ff);
S31(ff),S32(ff),S33(ff),S34(ff);
S41(ff),S42(ff),S43(ff),S44(ff)];

S_norm(ff) = norm(S);
S_err(ff) = max(abs( S-transpose(S)));
}

if (max(S_err) > 0.05){
? '******* Warning: S parameters violate reciprocity by more than 5% *********';
? max(S_err);
}
if (max(S_norm) > 1.00){
? '******* Warning: S parameters not passive *********';
?max(S_norm);
}
else {
if (max(S_norm) <1){
? '******* S parameters are passive ********';
}
}
if (make_plot==1 ){
plot(f, S_norm, 'Wavelength (um)', 'Norm |S|', 'g=' + num2str(gap*1e9) +'nm Lc=' + num2str(Lc*1e6) + ' um');
plot(c/f*1e6, S_err, 'Wavelength (um)', 'abs(S-transpose(S))', 'Reciprocity');
}
);
Loading

0 comments on commit 0971c7e

Please sign in to comment.