// $Id: init_active.hoc,v 1.2 2008/04/30 21:01:14 ted Exp ted $

// POPOVIC = 1  // use cell params from Popovic et al., 2005

/*
Based on init_spiketuft.hoc

Active mitral cell model, stimulated at the soma, 
to investigate spike invasion of the tuft.
Biophysical parameters are as in
Shen, G.Y., Chen, W. R., Midtgaard, J., Shepherd, G.M., and Hines, M.L. (1999) 
Computational Analysis of Action Potential Initiation in Mitral Cell Soma and 
Dendrites Based on Dual Patch Recordings. Journal of Neurophysiology 82:3006,
which is available from ModelDB (accession number 3342, URL
http://senselab.med.yale.edu/senselab/modeldb/ShowModel.asp?model=3342 ).

This version does not include their complex model axon, 
because the tuft is so far from the site of axonal attachment 
that axonal details probably have no effect on it.

Displays peak amplitude of the spike throughout the tuft.
*/

load_file("nrngui.hoc")
load_file("colors.hoc")

/*
if (POPOVIC) {
  load_file("cell_popovic.ses")
} else {
  load_file("cell_70_3_9p5_rest0.ses")
}
*/

load_file("cell_active.ses")

forall {
  ena = 60
  ek = -90
}


/* don't bother with this
load_file("fixgrid_spiketuft.hoc")  // turn off Continuous Create
  // then double Ra and cm, regrid the model using d_lambda rule, and finally restore Ra and cm
*/

load_file("rig_active.ses")  // RunControl, v graph, and IClamp at soma
load_file("instrument_spiketuft.hoc")  // inserts monx and computes distances over tuft subset
// this active cell makes its own spikes
// load_file("spikeclamp_spiketuft.hoc")  // puts an SEClamp at origin of tuft
  // that will be used to drive this point with a recorded spike waveform
// load_file("analyze_spiketuft.hoc")  // analyze results
load_file("analyze_active.hoc")  // analyze results
// load_file("plots_spiketuft.hoc")  // display results
load_file("plots_active.hoc")  // display results
// load_file("control_spiketuft.hoc")  // execute simulation, control analysis, display, and storage of results
load_file("control_active.hoc")  // execute simulation, control analysis, display, and storage of results