From d633bca9a5fe49e2f425e22f0c226eb4d32db5c7 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Wed, 13 Apr 2011 11:12:02 -0400 Subject: file moved to a file with better speaking name Ignore-this: f77118ebffdf32fd8f1c7782d533c9bb darcs-hash:20110413151202-067c0-e58409629c4a58cdbcf108c44014f53956f61124 --- propagation.m | 56 ------------------------------------------------ solution_visualization.m | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 56 deletions(-) delete mode 100644 propagation.m create mode 100644 solution_visualization.m diff --git a/propagation.m b/propagation.m deleted file mode 100644 index 15d52c2..0000000 --- a/propagation.m +++ /dev/null @@ -1,56 +0,0 @@ - -source('abcd.m') - - -% ######################################### -% an example of 'answ.txt' file -% lambda= 1.064E-6 ; -% Ltot= 1 ; -% r0= 1.0E+100 ; -% w0= 25.63e-6; -% lns1.abcd=abcd_lens( 0.25 ) ; -% lns1.x= 0.37680270021479 ; -% lns2.abcd=abcd_lens( 0.1 ) ; -% lns2.x= 0.90277021575519 ; -% rf=1e100; -% wf=25.630e-6; -% ######################################### -source('answ.txt') - - -q0=waste_r2q(w0,r0,lambda); -optics={lns1,lns2,lns3}; - -x=0:.001:Ltot; -printf('======== Forward propagation ======\n') -q1=gbeam_propagation(x,q0,0,optics); -w1=q2waste(q1, lambda); -r1=q2radius(q1,lambda); - -printf('======== Backward propagation ===\n') -%because of back propagation -rf=-rf; -q1b=waste_r2q(wf,rf,lambda); - -q2b=gbeam_propagation(x,q1b,Ltot,optics); -printf('=================================\n') -wb=q2waste(q2b, lambda); -rb=q2radius(q2b,lambda); -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 propagation ========\n') -printf('following are theoretical values: \n') -w0 -r0 -wf -rf -q0=waste_r2q(w0,r0,lambda); -qtf=gbeam_propagation(Ltot, q0,0, optics); -printf('values below should match wf and rf: \n') -waste = q2waste(qtf, lambda) -radius = q2radius(qtf,lambda) - - diff --git a/solution_visualization.m b/solution_visualization.m new file mode 100644 index 0000000..15d52c2 --- /dev/null +++ b/solution_visualization.m @@ -0,0 +1,56 @@ + +source('abcd.m') + + +% ######################################### +% an example of 'answ.txt' file +% lambda= 1.064E-6 ; +% Ltot= 1 ; +% r0= 1.0E+100 ; +% w0= 25.63e-6; +% lns1.abcd=abcd_lens( 0.25 ) ; +% lns1.x= 0.37680270021479 ; +% lns2.abcd=abcd_lens( 0.1 ) ; +% lns2.x= 0.90277021575519 ; +% rf=1e100; +% wf=25.630e-6; +% ######################################### +source('answ.txt') + + +q0=waste_r2q(w0,r0,lambda); +optics={lns1,lns2,lns3}; + +x=0:.001:Ltot; +printf('======== Forward propagation ======\n') +q1=gbeam_propagation(x,q0,0,optics); +w1=q2waste(q1, lambda); +r1=q2radius(q1,lambda); + +printf('======== Backward propagation ===\n') +%because of back propagation +rf=-rf; +q1b=waste_r2q(wf,rf,lambda); + +q2b=gbeam_propagation(x,q1b,Ltot,optics); +printf('=================================\n') +wb=q2waste(q2b, lambda); +rb=q2radius(q2b,lambda); +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 propagation ========\n') +printf('following are theoretical values: \n') +w0 +r0 +wf +rf +q0=waste_r2q(w0,r0,lambda); +qtf=gbeam_propagation(Ltot, q0,0, optics); +printf('values below should match wf and rf: \n') +waste = q2waste(qtf, lambda) +radius = q2radius(qtf,lambda) + + -- cgit v1.2.3