I'm trying to not call the NEURON GUI in my simulation, but even if i don't import GUI (from neuron import gui) the window shows up.
I tried to run as python code_name.py -nogui and it has no effect either.
Disable NEURON GUI
Moderator: hines
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Disable NEURON GUI
What window are you referring to? The NEURON Main Menu toolbar, or something else (what something else?)? If it's just NEURON Main Menu, look for a statement that loads nrngui.hoc, and if you find it, comment it out and insert a statement that loads stdgui.hoc (yes I know that name sounds like something you don't want, but trust me, it won't create and of NEURON's GUI windows).
If you're executing somebody else's code, are you sure it doesn't contain some statement(s) that create one of NEURON's gui windows?
If you're executing somebody else's code, are you sure it doesn't contain some statement(s) that create one of NEURON's gui windows?
Re: Disable NEURON GUI
Hi Ted,
Yes im referring to the NEURON Main Menu. I'm using the following code:
Yes im referring to the NEURON Main Menu. I'm using the following code:
Code: Select all
import numpy
from matplotlib.pyplot import *
from neuron import h
from destexheCell import *
h.dt = 0.05
npoints = 5000
tstop = npoints * h.dt
h.runStopAt = tstop
h.steps_per_ms = 1/h.dt
h.celsius = 36
h.v_init = -70
cell = destexheCell()
fl = h.Gfluct2(cell.soma(0.5))
fl.std_e = 0.012
fl.std_i = 0.0264
v_vec = h.Vector()
t_vec = h.Vector()
v_vec.record(cell.soma(0.5)._ref_v)
t_vec.record(h._ref_t)
h.tstop = tstop
h.run()
savdata = h.File()
savdata.wopen('m_pot_python.dat')
for i in range(0, len(v_vec)):
savdata.printf("%f\n", v_vec[i])
plot(t_vec, v_vec, color = 'black')
xlabel('Tempo [ms]')
ylabel('Potencial de Membrana')
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Disable NEURON GUI
If you are starting NEURON from the command line, try calling nrniv instead of nrngui.
If that doesn't work, or if you are starting python and then importing neuron, check all of the code in your program and make sure that you change any statement that looks like
load_file("nrngui.hoc")
or
h.load_file("nrngui.hoc")
to
load_file("stdgui.hoc")
or
h.load_file("stdgui.hoc")
If that doesn't work, or if you are starting python and then importing neuron, check all of the code in your program and make sure that you change any statement that looks like
load_file("nrngui.hoc")
or
h.load_file("nrngui.hoc")
to
load_file("stdgui.hoc")
or
h.load_file("stdgui.hoc")