iterating non-uniform channel density in a multiple run fit

Using the Multiple Run Fitter, praxis, etc..
Post Reply
mattmc88

iterating non-uniform channel density in a multiple run fit

Post by mattmc88 »

Okay, so I have used the Cell Builder "Create a SubsetDomainIterator" to put a non-uniform distribution of channels onto my morphology. The distribution is determined by a couple of parameters which can be manually adjusted in the cell builder. I would like to optimize in a multiple run fit and vary these parameters. How do I find out what they are named, in order to reference them in the parameter panel of the MulRunFitter? More generally, is there a "Name map" for the Cell Builder that I can access? THanks!
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

iterating non-uniform channel density in a multiple run fit

Post by ted »

Piece of cake. From the CellBuilder's management page, export a hoc file. That is,
CellBuilder: click on Management
Management page: click on Export
Click on button labeled "Export to file"

Read the hoc code and you will see that the last statement in proc celldef() is a call to
biophys_inhomo()
Read on and you will see something like this

Code: Select all

objref apicals_x
proc biophys_inhomo() {
  // Path Length from root translated so most proximal end at 0
  //   and normalized so most distal end at 1 ranges from 0 to 1
  apicals_x = new SubsetDomainIterator(apicals, 0, 1, 1)
  gnabar_hh_apicals_x()
}
proc gnabar_hh_apicals_x() {local x, p, p0, p1, b, m
  apicals_x.update()
  p0 = apicals_x.p0  p1 = apicals_x.p1
  b = 0.12
  m = -0.12
  for apicals_x.loop() {
    x = apicals_x.x  p = apicals_x.p
    gnabar_hh(x) = b + m*p/(p1 - p0)
  }
}
Just create your own new proc patterned after the proc that biophys_inhomo() calls (in
this example, patterned after proc gnabar_hh_apicals_x(), which sets up a linear gradient
for gnabar_hh). Your new proc should have a different name, of course. Its params
should be exposed instead of local. You need to call this proc before each run that the
MRF executes. This could be done with a custom init() that, as the first thing that it does,
calls your new proc (see chapter 8 of The NEURON Book), but I think a better idea is to
use a type 3 FInitializeHandler.

Of course it is necessary to prevent nonsense parameter values. In this particular
example, you'd want to avoid values of b and m that would allow gnabar to become
negative. That could be done by stipulating that b is positive definite and that m equals -b.
For more complex situations, a different strategy may be necessary that involves some
more code in init() or the proc called by the FInitializeHandler.

Easier done than said.
Post Reply