BACK_GROUND = 0 		// set to 1 when using background synapses
synch = 0  			// synapses are stimulated randomly (NOT synchronously), set to 1 for synchronous stimulation

load_file("nrngui.hoc")
load_file("./../template/ExperimentControl.hoc")       // load needed templates
load_file("./../template/RangeRef.hoc")
load_file("./../template/ObliquePath.hoc")
load_file("./../template/BasalPath.hoc")

cvode_active(0)						//activate Cvode

objref econ                              		// initialize template parameters
show_errs=1
debug_lev=1
econ=new ExperimentControl(show_errs,debug_lev)
econ.self_define(econ)
econ.morphology_dir="./../morphology/n123"              // set location for morphology files
econ.add_lib_dir("Terrence","./../lib")                 // set location for library files
econ.generic_dir="./../experiment/"                     // set 
strdef tips_dir

system(econ.syscmd)

actual_resolution=75                               // maximum nseg number, lib/chooses-secs.hoc 
desired_resolution=1

xopen("./../morphology/n123/cell.hoc")			// load raw cell morphology     
xopen("./../morphology/n123/cell-analysis.hoc")	// load user-defined semantics on morphology                                  	
cell_analysis(econ)
 
printf("Opening cell setup\n")                                   
                                              
xopen("./cell-setup.hoc")				// load cell-setup
printf("Opened. Setting up cell\n")                     // specify all mechanisms,
maximum_segment_length=actual_resolution                // membrane properties etc	 
cell_setup(econ)