Firing threshold calculation

Anything that doesn't fit elsewhere.
Post Reply
ssothro
Posts: 13
Joined: Mon Feb 06, 2006 5:12 pm

Firing threshold calculation

Post by ssothro »

Hi all,
I was wondering whether there is a predefined procedure or mechanism in NEURON that calculates the firing threshold for a cell model, when intracellular stimulation of given pulse width is used. I guess one can implement a .hoc file that will run a bunch of simulations and will monitor excitation by an APCount process, I was wondering however whether this is already implemented or whether there is a better way to do it.

Thank you in advance.
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

How to find spike threshold automatically

Post by ted »

nrn/lib/hoc/thresh.hoc implements a binary search that can be quite useful
for finding spike threhold. Read the source code to understand the details,
but basically it adjusts a user-specified variable and uses an APCount to
detect the spike.

Here's an example of its use:
1. Create a file that contains the specification of your model cell. For the
sake of this example, I'm calling this modelcell.ses
2. Create an "instrumentation" file that sets up the source of stimulation,
and also an APCount that monitors membrane potential at the location
where you want the spike to occur. This file may also set up some other
stuff like graphs. I'm calling this rig.ses
3. Create an init.hoc file that loads your model spec file, your
instrumentation file, and thresh.hoc . Also in this file, for the sake of
convenience, create a proc that will execute the threshold() func that
is defined in thresh.hoc
4. Use NEURON to load init.hoc, then type the name of the proc that
executes the threshold() func.

Here's a sample init.hoc file that does what I described:

Code: Select all

load_file("nrngui.hoc")
load_file("modelcell.ses")  // hoc or ses file that specifies a model cell
/*
   The next file defines a RunControl, an IClamp (stimulus) with the 
   desired duration, and an APCount located wherever you want to 
   detect a spike.
   For debugging purposes you might also want to include 
   a Voltage axis graph to show v at that location, 
   and possibly also a current axis graph that shows the current pulse
*/
load_file("rig.ses")  // the instrumentation, i.e. virtual experimental rig
load_file("thresh.hoc")  // this is supplied in nrn/lib/hoc

proc doit() {
  threshold(&IClamp[0].amp)
}

// at the oc> prompt, type doit()
This file contains a complete working example:
http://www.neuron.yale.edu/ftp/ted/neur ... d_demo.zip
Unzip it and follow the instructions in readme.txt
Post Reply