diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-04-13 01:43:19 -0400 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-04-13 01:43:19 -0400 |
commit | 3fe04c1c780cd7e6eb75c280b8eb1987f236eabe (patch) | |
tree | 94cc5f86c0cd4b3945255f9b2cd1e4b20537be8a /propagation.m | |
parent | a93b2d7b612ad0a14e951173dc5bf829300aae9c (diff) | |
download | mode_match-3fe04c1c780cd7e6eb75c280b8eb1987f236eabe.tar.gz mode_match-3fe04c1c780cd7e6eb75c280b8eb1987f236eabe.zip |
simplified solution check
Ignore-this: 7bbc65e6e71276097594fdd540848fa1
darcs-hash:20110413054319-067c0-65e349a4e3c60e0478f8831717ff8871c86e69ce
Diffstat (limited to 'propagation.m')
-rw-r--r-- | propagation.m | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/propagation.m b/propagation.m index 93f9e81..b72cae5 100644 --- a/propagation.m +++ b/propagation.m @@ -20,56 +20,35 @@ source("answ.txt") q0=waste_r2q(w0,r0,lambda); optics={lns1,lns2,lns3}; -optics_forward=optics; x=0:.001:Ltot; -printf("=================================\n") -q1=prop(x,q0,optics); -printf("=================================\n") +printf("======== Forward propagation ======\n") +q1=prop(x,q0,0,optics); w1=q2waste(q1, lambda); r1=q2radius(q1,lambda); -printf("=================================\n") -#q1b=prop(Ltot,q0,optics) -#wb=q2waste(q1b, lambda) -#rb=-q2radius(q1b,lambda) -#because of back propogation +printf("======== Backward propagation ===\n") +%because of back propagation rf=-rf; q1b=waste_r2q(wf,rf,lambda); -lns1.x=Ltot-lns1.x; -lns2.x=Ltot-lns2.x; -lns3.x=Ltot-lns3.x; -optics={lns3,lns2,lns1}; -q2b=prop(x,q1b,optics); +q2b=prop(x,q1b,Ltot,optics); printf("=================================\n") wb=q2waste(q2b, lambda); rb=q2radius(q2b,lambda); -xb=Ltot-x; -#plot (x,w1, "1") -plot (x,w1, "1;forward propagation;", xb, wb, "2;backward propagation;", - x,-w1, "1;;", xb, -wb, "2;;") -%gset term postscript; -%gset output "waist_profile.ps" -%replot -%gset term png; -%gset output "waist_profile.png" -%replot -%gset term gif; -%gset output "waist_profile.gif" -%replot +plot (x,w1, "1;forward propagation;", x, wb, "2;backward propagation;", + x,-w1, "1;;", x, -wb, "2;;") printf("=================================\n") printf("======= final check =============\n") -printf("======= after propogatin ========\n") +printf("======= after propagation ========\n") printf("following are theoretical values: \n") w0 r0 wf rf q0=waste_r2q(w0,r0,lambda); -optics=list(lns1,lns2,lns3); -qtf=prop(Ltot, q0, optics_forward); +qtf=prop(Ltot, q0,0, optics); printf("values below should match 'wf' and 'rf': \n") waste = q2waste(qtf, lambda) radius = q2radius(qtf,lambda) |