// This function loads all morphologyrelated files and templates that will
// most probably be needed in the experiments to follow.
// written by Terrence Brannon, modified Yiota Poirazi, July 2001, poirazi@LNC.usc.edu
objref vRP, vAPEX
proc cell_analysis() {
load_template("ObliquePath")
load_template("BasalPath")
forall insert d3 // mod file to enable 3D mapping of each point along the cell
$o1.defvar("Distance Calculation", "adjustment", "41.1*0.5", "This adjustment factor is supplied to the vector distance function so that distance calculations are measured at the cell body.")
$o1.xopen_library("Terrence","vectordistance")
vRP=new Vector()
access apical_dendrite[4] // set point of reference (if adjustment=0). With adjustment factor = 41.1
vcreate(vRP) // the point of reference is the soma
vAPEX=new Vector()
access apical_dendrite[92] // set the apex point
vcreate2(vAPEX,0.5)
$o1.xopen_geometry_dependent("somalist")
$o1.xopen_geometry_dependent("axonseclist")
$o1.xopen_geometry_dependent("basaltreelist")
$o1.xopen_geometry_dependent("apicaltiplist")
$o1.xopen_geometry_dependent("apicaltiplistaddendum")
$o1.xopen_geometry_dependent("apicaltrunklist")
$o1.xopen_geometry_dependent("peritrunklist")
$o1.xopen_geometry_dependent("apicalnontrunklist")
$o1.xopen_geometry_dependent("obliquepaths")
$o1.xopen_geometry_dependent("basalpaths")
//$o1.xopen_geometry_dependent("superlinearapicaltiplist")
//sprint($o1.syscmd, "mv somalist.eps axonseclist.eps %s", $o1.generic_dir)
//system($o1.syscmd)
//sprint($o1.syscmd, "mv apicaltiplist.eps %s", $o1.generic_dir)
//system($o1.syscmd)
//sprint($o1.syscmd, "mv apicaltiplistaddendum.eps %s", $o1.generic_dir)
//system($o1.syscmd)
//sprint($o1.syscmd, "mv apicaltrunklist.eps %s", $o1.generic_dir)
//system($o1.syscmd)
//sprint($o1.syscmd, "mv apicalnontrunklist.eps %s", $o1.generic_dir)
//system($o1.syscmd)
//sprint($o1.syscmd, "mv basaltreelist.eps %s", $o1.generic_dir)
//system($o1.syscmd)
}
