Search found 214 matches

by ramcdougal
Mon Jul 20, 2020 1:34 pm
Forum: NEURON + Python
Topic: color or color_list procedures in PlotShape
Replies: 5
Views: 479

Re: color or color_list procedures in PlotShape

Hmmm... looks like that example depends on a change introduced about a month ago... so it's available in the "pip install" version for mac/linux or the windows nightly build . (Don't try to pip install on Windows, that will give a VERY old version of NEURON.) Sorry about that. So I guess the best so...
by ramcdougal
Tue Jul 07, 2020 4:48 pm
Forum: NEURON + Python
Topic: color or color_list procedures in PlotShape
Replies: 5
Views: 479

Re: color or color_list procedures in PlotShape

Unfortunately the .plot for both matplotlib and plotly (available in 8.0 development version) does not currently support the .color or .color_list values and instead always color based on the value of some variable (v, by default). (Note that you can use .mark as in the documentation to highlight sp...
by ramcdougal
Mon Jul 06, 2020 9:28 am
Forum: NEURON Announcements
Topic: How to cite NEURON
Replies: 2
Views: 26861

Re: How to cite NEURON

Thanks for pointing this out.

The old link works now too.
by ramcdougal
Mon Jun 29, 2020 12:38 pm
Forum: NEURON + Python
Topic: Error recording channel current by passing string to Vector.record
Replies: 3
Views: 443

Re: Error recording channel current by passing string to Vector.record

Python provides a standard way of using a string to grab a property, namely the getattr function. e.g. if you have a section called soma and you wanted to get a pointer to a specific variable var from the 0.5 location, you could do ptr = getattr(soma(0.5).hh, f'_ref_{var}') Similarly, a second getat...
by ramcdougal
Mon Jun 29, 2020 10:32 am
Forum: Reaction-diffusion in NEURON
Topic: rxd.plugins interface in Neuron 7.7
Replies: 2
Views: 339

Re: rxd.plugins interface in Neuron 7.7

There was a significant revamp of the internals from 7.4 to 7.7 with the intent of speeding up calculations but it likely broke anything that depended on overriding internal functions. What kind of connections do you need? callbacks at each time step? reading and writing concentrations? do you need ...
by ramcdougal
Sun Jun 07, 2020 5:46 pm
Forum: UNIX/Linux
Topic: .mod files compilation issues
Replies: 4
Views: 3222

Re: .mod files compilation issues

Why did you compile NEURON from source?

Do you get this problem if you use the version from

Code: Select all

pip install neuron
How are you compiling the mod files? The x86_64 should appear in whatever folder you run nrnivmodl from.
by ramcdougal
Sun Jun 07, 2020 5:41 pm
Forum: MSWin
Topic: Windows 10, Permission Denied
Replies: 1
Views: 1609

Re: Windows 10, Permission Denied

You can't drop onto the main menu window directly, but I believe in Windows you can drop onto the icon . Three other options: (1) Select File - load hoc, change the filter from *.hoc to *.nrm, and then load your model that way. (2) type (using the correct filename): load_file("filename.nrm") (3) ope...
by ramcdougal
Mon Jun 01, 2020 1:44 pm
Forum: OS X
Topic: Syntax Warning
Replies: 1
Views: 913

Re: Syntax Warning

This is harmless. You can ignore it. Even though you're not using Python explicitly, NEURON will connect to Python to have it available (and Python is needed to enable certain functions). What happened was there was something in the NEURON internals that did not raise a Python warning until a change...
by ramcdougal
Mon Jun 01, 2020 1:35 pm
Forum: Other questions
Topic: loop structure
Replies: 3
Views: 691

Re: loop structure

You are creating a single file because your file creation is happening once, outside of the for loop. If you look at the Python example, you'll see I'm creating a new file every time with a different filename based on the trial number (trial0.csv, trial1.csv, trial2.csv, ...) You can generate filena...
by ramcdougal
Sat May 23, 2020 12:22 pm
Forum: Other questions
Topic: loop structure
Replies: 3
Views: 691

Re: loop structure

Python, HOC, and most programming languages use a for loop to run the same code a fixed number of times. e.g. in Python, we'd write for trial in range(100): # do stuff here and in HOC, we might write: for (trial = 0; trial < 100; trial += 1) { // do stuff here } NEURON provides the h.Random (or just...
by ramcdougal
Fri May 22, 2020 8:32 pm
Forum: UNIX/Linux
Topic: help installing on WSL
Replies: 1
Views: 454

Re: help installing on WSL

Simple work-around: don't compile NEURON yourself. :) BMTK supports all the way back to NEURON 7.4 which is almost 5 years old, and any guidance you're seeing about issues with NEURON and Anaconda (which we now explicitly suggest using in the NEURON quickstart guide ) pertains to old versions of NEU...
by ramcdougal
Tue May 12, 2020 1:06 pm
Forum: NEURON + Python
Topic: range morphology and mechanism syntax for sections in python
Replies: 9
Views: 1952

Re: range morphology and mechanism syntax for sections in python

Oof. My mistake. Ted is right, of course. The key thing I was missing is that the values should be set based on the position of the center of the segment, which means that they must be strictly inside the interval specified. I was effectively interpolating from the center of the first segment to the...
by ramcdougal
Tue May 12, 2020 9:08 am
Forum: NEURON + Python
Topic: range morphology and mechanism syntax for sections in python
Replies: 9
Views: 1952

Re: range morphology and mechanism syntax for sections in python

You'd have to do it with a for loop. Here's a generic function that does this for you: def range_assignment(sec, var, start, stop): """linearly assign values between start and stop to each segment.var in section""" import numpy as np for seg, val in zip(sec, np.linspace(start, stop, sec.nseg)): seta...
by ramcdougal
Fri May 08, 2020 5:02 pm
Forum: Other tools
Topic: convergence failed repeatedly or with |h|=hmin : err=-7
Replies: 1
Views: 655

Re: convergence failed repeatedly or with |h|=hmin : err=-7

The integration advance failed, even when it tried using a really tiny timestep. One possible cause of this is when some of your state variables have found themselves in an invalid place. You could try reducing the atol to see if that helps, because it'll force the system to more carefully track val...
by ramcdougal
Wed Apr 29, 2020 6:01 pm
Forum: NEURON + Python
Topic: using compiled mod files from python script in a different direcory
Replies: 2
Views: 1994

Re: using compiled mod files from python script in a different direcory

When you run nrnivmodl on macOS (and I assume Linux, but I didn't check), it puts the compiled version of the mod files in the x86_64/.libs/libnrnmech.so file. (You won't see this if you just do an "ls" because macOS and Linux hide file and folder names beginning with a . by default but you can see ...