/************************************************************

	Christina Weaver
	August 2011
	
	insert channels from Vetter et al (2001) into Jennie's 
	PFC and Visual Cortex neurons.  Includes Mainen's 
	synthetic axon (from the 1995 Mainen et al. paper).

************************************************************/

load_file("nrngui.hoc")

// now load morph;  recall that 'basic_shape()' resets the morphology
load_file("Jul16IR3f_fromSWCthenManual_Nov22-11.hoc")

load_file("aux_procs.hoc")

xopen("electro_procs.hoc")

    V1_effective_ApicalSpineDensity = 0.67322181	//  total of 1153 spines, divided by total apical length
    V1_effective_BasalSpineDensity  = 0.4886992	//  total of 874 spines, divided by total basal  length

    applySubtreeConstantSpineDensity(apical, SurfaceAreaOneApicalSpine, V1_effective_ApicalSpineDensity)
    applySubtreeConstantSpineDensity(basal,  SurfaceAreaOneBasalSpine,  V1_effective_BasalSpineDensity)

geom_nseg(100,0.1)



  xopen("measureMeanAtten.hoc")
  soma {
    nseg = 1
    soma_ref = new SectionRef()
  }

scale_gpas(3.8e-5)
  set_epasNG(69)

{printf("Outward Atten, apical\n")}
  meanOutAttenAllFreqs_SecList(soma_ref,apical)
{printf("\n\nInward Atten, apical\n")}
  meanInAttenAllFreqs_SecList(soma_ref,apical)
{printf("\n\nOutward Atten, basal\n")}
  meanOutAttenAllFreqs_SecList(soma_ref,basal)
{printf("\n\nInward Atten, basal\n")}
  meanInAttenAllFreqs_SecList(soma_ref,basal)

{
    printf("\n\n*****\n\nTo plot morphoelectrotonic transforms, go to\n")
    printf("\tNEURON Main Menu -> Tools -> Impedance -> Shape\n")
}