diff --git a/kat_test/debug/bs_sep_100k_trace_32.kat b/kat_test/debug/bs_sep_100k_trace_32.kat
index 273ad0d3c2b7ed68b7d9f7b88090b97a637fccbc..5053aa7a579b9240ae4f26ada7702f2cde5b5532 100644
--- a/kat_test/debug/bs_sep_100k_trace_32.kat
+++ b/kat_test/debug/bs_sep_100k_trace_32.kat
@@ -1,122 +1,122 @@
- 
-l i1 1.7 0 nMU3in
-
-gauss beam_in i1 nMU3in 268u -550m 
-
-mod  eom3 $fPR 0.126433 2 pm 0 nMU3in nMU3_1    # PR control
-mod  eom4 $fSR 0.199417 2 pm 0 nMU3_1 nMU3_2     # Schnupp1 (SR control)
-mod  eom5 $fMI 0.1225 2 pm 0 nMU3_2 nMU3_3     # Schnupp2 (MI control)
-
-lens lpr 1.8 nMU3_3 nMU3_4
-# some rather arbitrary thermal lense for the isolators and the EOMs:
-lens therm 5.2 nMU3_4 nMU3_5
-isol d2 120 nMU3_5 nMU3out               	# Faraday Isolator
-
-# 070502 corrected length with respect to OptoCad (Roland Schilling)
-s    smcpr3 4.391 nMU3out nBDIPR1  
-bs*  BDIPR 50 30 0 45 nBDIPR1 nBDIPR2 dump dump
-
-s    smcpr4 0.11 nBDIPR2 nMPRo
-
-
-##------------------------------------------------------------ 
-## main interferometer ##
-
-m    mPRo 0 1 0 nMPRo nMPRi
-attr mPRo Rc -1.85842517051051 # Rc as used in OptoCad (layout_1.41.ocd)
-s    smpr 0.075 1.44963 nMPRi nPRo
-# second (inner) surface of MPR
-m   MPR 0.99905 0.0009 0. nPRo nPRi       	# T= 900 ppm PR
-
-s    swest 1.146 nPRi nBSwest		# new length with T_PR=900 ppm
-
-
-
-## BS
-##
-##                              
-##                       nBSnorth     ,'-.
-##                             |     +    `. 
-##                             |   ,'       :'
-##            nBSwest          |  +i1      +
-##         ---------------->    ,:._  i2 ,'
-##                             + \  `-. +       nBSeast
-##                           ,' i3\   ,' ---------------
-##                          +      \ +
-##                        ,'     i4.'
-##                       `._      ..
-##                          `._ ,' |nBSsouth
-##                             -   |
-##                                 |
-##                                 |
-
-
-bs   BS 0.4859975 0.5139975 0.0 42.834 nBSwest nBSnorth nBSi1 nBSi3
-s    sBS1a 0.041 1.44963 nBSi1 nBSi1b
-# here thermal lense of beam splitter (Roland: f about 1000m for 10kW at BS)
-lens bst 100k nBSi1b nBSi1c
-s    sBS1 0.051 1.44963 nBSi1c nBSi2
-s    sBS2 0.091 1.44963 nBSi3 nBSi4
-bs   BS2 150u 0.99982 0 -27.9694 nBSi2 dump nBSeast nBSAR  
-bs   BS3 150u 0.99982 0 -27.9694 nBSi4 dump nBSsouth dump	
-
-## north arm
-s snorth1 598.5682 nBSnorth nMFN1
-bs* MFN 150 10 0.0 0.0 nMFN1 nMFN2 dump dump
-attr MFN Rc 666
-#attr MFN ybeta 0.00000002
-#attr MFN xbeta 0.00000003
-
-s snorth2 597.0158 nMFN2 nMCN1
-m* MCN 150 10 -0.0 nMCN1 dump
-attr MCN Rc 636
-attr MCN xbeta -0.00000004
-attr MCN ybeta -0.000000015
-
-## east arm
-s seast1 598.4497 nBSeast nMFE1
-bs* MFE 150 10 0.0 0.0 nMFE1 nMFE2 dump dump
-attr MFE Rcx 664	# 71 W
-attr MFE Rcy 660	# 71 W
-
-s seast2 597.0713 nMFE2 nMCE1
-m* MCE 150 10 0.0 nMCE1 dump  
-attr MCE Rc 622
-#attr MCE xbeta 0.0000001
-
-
-## south arm
-s ssouth 1.115 nBSsouth nMSRi
-beam b1 nMSRi		# detecting the beam behind the space
-#beam b1 nBSsouth
-
-
-
-##------------------------------------------------------------ 
-## commands
-maxtem 8
-#time
-#trace 8
-phase 3
-# PR cavity (north arm)
-cav prc1 MPR nPRi MCN nMCN1 
-# PR cavity (east arm)
-cav prc2 MPR nPRi MCE nMCE1 
- 
-
-##------------------------------------------------------------ 
-
-#pause
-
-const fSR   9012589
-const fMI   14.904875M
-const fPR  37.16M	
-
-
-xaxis  b1 x lin -2.5 2.5 10
-x2axis b1 y lin -2.5 2.5 10
-
-trace 32
-
-gnuterm no
-
+ 
+l i1 1.7 0 nMU3in
+
+gauss beam_in i1 nMU3in 268u -550m 
+
+mod  eom3 $fPR 0.126433 2 pm 0 nMU3in nMU3_1    # PR control
+mod  eom4 $fSR 0.199417 2 pm 0 nMU3_1 nMU3_2     # Schnupp1 (SR control)
+mod  eom5 $fMI 0.1225 2 pm 0 nMU3_2 nMU3_3     # Schnupp2 (MI control)
+
+lens lpr 1.8 nMU3_3 nMU3_4
+# some rather arbitrary thermal lense for the isolators and the EOMs:
+lens therm 5.2 nMU3_4 nMU3_5
+isol d2 120 nMU3_5 nMU3out               	# Faraday Isolator
+
+# 070502 corrected length with respect to OptoCad (Roland Schilling)
+s    smcpr3 4.391 nMU3out nBDIPR1  
+bs*  BDIPR 50 30 0 45 nBDIPR1 nBDIPR2 dump dump
+
+s    smcpr4 0.11 nBDIPR2 nMPRo
+
+
+##------------------------------------------------------------ 
+## main interferometer ##
+
+m    mPRo 0 1 0 nMPRo nMPRi
+attr mPRo Rc -1.85842517051051 # Rc as used in OptoCad (layout_1.41.ocd)
+s    smpr 0.075 1.44963 nMPRi nPRo
+# second (inner) surface of MPR
+m   MPR 0.99905 0.0009 0. nPRo nPRi       	# T= 900 ppm PR
+
+s    swest 1.146 nPRi nBSwest		# new length with T_PR=900 ppm
+
+
+
+## BS
+##
+##                              
+##                       nBSnorth     ,'-.
+##                             |     +    `. 
+##                             |   ,'       :'
+##            nBSwest          |  +i1      +
+##         ---------------->    ,:._  i2 ,'
+##                             + \  `-. +       nBSeast
+##                           ,' i3\   ,' ---------------
+##                          +      \ +
+##                        ,'     i4.'
+##                       `._      ..
+##                          `._ ,' |nBSsouth
+##                             -   |
+##                                 |
+##                                 |
+
+
+bs   BS 0.4859975 0.5139975 0.0 42.834 nBSwest nBSnorth nBSi1 nBSi3
+s    sBS1a 0.041 1.44963 nBSi1 nBSi1b
+# here thermal lense of beam splitter (Roland: f about 1000m for 10kW at BS)
+lens bst 100k nBSi1b nBSi1c
+s    sBS1 0.051 1.44963 nBSi1c nBSi2
+s    sBS2 0.091 1.44963 nBSi3 nBSi4
+bs   BS2 150u 0.99982 0 -27.9694 nBSi2 dump nBSeast nBSAR  
+bs   BS3 150u 0.99982 0 -27.9694 nBSi4 dump nBSsouth dump	
+
+## north arm
+s snorth1 598.5682 nBSnorth nMFN1
+bs* MFN 150 10 0.0 0.0 nMFN1 nMFN2 dump dump
+attr MFN Rc 666
+#attr MFN ybeta 0.00000002
+#attr MFN xbeta 0.00000003
+
+s snorth2 597.0158 nMFN2 nMCN1
+m* MCN 150 10 -0.0 nMCN1 dump
+attr MCN Rc 636
+attr MCN xbeta -0.00000004
+attr MCN ybeta -0.000000015
+
+## east arm
+s seast1 598.4497 nBSeast nMFE1
+bs* MFE 150 10 0.0 0.0 nMFE1 nMFE2 dump dump
+attr MFE Rcx 664	# 71 W
+attr MFE Rcy 660	# 71 W
+
+s seast2 597.0713 nMFE2 nMCE1
+m* MCE 150 10 0.0 nMCE1 dump  
+attr MCE Rc 622
+#attr MCE xbeta 0.0000001
+
+
+## south arm
+s ssouth 1.115 nBSsouth nMSRi
+beam b1 nMSRi		# detecting the beam behind the space
+#beam b1 nBSsouth
+
+
+
+##------------------------------------------------------------ 
+## commands
+maxtem 8
+#time
+#trace 8
+phase 3
+# PR cavity (north arm)
+cav prc1 MPR nPRi MCN nMCN1 
+# PR cavity (east arm)
+cav prc2 MPR nPRi MCE nMCE1 
+ 
+
+##------------------------------------------------------------ 
+
+#pause
+
+const fSR   9012589
+const fMI   14.904875M
+const fPR  37.16M	
+
+
+xaxis  b1 x lin -2.5 2.5 10
+x2axis b1 y lin -2.5 2.5 10
+
+trace 32
+
+gnuterm no
+
diff --git a/kat_test/physics/fft_astigmatism.kat b/kat_test/physics/fft_astigmatism.kat
index c17b86c5b88e6585e08b82d12f116d521d1ca5e0..7c5948d2e43e3a274b6e581844331c8aa2d75b34 100644
--- a/kat_test/physics/fft_astigmatism.kat
+++ b/kat_test/physics/fft_astigmatism.kat
@@ -21,8 +21,8 @@ yaxis abs:deg
 # Apply to mirror m1 then save the new coupling 
 # coefficients
 map m1 astig_map.txt
-kmn m1 astig_test
-conf m1 save_kmn_binary 1
+knm m1 astig_test
+conf m1 save_knm_binary 1
 conf m1 integration_method 3
 conf m1 interpolation_method 2
 %%% FTend map
diff --git a/kat_test/physics/fft_mode_mismatch.kat b/kat_test/physics/fft_mode_mismatch.kat
index cf693008c545ebf38af988fd67a0b8b5b65bc3d7..3379e637021a3d523f877944dd33d1f0eea163fd 100644
--- a/kat_test/physics/fft_mode_mismatch.kat
+++ b/kat_test/physics/fft_mode_mismatch.kat
@@ -21,8 +21,8 @@ yaxis abs:deg
 # Apply to mirror m1 then save the new coupling 
 # coefficients
 map m1 curved_map.txt
-kmn m1 curve_test
-conf m1 save_kmn_binary 1
+knm m1 curve_test
+conf m1 save_knm_binary 1
 conf m1 integration_method 3
 conf m1 interpolation_method 2
 %%% FTend map
diff --git a/kat_test/physics/fft_tilt_map.kat b/kat_test/physics/fft_tilt_map.kat
index 944f820b977e2ce356325971ac3b96e6b601c455..6e8b03fbdf633ba5995135ebab0a41c83c12a1aa 100644
--- a/kat_test/physics/fft_tilt_map.kat
+++ b/kat_test/physics/fft_tilt_map.kat
@@ -21,8 +21,8 @@ yaxis abs:deg
 # Apply to mirror m1 then save the new coupling 
 # coefficients
 map m1 tilted_map.txt
-kmn m1 tilt_test
-conf m1 save_kmn_binary 1
+knm m1 tilt_test
+conf m1 save_knm_binary 1
 conf m1 integration_method 3
 conf m1 interpolation_method 2
 %%% FTend map
diff --git a/kat_test/physics/mirror_astig_BH_tilt_map.kat b/kat_test/physics/mirror_astig_BH_tilt_map.kat
index db54a0e409e38a37fc19a67a9044449771611042..650274a26a5b755fa5fbae866c04a14f37d19475 100644
--- a/kat_test/physics/mirror_astig_BH_tilt_map.kat
+++ b/kat_test/physics/mirror_astig_BH_tilt_map.kat
@@ -18,9 +18,9 @@ map m1 tilt.map
 attr m1 rcx  20000
 attr m1 rcy -20000
 maxtem 2
-kmn m1 m1_kmn_3_2_12
-conf m1 save_kmn_binary 1
-conf m1 kmn_change_q 2
-conf m1 kmn_order 12
+knm m1 m1_knm_3_2_12
+conf m1 save_knm_binary 1
+conf m1 knm_change_q 2
+conf m1 knm_order 12
 %%% FTend commands
 
diff --git a/kat_test/physics/mirror_astig_BH_tilt_map_order_swap.kat b/kat_test/physics/mirror_astig_BH_tilt_map_order_swap.kat
index 45f162dd190f93593421bedff4ae9ed6e2eca0e0..7af3d6c836874ab243932b384af72f85a399a4b4 100644
--- a/kat_test/physics/mirror_astig_BH_tilt_map_order_swap.kat
+++ b/kat_test/physics/mirror_astig_BH_tilt_map_order_swap.kat
@@ -18,10 +18,10 @@ map m1 tilt.map
 attr m1 rcx  20000
 attr m1 rcy -20000
 maxtem 2
-kmn m1 m1_kmn_3_2_12
-conf m1 save_kmn_binary 1
-conf m1 kmn_change_q 1
-conf m1 kmn_order 21
+knm m1 m1_knm_3_2_12
+conf m1 save_knm_binary 1
+conf m1 knm_change_q 1
+conf m1 knm_order 21
 %%% FTend commands
 
 gnuterm no
diff --git a/kat_test/physics/mirror_astig_map_tilt_BH.kat b/kat_test/physics/mirror_astig_map_tilt_BH.kat
index 2f2f9bc6c0fc500fc3cfde478d3bb44033e31b81..3d5c0674838fbe8b4ae7e535a8dd8d6640d65d6d 100644
--- a/kat_test/physics/mirror_astig_map_tilt_BH.kat
+++ b/kat_test/physics/mirror_astig_map_tilt_BH.kat
@@ -17,9 +17,9 @@ conf m1 integration_method 1
 map m1 astig.map
 attr m1 xbeta 1e-06
 maxtem 2
-kmn m1 m1_kmn_4_2_12
-conf m1 save_kmn_binary 1
-conf m1 kmn_change_q 2
-conf m1 kmn_order 12
+knm m1 m1_knm_4_2_12
+conf m1 save_knm_binary 1
+conf m1 knm_change_q 2
+conf m1 knm_order 12
 %%% FTend commands
 
diff --git a/kat_test/physics/mirror_astig_map_tilt_BH_order_swap.kat b/kat_test/physics/mirror_astig_map_tilt_BH_order_swap.kat
index 70dd72b9058912f521495eaa62a8420fac8e8aeb..ee7deac0b671d1b471e9c1810eb3e9214f346034 100644
--- a/kat_test/physics/mirror_astig_map_tilt_BH_order_swap.kat
+++ b/kat_test/physics/mirror_astig_map_tilt_BH_order_swap.kat
@@ -17,10 +17,10 @@ conf m1 integration_method 1
 map m1 astig.map
 attr m1 xbeta 1e-06
 maxtem 2
-kmn m1 m1_kmn_4_2_12
-conf m1 save_kmn_binary 1
-conf m1 kmn_change_q 1
-conf m1 kmn_order 21
+knm m1 m1_knm_4_2_12
+conf m1 save_knm_binary 1
+conf m1 knm_change_q 1
+conf m1 knm_order 21
 %%% FTend commands
 
 gnuterm no
diff --git a/kat_test/physics/mirror_astig_tilt_all_BH.kat b/kat_test/physics/mirror_astig_tilt_all_BH.kat
index a6465218677bead8d1b23ca1d109a17f40adf7d2..5ad754359e040c762a848faa2e0d2969d80eeebb 100644
--- a/kat_test/physics/mirror_astig_tilt_all_BH.kat
+++ b/kat_test/physics/mirror_astig_tilt_all_BH.kat
@@ -18,8 +18,8 @@ attr m1 xbeta 1e-06
 attr m1 rcx 20000
 attr m1 rcy -20000
 maxtem 2
-conf m1 kmn_order 12
-conf m1 kmn_change_q 2
+conf m1 knm_order 12
+conf m1 knm_change_q 2
 %%% FTend commands
 
 gnuterm no
diff --git a/kat_test/physics/mirror_astig_tilt_all_BH_order_swap.kat b/kat_test/physics/mirror_astig_tilt_all_BH_order_swap.kat
index a9b5a27fab371695a48cc400ed1933ae2e503c65..c7270a5aa4e5065e164eef3addbcd05b57043a56 100644
--- a/kat_test/physics/mirror_astig_tilt_all_BH_order_swap.kat
+++ b/kat_test/physics/mirror_astig_tilt_all_BH_order_swap.kat
@@ -18,8 +18,8 @@ attr m1 xbeta 1e-06
 attr m1 rcx 20000
 attr m1 rcy -20000
 maxtem 2
-conf m1 kmn_order 21
-conf m1 kmn_change_q 1
+conf m1 knm_order 21
+conf m1 knm_change_q 1
 %%% FTend commands
 
 gnuterm no
diff --git a/kat_test/physics/mirror_astig_tilt_all_map.kat b/kat_test/physics/mirror_astig_tilt_all_map.kat
index bdddf9ee7264000eb33f7581ae64fa5c10c4c3aa..9c16c8ee859b64d9cfc28e036ba67df25c05877c 100644
--- a/kat_test/physics/mirror_astig_tilt_all_map.kat
+++ b/kat_test/physics/mirror_astig_tilt_all_map.kat
@@ -16,10 +16,10 @@ conf m1 integration_method 1
 %%% FTblock commands
 map m1 tilt.map
 map m1 astig.map
-kmn m1 m1_kmn_2_2_12
-conf m1 save_kmn_binary 1
+knm m1 m1_knm_2_2_12
+conf m1 save_knm_binary 1
 maxtem 2
-conf m1 kmn_change_q 2
-conf m1 kmn_order 12
+conf m1 knm_change_q 2
+conf m1 knm_order 12
 %%% FTend commands
 
diff --git a/kat_test/physics/mirror_astig_tilt_all_map_order_swap.kat b/kat_test/physics/mirror_astig_tilt_all_map_order_swap.kat
index 0d1b72583f5801426952d2e981931f5413850131..536b75f6e4cfa83cd4d9ecace72281d5ee7d0393 100644
--- a/kat_test/physics/mirror_astig_tilt_all_map_order_swap.kat
+++ b/kat_test/physics/mirror_astig_tilt_all_map_order_swap.kat
@@ -16,11 +16,11 @@ conf m1 integration_method 1
 %%% FTblock commands
 map m1 tilt.map
 map m1 astig.map
-kmn m1 m1_kmn_2_2_12
-conf m1 save_kmn_binary 1
+knm m1 m1_knm_2_2_12
+conf m1 save_knm_binary 1
 maxtem 2
-conf m1 kmn_change_q 1
-conf m1 kmn_order 21
+conf m1 knm_change_q 1
+conf m1 knm_order 21
 %%% FTend commands
 
 gnuterm no
diff --git a/kat_test/random/aperture_resize.kat b/kat_test/random/aperture_resize.kat
index fbfb843387fa9adcc59f6eed48d4ac80b9fff62b..9c23a1cb4374e5c0fd36dd0a36f745ed208e3cee 100644
--- a/kat_test/random/aperture_resize.kat
+++ b/kat_test/random/aperture_resize.kat
@@ -6,8 +6,8 @@ pd0 Pref n2
 gauss g1 m1 n2 1e-3 0
 intmethod 3 # cuba parallel
 xaxis m1 r_ap lin 1e-5 2e-3 10
-#kmn m1 aperture_resize_m1
-#conf m1 save_kmn_binary 1
+#knm m1 aperture_resize_m1
+#conf m1 save_knm_binary 1
 maxtem 0
 #debug
 
diff --git a/kat_test/random/bs_map_astigmatism_reflect.kat b/kat_test/random/bs_map_astigmatism_reflect.kat
index bdc8754fd4576b4e774e688c0ebd44caf8da7038..81df99aa09ad7ab150c95a62af76b9b29e7c1f45 100644
--- a/kat_test/random/bs_map_astigmatism_reflect.kat
+++ b/kat_test/random/bs_map_astigmatism_reflect.kat
@@ -18,7 +18,7 @@ maxtem 2
 map bs1 astig.map
 conf bs1 integration_method 1
 
-conf bs1 save_kmn_binary 1
+conf bs1 save_knm_binary 1
 
 xaxis bs1 alpha lin 0 45 5
 
diff --git a/kat_test/random/bs_map_tilt.kat b/kat_test/random/bs_map_tilt.kat
index 3eb32650c73e0ab37d8373f6902cc3b4b13036c7..40652e2092692841a706c771976acee7386983d3 100644
--- a/kat_test/random/bs_map_tilt.kat
+++ b/kat_test/random/bs_map_tilt.kat
@@ -1,33 +1,33 @@
-#	Applies a tilt map(1u rad) to a beampslitter that is then tilted using the
-#	betax parameter. This is designed to test the matrix multiplication
-#	of the bayer-helms coupling coefficient matrix and the map matrix.
-#
-#	This should plot the mode content of the beam after reflection as a
-#	function of mirror angular misalignment.
-#
-
-intmethod 3
-phase 0
-
-l l1 1 0 n1
-s s1 1k n1 n2
-l l2 1 0 n6
-s s2 1k n6 n5
-bs m1 1 0 0 0 n2 n3 n4 n5
-map m1 tilt_minus_1u.txt
-conf m1 interpolation_method 2 #linear
-
-gauss g1 m1 n2 1e-2 0
-gauss g2 m1 n4 1e-2 0
-
-ad ad_00_n3 0 0 0 n3
-ad ad_10_n3 1 0 0 n3
-ad ad_01_n3 0 1 0 n3
-
-ad ad_00_n4 0 0 0 n4
-ad ad_10_n4 1 0 0 n4
-ad ad_01_n4 0 1 0 n4
-
-gnuterm no
-maxtem 2
-xaxis m1 xbeta lin 0u 2u 100
+#	Applies a tilt map(1u rad) to a beampslitter that is then tilted using the
+#	betax parameter. This is designed to test the matrix multiplication
+#	of the bayer-helms coupling coefficient matrix and the map matrix.
+#
+#	This should plot the mode content of the beam after reflection as a
+#	function of mirror angular misalignment.
+#
+
+intmethod 3
+phase 0
+
+l l1 1 0 n1
+s s1 1k n1 n2
+l l2 1 0 n6
+s s2 1k n6 n5
+bs m1 1 0 0 0 n2 n3 n4 n5
+map m1 tilt_minus_1u.txt
+conf m1 interpolation_method 2 #linear
+
+gauss g1 m1 n2 1e-2 0
+gauss g2 m1 n4 1e-2 0
+
+ad ad_00_n3 0 0 0 n3
+ad ad_10_n3 1 0 0 n3
+ad ad_01_n3 0 1 0 n3
+
+ad ad_00_n4 0 0 0 n4
+ad ad_10_n4 1 0 0 n4
+ad ad_01_n4 0 1 0 n4
+
+gnuterm no
+maxtem 2
+xaxis m1 xbeta lin 0u 2u 100
diff --git a/kat_test/random/bs_sep_100k.kat b/kat_test/random/bs_sep_100k.kat
index ff441f02a2d084509ed7d7fb8cb305b3da45ec7b..66fa4d372677014f6a644c74adb50bb9b4d70431 100644
--- a/kat_test/random/bs_sep_100k.kat
+++ b/kat_test/random/bs_sep_100k.kat
@@ -1,120 +1,120 @@
- 
-l i1 1.7 0 nMU3in
-
-gauss beam_in i1 nMU3in 268u -550m 
-
-mod  eom3 $fPR 0.126433 2 pm 0 nMU3in nMU3_1    # PR control
-mod  eom4 $fSR 0.199417 2 pm 0 nMU3_1 nMU3_2     # Schnupp1 (SR control)
-mod  eom5 $fMI 0.1225 2 pm 0 nMU3_2 nMU3_3     # Schnupp2 (MI control)
-
-lens lpr 1.8 nMU3_3 nMU3_4
-# some rather arbitrary thermal lense for the isolators and the EOMs:
-lens therm 5.2 nMU3_4 nMU3_5
-isol d2 120 nMU3_5 nMU3out               	# Faraday Isolator
-
-# 070502 corrected length with respect to OptoCad (Roland Schilling)
-s    smcpr3 4.391 nMU3out nBDIPR1  
-bs*  BDIPR 50 30 0 45 nBDIPR1 nBDIPR2 dump dump
-
-s    smcpr4 0.11 nBDIPR2 nMPRo
-
-
-##------------------------------------------------------------ 
-## main interferometer ##
-
-m    mPRo 0 1 0 nMPRo nMPRi
-attr mPRo Rc -1.85842517051051 # Rc as used in OptoCad (layout_1.41.ocd)
-s    smpr 0.075 1.44963 nMPRi nPRo
-# second (inner) surface of MPR
-m   MPR 0.99905 0.0009 0. nPRo nPRi       	# T= 900 ppm PR
-
-s    swest 1.146 nPRi nBSwest		# new length with T_PR=900 ppm
-
-
-
-## BS
-##
-##                              
-##                       nBSnorth     ,'-.
-##                             |     +    `. 
-##                             |   ,'       :'
-##            nBSwest          |  +i1      +
-##         ---------------->    ,:._  i2 ,'
-##                             + \  `-. +       nBSeast
-##                           ,' i3\   ,' ---------------
-##                          +      \ +
-##                        ,'     i4.'
-##                       `._      ..
-##                          `._ ,' |nBSsouth
-##                             -   |
-##                                 |
-##                                 |
-
-
-bs   BS 0.4859975 0.5139975 0.0 42.834 nBSwest nBSnorth nBSi1 nBSi3
-s    sBS1a 0.041 1.44963 nBSi1 nBSi1b
-# here thermal lense of beam splitter (Roland: f about 1000m for 10kW at BS)
-lens bst 100k nBSi1b nBSi1c
-s    sBS1 0.051 1.44963 nBSi1c nBSi2
-s    sBS2 0.091 1.44963 nBSi3 nBSi4
-bs   BS2 150u 0.99982 0 -27.9694 nBSi2 dump nBSeast nBSAR  
-bs   BS3 150u 0.99982 0 -27.9694 nBSi4 dump nBSsouth dump	
-
-## north arm
-s snorth1 598.5682 nBSnorth nMFN1
-bs* MFN 150 10 0.0 0.0 nMFN1 nMFN2 dump dump
-attr MFN Rc 666
-#attr MFN ybeta 0.00000002
-#attr MFN xbeta 0.00000003
-
-s snorth2 597.0158 nMFN2 nMCN1
-m* MCN 150 10 -0.0 nMCN1 dump
-attr MCN Rc 636
-attr MCN xbeta -0.00000004
-attr MCN ybeta -0.000000015
-
-## east arm
-s seast1 598.4497 nBSeast nMFE1
-bs* MFE 150 10 0.0 0.0 nMFE1 nMFE2 dump dump
-attr MFE Rcx 664	# 71 W
-attr MFE Rcy 660	# 71 W
-
-s seast2 597.0713 nMFE2 nMCE1
-m* MCE 150 10 0.0 nMCE1 dump  
-attr MCE Rc 622
-#attr MCE xbeta 0.0000001
-
-
-## south arm
-s ssouth 1.115 nBSsouth nMSRi
-beam b1 nMSRi		# detecting the beam behind the space
-#beam b1 nBSsouth
-
-
-
-##------------------------------------------------------------ 
-## commands
-maxtem 8
-#time
-#trace 8
-phase 3
-# PR cavity (north arm)
-cav prc1 MPR nPRi MCN nMCN1 
-# PR cavity (east arm)
-cav prc2 MPR nPRi MCE nMCE1 
- 
-
-##------------------------------------------------------------ 
-
-#pause
-
-const fSR   9012589
-const fMI   14.904875M
-const fPR  37.16M	
-
-
-xaxis  b1 x lin -2.5 2.5 100
-x2axis b1 y lin -2.5 2.5 100
-
-gnuterm no
-
+ 
+l i1 1.7 0 nMU3in
+
+gauss beam_in i1 nMU3in 268u -550m 
+
+mod  eom3 $fPR 0.126433 2 pm 0 nMU3in nMU3_1    # PR control
+mod  eom4 $fSR 0.199417 2 pm 0 nMU3_1 nMU3_2     # Schnupp1 (SR control)
+mod  eom5 $fMI 0.1225 2 pm 0 nMU3_2 nMU3_3     # Schnupp2 (MI control)
+
+lens lpr 1.8 nMU3_3 nMU3_4
+# some rather arbitrary thermal lense for the isolators and the EOMs:
+lens therm 5.2 nMU3_4 nMU3_5
+isol d2 120 nMU3_5 nMU3out               	# Faraday Isolator
+
+# 070502 corrected length with respect to OptoCad (Roland Schilling)
+s    smcpr3 4.391 nMU3out nBDIPR1  
+bs*  BDIPR 50 30 0 45 nBDIPR1 nBDIPR2 dump dump
+
+s    smcpr4 0.11 nBDIPR2 nMPRo
+
+
+##------------------------------------------------------------ 
+## main interferometer ##
+
+m    mPRo 0 1 0 nMPRo nMPRi
+attr mPRo Rc -1.85842517051051 # Rc as used in OptoCad (layout_1.41.ocd)
+s    smpr 0.075 1.44963 nMPRi nPRo
+# second (inner) surface of MPR
+m   MPR 0.99905 0.0009 0. nPRo nPRi       	# T= 900 ppm PR
+
+s    swest 1.146 nPRi nBSwest		# new length with T_PR=900 ppm
+
+
+
+## BS
+##
+##                              
+##                       nBSnorth     ,'-.
+##                             |     +    `. 
+##                             |   ,'       :'
+##            nBSwest          |  +i1      +
+##         ---------------->    ,:._  i2 ,'
+##                             + \  `-. +       nBSeast
+##                           ,' i3\   ,' ---------------
+##                          +      \ +
+##                        ,'     i4.'
+##                       `._      ..
+##                          `._ ,' |nBSsouth
+##                             -   |
+##                                 |
+##                                 |
+
+
+bs   BS 0.4859975 0.5139975 0.0 42.834 nBSwest nBSnorth nBSi1 nBSi3
+s    sBS1a 0.041 1.44963 nBSi1 nBSi1b
+# here thermal lense of beam splitter (Roland: f about 1000m for 10kW at BS)
+lens bst 100k nBSi1b nBSi1c
+s    sBS1 0.051 1.44963 nBSi1c nBSi2
+s    sBS2 0.091 1.44963 nBSi3 nBSi4
+bs   BS2 150u 0.99982 0 -27.9694 nBSi2 dump nBSeast nBSAR  
+bs   BS3 150u 0.99982 0 -27.9694 nBSi4 dump nBSsouth dump	
+
+## north arm
+s snorth1 598.5682 nBSnorth nMFN1
+bs* MFN 150 10 0.0 0.0 nMFN1 nMFN2 dump dump
+attr MFN Rc 666
+#attr MFN ybeta 0.00000002
+#attr MFN xbeta 0.00000003
+
+s snorth2 597.0158 nMFN2 nMCN1
+m* MCN 150 10 -0.0 nMCN1 dump
+attr MCN Rc 636
+attr MCN xbeta -0.00000004
+attr MCN ybeta -0.000000015
+
+## east arm
+s seast1 598.4497 nBSeast nMFE1
+bs* MFE 150 10 0.0 0.0 nMFE1 nMFE2 dump dump
+attr MFE Rcx 664	# 71 W
+attr MFE Rcy 660	# 71 W
+
+s seast2 597.0713 nMFE2 nMCE1
+m* MCE 150 10 0.0 nMCE1 dump  
+attr MCE Rc 622
+#attr MCE xbeta 0.0000001
+
+
+## south arm
+s ssouth 1.115 nBSsouth nMSRi
+beam b1 nMSRi		# detecting the beam behind the space
+#beam b1 nBSsouth
+
+
+
+##------------------------------------------------------------ 
+## commands
+maxtem 8
+#time
+#trace 8
+phase 3
+# PR cavity (north arm)
+cav prc1 MPR nPRi MCN nMCN1 
+# PR cavity (east arm)
+cav prc2 MPR nPRi MCE nMCE1 
+ 
+
+##------------------------------------------------------------ 
+
+#pause
+
+const fSR   9012589
+const fMI   14.904875M
+const fPR  37.16M	
+
+
+xaxis  b1 x lin -2.5 2.5 100
+x2axis b1 y lin -2.5 2.5 100
+
+gnuterm no
+
diff --git a/kat_test/random/e0.kat b/kat_test/random/e0.kat
index 828d2edbece8f006545bea2b32c03d1ff4298ded..48ed0355965ea539f19fc1dc4451eab19ad67e69 100644
--- a/kat_test/random/e0.kat
+++ b/kat_test/random/e0.kat
@@ -1,28 +1,28 @@
-l i1 1 0 n0
-
-mod eo2 166.033M 0.1 3 pm 0 n0 n4
-
-m* m1i 5000 37.5 90 n10 n11
-m* m2i 5000 37.5 0 n14 n15
-bs bs1 0.4995 0.4995 0 45 n4 n5 n6 n7
-s s1m 2.182727107 n6 n10
-s s2m 1.731322178 n5 n14
-
-
-fsig siglm3 m1i 0.0001 0
-fsig siglm4 m2i 0.0001 180
-
-pd1 det4c 166.033M 0 n7
-pd2 det4d 166.033M 0 0.0001 0 n7
-
-xaxis det4c phase1 lin 0 360 300
-put det4d phase1 $x1
-#xparam det4d phase1 1 0
-
-yaxis abs
-
-gnuterm no
-
-
-
-
+l i1 1 0 n0
+
+mod eo2 166.033M 0.1 3 pm 0 n0 n4
+
+m* m1i 5000 37.5 90 n10 n11
+m* m2i 5000 37.5 0 n14 n15
+bs bs1 0.4995 0.4995 0 45 n4 n5 n6 n7
+s s1m 2.182727107 n6 n10
+s s2m 1.731322178 n5 n14
+
+
+fsig siglm3 m1i 0.0001 0
+fsig siglm4 m2i 0.0001 180
+
+pd1 det4c 166.033M 0 n7
+pd2 det4d 166.033M 0 0.0001 0 n7
+
+xaxis det4c phase1 lin 0 360 300
+put det4d phase1 $x1
+#xparam det4d phase1 1 0
+
+yaxis abs
+
+gnuterm no
+
+
+
+
diff --git a/kat_test/random/e0_2.kat b/kat_test/random/e0_2.kat
index 875225849ce3aca95f3e625c5fb498fea59cf4d6..704af2f52e744888330ea7fb9a71261046fa1bb5 100644
--- a/kat_test/random/e0_2.kat
+++ b/kat_test/random/e0_2.kat
@@ -1,28 +1,28 @@
-l i1 1 0 n0
-
-mod eo2 166.033M 0.1 3 pm 0 n0 n4
-
-m* m1i 5000 37.5 90 n10 n11
-m* m2i 5000 37.5 0 n14 n15
-beamsplitter bs1 0.4995 0.4995 0 45 n4 n5 n6 n7
-s s1m 2.182727107 n6 n10
-s s2m 1.731322178 n5 n14
-
-
-fsig siglm3 m1i 0.0001 0
-fsig siglm4 m2i 0.0001 180
-
-pd1 det4c 166.033M 0 n7
-pd2 det4d 166.033M 0 0.0001 0 n7
-
-xaxis det4c phase1 lin 0 360 300
-put det4d phase1 $x1
-#xparam det4d phase1 1 0
-
-yaxis abs
-
-gnuterm no
-
-
-
-
+l i1 1 0 n0
+
+mod eo2 166.033M 0.1 3 pm 0 n0 n4
+
+m* m1i 5000 37.5 90 n10 n11
+m* m2i 5000 37.5 0 n14 n15
+beamsplitter bs1 0.4995 0.4995 0 45 n4 n5 n6 n7
+s s1m 2.182727107 n6 n10
+s s2m 1.731322178 n5 n14
+
+
+fsig siglm3 m1i 0.0001 0
+fsig siglm4 m2i 0.0001 180
+
+pd1 det4c 166.033M 0 n7
+pd2 det4d 166.033M 0 0.0001 0 n7
+
+xaxis det4c phase1 lin 0 360 300
+put det4d phase1 $x1
+#xparam det4d phase1 1 0
+
+yaxis abs
+
+gnuterm no
+
+
+
+
diff --git a/kat_test/random/ligotest2.kat b/kat_test/random/ligotest2.kat
index 1db7cfda23ec4eddc4dbdff6a828f64b7d2b22bd..3a20f1867ee62733ecf1414c7a2d4b6d1bfc668e 100644
--- a/kat_test/random/ligotest2.kat
+++ b/kat_test/random/ligotest2.kat
@@ -1,38 +1,38 @@
-
-l l1 1 0  n1
-s s1 .5 n1 n2
-
-### Cavity ###
-
-m FC1 .999 .001 0 n2 n3
-s sFC 2 n3 n4
-m FC2 .9 .1 0 n4 n5
-
-attr FC1 Rc 10
-attr FC2 Rc 2
-
-cav FC FC1 n3 FC2 n4
-
-
-xaxis FC1 phi lin 89 91 200
-
-pd out n5
-
-#trace 2
-
-maxtem 0
-#debug 256
-
-gnuterm no
-Gnuplot
-
-
-
-END
- 
-yaxis lin abs:deg
-
-
-
-
-
+
+l l1 1 0  n1
+s s1 .5 n1 n2
+
+### Cavity ###
+
+m FC1 .999 .001 0 n2 n3
+s sFC 2 n3 n4
+m FC2 .9 .1 0 n4 n5
+
+attr FC1 Rc 10
+attr FC2 Rc 2
+
+cav FC FC1 n3 FC2 n4
+
+
+xaxis FC1 phi lin 89 91 200
+
+pd out n5
+
+#trace 2
+
+maxtem 0
+#debug 256
+
+gnuterm no
+Gnuplot
+
+
+
+END
+ 
+yaxis lin abs:deg
+
+
+
+
+
diff --git a/kat_test/random/mirror_map_tilt.kat b/kat_test/random/mirror_map_tilt.kat
index eae7a5db5a73421e2659e2f29474a0b028f8d85c..d2f8905a000d386131d61c7d130cc219c63b75f6 100644
--- a/kat_test/random/mirror_map_tilt.kat
+++ b/kat_test/random/mirror_map_tilt.kat
@@ -1,34 +1,34 @@
-#	Written by Daniel Brown 02/12
-#
-#	Applies a tilt map(1u rad) to a mirror that is then tilted using the
-#	betax parameter. This is designed to test the matrix multiplication
-#	of the bayer-helms coupling coefficient matrix and the map matrix.
-#
-#	This should plot the mode content of the beam after reflection as a
-#	function of mirror angular misalignment.
-#
-
-phase 0
-
-l l1 1 0 n1
-s s1 1k n1 n2
-l l2 1 0 n4
-s s2 1k n4 n3
-m m1 1 0 0 n2 n3
-map m1 tilt_minus_1u.txt
-conf m1 interpolation_method 2 #linear
-
-gauss g1 m1 n2 1e-2 0
-gauss g2 m1 n3 1e-2 0
-
-ad ad_00_n2 0 0 0 n2
-ad ad_10_n2 1 0 0 n2
-ad ad_01_n2 0 1 0 n2
-
-ad ad_00_n3 0 0 0 n3
-ad ad_10_n3 1 0 0 n3
-ad ad_01_n3 0 1 0 n3
-
-gnuterm no
-maxtem 2
-xaxis m1 xbeta lin 0u 2u 100
+#	Written by Daniel Brown 02/12
+#
+#	Applies a tilt map(1u rad) to a mirror that is then tilted using the
+#	betax parameter. This is designed to test the matrix multiplication
+#	of the bayer-helms coupling coefficient matrix and the map matrix.
+#
+#	This should plot the mode content of the beam after reflection as a
+#	function of mirror angular misalignment.
+#
+
+phase 0
+
+l l1 1 0 n1
+s s1 1k n1 n2
+l l2 1 0 n4
+s s2 1k n4 n3
+m m1 1 0 0 n2 n3
+map m1 tilt_minus_1u.txt
+conf m1 interpolation_method 2 #linear
+
+gauss g1 m1 n2 1e-2 0
+gauss g2 m1 n3 1e-2 0
+
+ad ad_00_n2 0 0 0 n2
+ad ad_10_n2 1 0 0 n2
+ad ad_01_n2 0 1 0 n2
+
+ad ad_00_n3 0 0 0 n3
+ad ad_10_n3 1 0 0 n3
+ad ad_01_n3 0 1 0 n3
+
+gnuterm no
+maxtem 2
+xaxis m1 xbeta lin 0u 2u 100
diff --git a/kat_test/random/modematch1.kat b/kat_test/random/modematch1.kat
index 9818593f9df1c8bf6178e930bf7ca830feacf38e..009988fca3b79176ddca7cb232db39fe6f9d3b87 100644
--- a/kat_test/random/modematch1.kat
+++ b/kat_test/random/modematch1.kat
@@ -28,7 +28,7 @@ gauss g1 i1 nin 20.66546m -6.066913 # tuned to measured absolute beam sizeat NE
 maxtem 2                          # order of TEM modes (n+m)
 #retrace                           # recompute beam parameters for each data point
 trace 8
-#kmn 9 
+#knm 9 
 
 pd trans nMNE2