Search found 162 matches

by ramcdougal
Fri Mar 23, 2018 2:02 pm
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 6881

Re: Truncation of floats upon loading .hoc file from ipython

In Spyder, if you store the value of the diam3d call and print it later, does that work? I'm wondering if you're seeing a return status and not the diameter itself.
by ramcdougal
Fri Mar 23, 2018 1:56 pm
Forum: NEURON + Python
Topic: Accessing neuron vectors stored in a python list
Replies: 3
Views: 1799

Re: Accessing neuron vectors stored in a python list

A quick clarification:

The underlying issue was that vector.record returns a status (typically 1.0) and not the vector, so the original version was simply recording all the statuses and discarding the vectors.
by ramcdougal
Wed Mar 21, 2018 12:21 pm
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 6881

Re: Truncation of floats upon loading .hoc file from ipython

This is puzzling because when you use h.load_file, the Python interpreter plays literally no role in loading the morphology (it's all done by the HOC interpreter instead). I was, unfortunately, not able to quickly reproduce your issue (details below), but I did have to modify the code slightly to ge...
by ramcdougal
Mon Mar 12, 2018 6:04 pm
Forum: NEURON + Python
Topic: pdb.set_trace() gives Segmentation Fault
Replies: 1
Views: 1772

Re: pdb.set_trace() gives Segmentation Fault

pdb works for me with your script if you run it with python hh_example.py instead of using nrngui. Make sure the neuron libraries are on your PYTHONPATH. (There are subtle differences about how console input etc is handled when you launch with nrngui instead of python directly, that I suspect is re...
by ramcdougal
Tue Jan 30, 2018 6:51 pm
Forum: NEURON + Python
Topic: Need Help Locating File + NEURON not reflecting changes
Replies: 4
Views: 1908

Re: Need Help Locating File + NEURON not reflecting changes

You should see the changes if you do Tools - RunControl. Does the window that opens up look as you expect? Not seeing the changes in whatever you're running is actually a good thing. It suggests that the window you're looking at is from a ses file (do you have any of those?) and can thus be modified...
by ramcdougal
Tue Jan 30, 2018 4:14 pm
Forum: NEURON + Python
Topic: Need Help Locating File + NEURON not reflecting changes
Replies: 4
Views: 1908

Re: Python Installation Issues + Need Help Locating File

The import failure means that Python can't find the neuron module. The easiest way to fix this is to reinstall NEURON, and when prompted be sure to agree to let NEURON update your PATH and PYTHONPATH. (If you just click through the install, this doesn't happen. You could also set the values manually...
by ramcdougal
Tue Nov 14, 2017 8:15 am
Forum: NEURON + Python
Topic: Finding Neuron install prefix from Python
Replies: 2
Views: 11429

Re: Finding Neuron install prefix from Python

To find the install directory use h.neuronhome() . This does not require the environment variable to be set, but it returns the value of the environment variable if it is set. The interpretation of the result is slightly system dependent, so be sure to read the documentation. To find the version us...
by ramcdougal
Fri Oct 27, 2017 10:09 am
Forum: Reaction-diffusion in NEURON
Topic: Reaction-Diffusion in HOC
Replies: 5
Views: 17791

Reaction-Diffusion in HOC

The reaction-diffusion module can be used in HOC almost identically to how it is used in Python if you begin your HOC code with: objref pyobj, h, rxd { // load reaction-diffusion support and get convenient handles nrnpython("from neuron import h, rxd") pyobj = new PythonObject() rxd = pyobj.rxd h = ...
by ramcdougal
Tue Sep 05, 2017 3:33 pm
Forum: Suggestions and Feedback
Topic: Site docu bug. Mathjax can't be loaded at RXD tutorials.
Replies: 1
Views: 14789

Re: Site docu bug. Mathjax can't be loaded at RXD tutorials.

Thanks for bringing this to our attention.

MathJax disabled their old CDN which the Sphinx plugin used, but there's now a replacement. I'll try to switch in the next few days.

See: http://docs.mathjax.org/en/latest/start.html
by ramcdougal
Tue Aug 22, 2017 12:39 pm
Forum: MSWin
Topic: the Qt platform plugin
Replies: 20
Views: 25970

Re: the Qt platform plugin

Are you able to import neuron from the regular Python prompt?

If so, consider that as a work-around; i.e. launch your simulation through python instead of through NEURON. If not, that can be fixed by adjusting your PYTHONPATH and maybe NEURONHOME environment variables.
by ramcdougal
Thu Aug 03, 2017 12:20 pm
Forum: NEURON + Python
Topic: Memory problem
Replies: 3
Views: 9792

Re: Memory problem

At (90 s) * (1000 ms/s) * (10 timesteps/ms) * (2 values/timestep/cell) * (1500 cells) * (8 bytes/value), you're looking at 21.6 Gigabytes of data. If you're not preallocating with Vector.buffer_size, the story gets worse, since every time the vector fills up, it creates a new one (twice the size of ...
by ramcdougal
Mon Jul 31, 2017 1:45 pm
Forum: Reaction-diffusion in NEURON
Topic: Reaction Not Proceeding
Replies: 3
Views: 9481

Re: Reaction Not Proceeding

What operating system?

I just tried it on my Windows machine through Spyder, and it worked for me.

Could you try installing the latest alpha version (http://www.neuron.yale.edu/ftp/neuron/versions/alpha/) and seeing if that solves the problem?
by ramcdougal
Mon Jul 24, 2017 3:27 pm
Forum: NEURON + Python
Topic: Problem about NEURON+Python, using hoc file
Replies: 2
Views: 9540

Re: Problem about NEURON+Python, using hoc file

Most immediately, the problem is that in Python libnrnmech.so is failing to load, and without that the mod file mechanisms -- in particular StdwaSA -- are unavailable. Had it loaded successfully, you wouldn't have gotten the error "dlopen failed"; instead, you would have seen the same "additional me...
by ramcdougal
Thu Jul 13, 2017 12:04 am
Forum: NEURON + Python
Topic: Any simple way to identify parent segment of point porcess
Replies: 8
Views: 11432

Re: Any simple way to identify parent segment of point porce

The last point is quite dificalt to realize, specificaly in reconstructed morphology with many compartments. It would be very useful if I could reach segments inside a section, like this soma = h.Segment() soma.nseg = 3 soma[0].cm = 0.1 soma[1].cm = 0.2 soma[2].cm = 0.3 Same for point process: dend...
by ramcdougal
Wed Jul 12, 2017 11:51 pm
Forum: NEURON + Python
Topic: Any simple way to identify parent segment of point porcess
Replies: 8
Views: 11432

Re: Any simple way to identify parent segment of point porce

Unfortunately, your code will create 30 synapses with tiny step, which will be attached to just 3 compartments. Computational overhead will be 30/3 = 10! The add_syn function only creates at most one synapse per segment... so if nseg=3, then it creates at most three synapses. The trick is that it a...