Page 1 of 1

Saving data from 2 parameter runs

Posted: Fri Oct 04, 2013 7:17 am
by lb5999
Hi Neuron Community,

I have a question regarding handling large amounts of data.

I have a model cell. I am producing an Injected current - firing frequency (I-F) curve. For each value injected current, I would like the time series for membrane potential, so that I can do further analysis. I therefore have saved the results of my protocol to a matrix, and written it to a datafile.

Trouble is, I want to do this same protocol, for various values of a parameter, GKA.

I have some code that looks like this

Code: Select all

for i=1,nvalues {
for j=1,nstimvalues {
stim.amp=ampvalue(i) // this is the injected current amplitude
// set up vectors recording V, etc.
// code for saving data for that value of GKA to a file
but how do I "enumerate" the name of the data file, so that at each value of GKA (run of the for loop in i) the simulation data can be written to a new datafile and saved. At the moment, the datafile is just be overwritten with the next run in i

I guess this is equivalent to wanting to save time-series data from the results of a 2dimensional parameter sweep; in GKA and the stimulus amplitude.

Any suggestions would be most appreciated,


Re: Saving data from 2 parameter runs

Posted: Sat Oct 05, 2013 10:36 pm
by ted
You'll want to use sprint.

Code: Select all

oc>strdef tstr, fname, basename
oc>basename = "foo"
oc>i = 1
oc>for i=0,3 { \
oc>  sprint(fname,"%s%d.dat",basename,i) \
oc>  print fname \