//execute1("celltypes.element(\"Cell\")")

/* DSI Type Template  */
/* Created by Bob Calin-Jageman */

begintemplate DSIType
	/* public references for L29Type */
	public soma, ileak, ishunt, sthold, stholdnc, iunder, iundernc
	
	/* public sections and objectvars */
	create soma
	objectvar ileak, ishunt, sthold, stholdnc, iunder, iundernc

	proc init() {
		

		/* Basic Settings */
		soma.L =  5.6491
		soma.nseg = 1
		soma.cm = 1.57*11.28
		soma.v = -47.5
		
		/* leak object */
		soma {ileak = new leak(0.5)}
		ileak.vrest = -47.5
		ileak.r = 38.8

		/* shunt object */
		soma {ishunt = new shunt(0.5)}
		ishunt.G = 0.080
		ishunt.erev = -47.5
		ishunt.Bm = 29
		ishunt.Cm = -1
		ishunt.Tm = 10
		ishunt.Bh = -100
		ishunt.Ch = 1
		ishunt.Th = 100000	
		ishunt.vstart = -47.5

		/* thold object */
		soma {sthold = new thold(0.5)}
		sthold.steadystate = -50
		sthold.reset = 200
		sthold.decaytc = 15

		soma stholdnc = new NetCon(&v(0.5), sthold, 0, 0, 1)
		setpointer sthold.nc_thresh, stholdnc.threshold

		/* spike overshoot objects */
		soma {iunder = new tholdsyn(0.5)}
		soma iundernc = new NetCon(&v(0.5), iunder, 0, 0, 1)
	
		iunder.G1_weight = 0.30000001
		iunder.G2_weight = 0.012
		iunder.G3_weight = 0.0
	
		iunder.G1_eRev = -80
		iunder.G2_eRev = -80
		iunder.G3_eRev = 0
	
		iunder.G1_opentc = 10
		iunder.G2_opentc = 200
		iunder.G3_opentc = 1

		iunder.G1_closetc = 85
		iunder.G2_closetc = 2800
		iunder.G3_closetc = 1

	}

endtemplate DSIType