calculation

Anything that doesn't fit elsewhere.
Post Reply
pa1kumar
Posts: 13
Joined: Tue Oct 17, 2006 3:51 pm

calculation

Post by pa1kumar »

Hello,

I just had few questions.

I have to run the simulation for a long time for around 3min, but the problem is it was taking too long for the entire simulation to be completed by standard run tool.So i have used the variable step control and run the simulation which helped in speeding up the simulation. My question is whether this is a right method to do, if not is there any other method to speed up the simulation.

Next question is i have stored the data of the spikes by using the PWM/Ascii onto a text file. Now is that the only way to store the data of the graph? because i myself wanna set the points at which the data should be stored rather than the default.

I dunno whether this question is relevant here r nt but is there any software which we can use to get the interspike interval histogram?

would appreciate any help regarding these questions.

Pavan
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: calculation

Post by ted »

pa1kumar wrote:I have to run the simulation for a long time for around 3min, but the problem is it was taking too long for the entire simulation to be completed by standard run tool.So i have used the variable step control and run the simulation which helped in speeding up the simulation.
The distinction is between fixed time step and variable time step integration, not between
using the RunControl tool and using the VariableStepControl tool. One uses the RunControl's
"Init & Run" button to start a simulation, regardless of whether integration uses fixed dt
or variable dt.
My question is whether this is a right method to do, if not is there any other method to speed up the simulation.
Design the model so that it involves no more anatomical or biophysical complexity than
are needed to address the research question, or are warrented by the available
experimental evidence.
Use nseg that is just large enough for the desired degree of accuracy.
Use dt that is just small enough for the desired degree of accuracy.
Avoid graphing results during simulation execution, and especially avoid space plots or
shape plots in which the value of range variables is displayed in false colors.
Don't write results to disk, or print results to the screen, in the course of a simulation.
Don't run other programs while a simulation is running.
Get more RAM.
Get a faster processor.
Next question is i have stored the data of the spikes by using the PWM/Ascii onto a text file. Now is that the only way to store the data of the graph? because i myself wanna set the points at which the data should be stored rather than the default.
Use the Vector class's record() method to capture simulation results without drawing them
in Graphs.
Use the CVode class's event() method to force simulations using variable time steps to
stop at specific times.
I dunno whether this question is relevant here r nt but is there any software which we can use to get the interspike interval histogram?
Use the NetCon class's record() method to capture spike times to a Vector. Then use
the Vector class's various methods to compute interspike intervals and bin them into
a histogram (hint: Euler deriv() with dt = 1 calculates the interspike intervals, hist() or
histogram() will bin them for you).
pa1kumar
Posts: 13
Joined: Tue Oct 17, 2006 3:51 pm

Post by pa1kumar »

I think i kind of get it like what to do.
Thank you very much for the reply.

Pavan
pa1kumar
Posts: 13
Joined: Tue Oct 17, 2006 3:51 pm

Post by pa1kumar »

Hii

I am also trying to get a Peri stimulus time histogram for the output i have got with the trigger being my time of the input where the signal rises above a particular level (My input signal is a sine wave ). Is there a particular method in order to do it.
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Nothing built in. Capture the trigger times to one Vector, and the spike times to another
Vector. Then with a bit of programming, taking advantage of the Vector class's various methods, you can generate whatever histograms you like.
pa1kumar
Posts: 13
Joined: Tue Oct 17, 2006 3:51 pm

Post by pa1kumar »

Thank you for the prompt reply.

I tried capturing the spike timings using the vector classes record and to bin my spikes i used the spikebin command. well i dint yet get the psth graph as of now.
So i am trying to import my spike timings to a seperate program, first by capturing the data into a file by using the pick vector command and saving it to a file. When i imported my data from file into an excel r other software like spike i was not able to see the actual plot i had as my input(which by the way is a sine wave), I got kind of a rectified wave in both the other programs. I wasn,t sure whther this was right so i also tried printing as ascii from the PWM, but it shows the same result.

Is there a problem with the way i do it r is there any other reason for that?
Any help would be really great.

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

Post by ted »

The way to capture spike times to a Vector is to use the NetCon class's record() method
http://www.neuron.yale.edu/neuron/stati ... tml#record
The elements of the vector will be just the spike times. The trigger times can be recorded
to another Vector in the same way.

The way to make a histogram is to use the Vector class's histogram() method--the
documentation contains a working example
http://www.neuron.yale.edu/neuron/stati ... #histogram

To make a peristimulus time histogram from a vector of spike times and another vector of
trigger times, you'll have to come up with your own algorithm for converting the raw spike
times to peristimulus spike times. Here's a first stab at the outline for such an algorithm in
pseudocode, assuming a peristimulus window that extends from -tw to +tw and supposing
that the Vectors of stimulus times and spike times are called stimtvec and spiketvec,
respectively. In essence, this centers a window on each trigger time, and copies the
times of all spikes that fall within that window (after subtracting the trigger time from them)
to a vector of peri-event times that can then be used to generate a histogram. This
algorithm can be implemented with a few of the Vector class's methods.

Code: Select all

Create a new Vector called peritvec (peri-event spike times)
Find the maximum spike time; call this spiketmax.
Read through the elements of stimtvec until you find the first value stimt such that stimt - tw >= 0
while (stimt + tw <= spiketmax)
  copy spiketvec to a temporary vector called tempspiketvec
  subtract stimt from all elements of tempspiketvec
  copy all elements of tempspiketvec that lie between -tw and +tw to peritvec
  read the next stimt from stimtvec; if there isn't one, set stimt equal to 1e9
end while
pa1kumar
Posts: 13
Joined: Tue Oct 17, 2006 3:51 pm

Post by pa1kumar »

Thank you for your reply. This helps.
But i am curious though is there any way to just output the data in a format
which i can use in other programs, as i mentioned the way i did it did not work well.

Thanks
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

pa1kumar wrote:is there any way to just output the data in a format
which i can use in other programs
Use the Vector class's printf() method to write the contents of a Vector to a plain text file.
Post Reply