Search found 96 matches

by ramcdougal
Tue Nov 14, 2017 8:15 am
Forum: NEURON + Python
Topic: Finding Neuron install prefix from Python
Replies: 2
Views: 8667

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: 0
Views: 12815

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: 10678

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: 14841

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: 7270

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: 6387

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: 6994

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: 7524

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: 7524

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...
by ramcdougal
Mon Jul 10, 2017 9:49 pm
Forum: NEURON + Python
Topic: Any simple way to identify parent segment of point porcess
Replies: 8
Views: 7524

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

There's nothing wrong with having multiple AMPA channels on the same segment. It's generally best to keep issues of numerics (e.g. discretization into segments) separate from the description of your model (e.g. what synapses are where). That way, you can change the mesh (e.g. increasing nseg to get ...
by ramcdougal
Mon Jul 10, 2017 2:47 pm
Forum: NEURON + Python
Topic: Section of source for h. NetCon() in Python
Replies: 2
Views: 7096

Re: Section of source for h. NetCon() in Python

Actually, the error is not related directly to the sec=celllist .soma; that was correct. The convention in the NEURON documentation (and many others) is that [ and ] in the syntax specification is used to indicate optional parameters... i.e. the stuff inside the brackets can be included or not. In y...
by ramcdougal
Tue Jul 04, 2017 2:00 pm
Forum: NEURON + Python
Topic: nseg not a USEPROPERTY
Replies: 8
Views: 7612

Re: nseg not a USEPROPERTY

NEURON's directory information is technically incomplete here, but please don't use section.diam as it is potentially confusing: diam is naturally a property of a segment not of a section, so reading section.diam will return the middle diameter and writing it will set all segments: >>> dend = h.Sect...
by ramcdougal
Mon Jun 26, 2017 1:57 pm
Forum: NEURON + Python
Topic: DIfferent results with Neuron + Python and with HOC
Replies: 3
Views: 7234

Re: DIfferent results with Neuron + Python and with HOC

In the Python version, your current clamp does not do what you think it does. You write: istim = h.IClamp(1.0, dend) which places the current clamp at soma(1) not dend(1). The correct (link to docs) thing to do is: istim = h.IClamp(dend(1)) What's going on? The "dend" parameter you're sending in is ...
by ramcdougal
Wed Jun 21, 2017 12:33 pm
Forum: Reaction-diffusion in NEURON
Topic: Running pde solver more than once
Replies: 4
Views: 6938

Re: Running pde solver more than once

I assume you're referring to the Scalar Bistable Wave example in the reaction-diffusion documentation. My guess is that you're putting the entire code into a single Jupyter cell and rerunning. Should this work? Yes, but apparently it's remembering parts of the configuration from one run to the next ...
by ramcdougal
Fri Jun 09, 2017 10:49 pm
Forum: NEURON + Python
Topic: Creating NetCon with null source in NEURON+Python
Replies: 8
Views: 7734

Re: Creating NetCon with null source in NEURON+Python

h.FInitializeHandler normally takes a function that is to be called whenever NEURON initializes; i.e. we would normally say def my_initializer(): # do stuff here... fih = h.FInitializeHandler(my_initializer) To handle situations where we want to always send the function an argument or arguments, ins...