Page 1 of 1

Modeling a Test Iclamp

Posted: Tue Jul 03, 2012 10:06 am
by charles1
Hi,

I have a morphologically reconstructed cell via a cellbuilder. I wish to create a single test or model pulse of given v_init, delay, amplitude, duration, and total time in Iclamp for this cell. I then wish to download the resultant V(t) vector, in order to model it as per the MRF2 tutorial. Except that here, the data is not experimental, but from NEURON.

Thank you.

Re: Modeling a Test Iclamp

Posted: Tue Jul 03, 2012 1:18 pm
by ted
So what's your question?

Re: Modeling a Test Iclamp

Posted: Tue Jul 10, 2012 1:54 pm
by charles1
I apologize for the lack of clarity.

How is what I wish to achieve done?

I tried exporting the voltage trace from the voltage axis graph by using "pick vector"; the resolution is very low - not enough voltage points, and no time points. I tried changing dt in the run control menu; the trace is more refined, but "pick vector" yields the same result. So "pick vector" is not the right way. What is?

Re: Modeling a Test Iclamp

Posted: Tue Jul 10, 2012 2:48 pm
by ted
charles1 wrote:I tried exporting the voltage trace from the voltage axis graph by using "pick vector"; the resolution is very low - not enough voltage points, and no time points.
Very strange. After I "pick" a vector (left click on a trace in a graph that is in "Pick vector" mode),
NEURON Main Menu / Vector / Save to File
writes a text file that starts like so

Code: Select all

label:node[5].v( 0.5 )
201
0       -70
0.025   -70
0.05    -70
 . . .
i.e. first line tells the name of the dependent variable, 2nd line how many xy pairs, and the remaining lines contain time and the dependent variable as the first and 2nd fields on each line.
I tried changing dt in the run control menu; the trace is more refined, but "pick vector" yields the same result.
dt doesn't specify how many points are plotted per ms. That is controlled by a standard run system parameter called steps_per_ms. At initialization, the standard run system first makes sure that dt is compatible with steps_per_ms, and if it isn't, forces dt to an appropriate value. If you want to change steps_per_ms, you could do so with a simple hoc assignment statement, or you could enter the desired value into the numeric field next to the RunControl's "Points plotted/ms." Example: by default, steps_per_ms is 40 and dt is 0.025 ms. Doubling steps_per_ms changes dt to 0.0125 ms. If I run a new simulation, pick a new vector and save it to a file, I find that the data are sampled at intervals of 0.0125 ms.

If you prefer to capture the time course of a variable directly to a Vector, use the Vector class's record() method (documented in the Programmer's Reference entries about the Vector class). Of course you will then have to capture t to a separate vector, and write your own code to ensure that dt and the recorded variable are written to one or more text files.