multiloading the same file with different values
Posted: Fri Feb 27, 2009 6:27 am
Hi!
I'm trying to automatize the process of electrotonic profiles building for different values of Rm. The problem is that I need to use about 20 differernt values of Rm for each neuron so it takes a lot of time: I load the .hoc file (creating electrotonic profile), I change the Rm value, I save it and I reload it again. And so on, 20 times! So I wanted to load this hoc automatically changing Rm.
I created another hoc with the following code:
g_pas_changeable=0.02
xopen("get_tx.hoc")
g_pas_changeable=0.018
xopen("get_tx.hoc")
.
.
.
g_pas_changeable=0.0001
xopen("get_tx.hoc")
The same with "load_file".
get_tx.hoc - file creating electrotonic profile, where g_pas value is equal to g_pas_changeable.
The problem is that it works correctly only for the first loading of the get_tx.hoc, and then it seems to change g_pas_changeable but without implementing it for the simulations programmed inside the get_tx.hoc.
So at the first glance it seems to work correctly: it gives the set of electrotonic profiles, but then it turns out that all of them are the same - as the first one.
Is there any other way to load the same hoc-file several times so that it is executed with different values of internal parameters set outside (g_pas in this case)?
Thank you in advance for your answer
I'm trying to automatize the process of electrotonic profiles building for different values of Rm. The problem is that I need to use about 20 differernt values of Rm for each neuron so it takes a lot of time: I load the .hoc file (creating electrotonic profile), I change the Rm value, I save it and I reload it again. And so on, 20 times! So I wanted to load this hoc automatically changing Rm.
I created another hoc with the following code:
g_pas_changeable=0.02
xopen("get_tx.hoc")
g_pas_changeable=0.018
xopen("get_tx.hoc")
.
.
.
g_pas_changeable=0.0001
xopen("get_tx.hoc")
The same with "load_file".
get_tx.hoc - file creating electrotonic profile, where g_pas value is equal to g_pas_changeable.
The problem is that it works correctly only for the first loading of the get_tx.hoc, and then it seems to change g_pas_changeable but without implementing it for the simulations programmed inside the get_tx.hoc.
So at the first glance it seems to work correctly: it gives the set of electrotonic profiles, but then it turns out that all of them are the same - as the first one.
Is there any other way to load the same hoc-file several times so that it is executed with different values of internal parameters set outside (g_pas in this case)?
Thank you in advance for your answer