&input                                                                                                                  
lat_file = 'synch.lat_ext_branch_l3_inside'
e_init = 150.e6  ! energy at injection into synchrotron                                                                 
ramp_synch = T   ! ramp                                                                                                 
t0 = 0                                                                                                                  
nturns = 4000                                                                                                           
rf_phase_twopi =0.25 !rf_phase adjusted to maximize capture                                                             
initial_offset = 0.0, 0.0, 0.0001, 0.0, 0.0, 0.0  !initial offset 6-vector                                              
n_fft=256     ! number of turns in fft for determining tune                                                             
nparticles = 100   !number of particles in distribution                                                                 
qvert=   -0.15 !0.09! 0.18                                                                                                
qhorz=   -0.13 ! 0.38 !0.215 !0.44 !0.2 !0.22  !0.24 a bit too much !100  !110 !120  125     !all lost at -0.14165        
sextk2 = -6. !1.6 !-1.5 !sextupole strength                                                                             
octk3 = 0. !octupole strength                                                                                           
ext_param = 14000                                                                                                       
ext_time = 0.005 !time that extraction begins                                                                           
turn_on_time = .25 ! fraction of ext_time to get to full field                                                          
emit_x = 2.e-6 !horizontal emittance of injected bunch [m-rad]                                                          
emit_y = 2.e-6 !vertical emittance of injected bunch [m-rad]                                                            
sig_z = 1.e-3  !bunch length                                                                                            
sig_e = 1.e-3  !fractional energy spread                                                                                
x_septum(0) = 0.031 !displacement of thin septum 0 from center of chamber                                               
x_septum(1) = -0.03 !displacement of septum 1 from center of chamber                                                     
x_septum(2) = -0.03 !displacement of septum 2 from center of chamber                                                    
x_wall(0) = 0.045 !distance from center of chamber to outer wall of thin septum (septum 0)                              
x_wall(1) = 0.045 !distance from center of chamber to outer wall of septum 1                                            
x_wall(2) = -1. !distance from center of chamber to outer wall of septum 2                                              
t_septum(0) = 0.0005  !thickness of septum 0                                                                            
t_septum(1)=0.0006 !thickness of septum 1                                                                                
t_septum(2)=0.0006 !thickness of septum 2                                                                               

k_septum(0)= -0.00205 ! septum 0 kick
k_septum(1)= -0.005 ! septum 1 kick
k_septum(2)= -0.008 ! septum 2 kick

t1 = 0.01                                                                                                               
oct_ramp(2199) = 0.0                                                                                                    
oct_ramp(2500) = 0.3                                                                                                    
oct_ramp(3000)=1.6                                                                                                      
oct_ramp(4000)=4.                                                                                                       
                                                                                                                        
sext_ramp(1000) = 0.  !sextupole ramp - fraction of full scale at turn 1000                                             
sext_ramp(2000) = 0.0 !sextupole ramp - fraction of full scale at turn 2000                                             
sext_ramp(2500) = 1. !sextupole ramp - fraction of full scale at turn 2500                                              
sext_ramp(3000)=1.  ! etc                                                                                               
sext_ramp(3500)=1.1                                                                                                     
sext_ramp(4000)=1.                                                                                                      
sext_ramp(4500)=0.6                                                                                                     
sext_ramp(5000)=0.3                                                                                                     
sext_ramp(5500)=0.                                                                                                      
sext_ramp(6000)=0.                                                                                                      
sext_ramp(6500)=0.                                                                                                      
sext_ramp(6600) = 0.                                                                                                    
sext_ramp(7000) = 0.                                                                                                    
                                                                                                                        
quad_ramp(1000) = 0.4                                                                                                   
quad_ramp(1500)=0.9                                                                                                     
quad_ramp(2500)= 1.1                                                                                                    
quad_ramp(3000)=1.1                                                                                                     
quad_ramp(3500)=1.1                                                                                                     
quad_ramp(5000)=1.                                                                                                      
quad_ramp(5500)=0.8                                                                                                     
quad_ramp(6000)=0.0                                                                                                     
quad_ramp(7000)=0.0                                                                                                     
                                                                                                                        
phase_space = T  !save phase space                                                                                      
                                                                                                                        
!hbump = -0.0121    -0.01   0.007    !angular kick of three bump magnets                                                
hbump = -0.0121    -0.0045   0.011     !angular kick of three bump magnets    !checked out                                
bump_bend = 'B110H'  'B099H' 'B096H'                                                                                    
bump_amp = 0.8 !1.1 !1.0 !0.85 !0.75 ! 1.2 !overall bump amplitude                                                     
Bump_ramp(800)= 0.                                                                                                      
Bump_ramp(1000)= 1.                                                                                                     
Bump_ramp(1200)= 1.75                                                                                                   
Bump_ramp(1400) = 2.35                                                                                                  
Bump_ramp(1600) = 2.75                                                                                                  
Bump_ramp(1800) = 2.9                                                                                                   
Bump_ramp(2000) = 3.0                                                                                                   
Bump_ramp(2100) = 3.0                                                                                                   
Bump_ramp(2200) = 3.0                                                                                                   
Bump_ramp(2300) = 3.0                                                                                                   
Bump_ramp(2500) = 3.0                                                                                                   
Bump_ramp(3000) = 3.0                                                                                                   
Bump_ramp(3500) = 3.0                                                                                                   
Bump_ramp(4000) = 3.0                                                                                                   
Bump_ramp(4200) = 2.9                                                                                                   
Bump_ramp(4400) = 2.75                                                                                                  
Bump_ramp(4600) = 2.35                                                                                                 
Bump_ramp(4800) = 1.75                                                                                                  
Bump_ramp(5000) = 1.                                                                                                    
Bump_ramp(5200) = 0.                                                                                                    
Bump_ramp(7000) = 0.                                                                                                    
                                                                                                                        
aperture_limit_on = F  !apertures on or off                                                                             
/	                                                                                                                      
