Search found 6058 matches

by ted
Wed Nov 30, 2022 1:43 pm
Forum: Optimization
Topic: how to address errno
Replies: 2
Views: 18

Re: how to address errno

The first thing to check is the NMODL source code. "For what?" you might ask. The list of possible problems includes typographical errors (e.g. using a minus sign instead of a plus), failure to include scale factors needed to resolve inconsistencies of units, algebraic formulas that are wr...
by ted
Wed Nov 16, 2022 1:34 am
Forum: NEURON + Python
Topic: recording delivered pulses using pulsedistrib.zip
Replies: 3
Views: 70

Re: recording delivered pulses using pulsedistrib.zip

First I would like to say that the syntax This works: from neuron import h soma = h.Section(name='soma') pstim = h.Ipulse2(soma(0.5)) "h.ipulse2(bs.soma(0.5))" gives error "hoc object doesn't have attribute ipulse2" which tells me that I am using the wrong syntax. True. The clas...
by ted
Tue Nov 15, 2022 11:46 am
Forum: NEURON + Python
Topic: recording delivered pulses using pulsedistrib.zip
Replies: 3
Views: 70

Re: recording delivered pulses using pulsedistrib.zip

Good questions. Before addressing them, I should mention that 1. you're asking about mechanisms that deliver a series of one or more current pulses at regular intervals 2. the source code for these mechanisms is in https://www.neuron.yale.edu/ftp/ted/neuron/pulsedistrib.zip 3. these mechanisms diffe...
by ted
Thu Nov 10, 2022 1:51 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: modlunit Conversion Factor
Replies: 2
Views: 96

Re: modlunit Conversion Factor

Rather than writing something from scratch, it is generally quicker and easier to proceed by modifying existing NMODL code that works properly, does something similar to what one wants, and follows best practices. Among the files included with NEURON's source code (downloadable as a zip file from ht...
by ted
Tue Nov 08, 2022 3:44 pm
Forum: NEURON + Python
Topic: Extracellular Stimuli with Python + Vector Play
Replies: 2
Views: 1191

Re: Extracellular Stimuli with Python + Vector Play

I suspect that each pass through the loop for seg in axon: potential = . . . discards the vector that was created on the previous pass, thus breaking vector play into the previous seg. See what happens if you change the loop to ffvecs = [] # a list to hold the forcing function vectors for seg in axo...
by ted
Tue Nov 08, 2022 3:31 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: modlunit Conversion Factor
Replies: 2
Views: 96

Re: modlunit Conversion Factor

This is a tough one--raises a lot of questions for me, even before we get to your question. Neiman et al. 2011 doesn't ring a bell. PubMed search wasn't helpful. Maybe something in that article would explain why it was necessary to express K current in terms of the GHK current equation, and why P is...
by ted
Wed Nov 02, 2022 3:28 pm
Forum: NEURON + Python
Topic: Depolarization step during voltage clamp
Replies: 4
Views: 87

Re: Depolarization step during voltage clamp

Sounds like the SEClamp's series resistance rs is too high for your particular model cell. Looking at the documentation of SEClamp I see that the default value of rs is not mentioned. Not a problem--it's very easy to discover. Start python, then execute the following commands at the python prompt fr...
by ted
Tue Nov 01, 2022 3:48 pm
Forum: NEURON + Python
Topic: Depolarization step during voltage clamp
Replies: 4
Views: 87

Re: Depolarization step during voltage clamp

The first question to ask yourself is: why use an instance of the VClamp class to do this? In the Programmer's Reference, note that VClamp https://nrn.readthedocs.io/en/latest/python/modelspec/programmatic/mechanisms/mech.html#VClamp is described as Two electrode voltage clamp. Last time I saw anyon...
by ted
Fri Oct 28, 2022 11:55 am
Forum: NEURON + Python
Topic: record calcium concentration only from pyramidal cells
Replies: 2
Views: 138

Re: record calcium concentration only from pyramidal cells

If I call"cai" in the mod file that calculates DSI, it appears to me, that I record the net calcium concentration in all cells (not just pyramidal cells) I don't see how this could possibly be a problem. A synaptic mechanism is usually implemented as a point process. A point process is at...
by ted
Tue Oct 25, 2022 12:34 pm
Forum: Other questions
Topic: List of all currents that comprise segment membrane current
Replies: 3
Views: 605

Re: List of all currents that comprise segment membrane current

when we use forward Euler's integration method Then you must be using some other program than NEURON. NEURON doesn't offer the option of forward Euler. NEURON's fixed time step integration methods are limited to implicit Euler (which is the default method and has first order numerical error) and tw...
by ted
Fri Sep 30, 2022 4:13 am
Forum: NEURON + Python
Topic: Insert an ion channel written in a .mod file
Replies: 8
Views: 606

Re: Insert an ion channel written in a .mod file

That's because you put the NMODL files in a directory other than the one that contains your hoc and Python files. When NEURON starts, it automatically looks in the current directory for a library of compiled mechanisms; under MSWin, that library is called nrnmech.dll. If that file is in some directo...
by ted
Tue Sep 20, 2022 12:19 am
Forum: MSWin
Topic: bash:........bad interepter. no such file or directory
Replies: 12
Views: 430

Re: bash:........bad interepter. no such file or directory

NEURON and Anaconda generally work well together under Windows. But who knows what conflicts might arise when multiple Python distributions are installed. I am sure that there are people who use other Python distributions with NEURON under Windows, and maybe some of them have multiple distributions ...
by ted
Mon Sep 19, 2022 10:38 pm
Forum: MSWin
Topic: bash:........bad interepter. no such file or directory
Replies: 12
Views: 430

Re: bash:........bad interepter. no such file or directory

Python version:3.9 What distribution? That is, who created the installer? python.org? Anaconda? Microsoft? Some other source? If that sounds like a strange question, read this: https://www.infoworld.com/article/3267976/12-pythons-for-every-programming-need.html And also: what version of Windows are...
by ted
Mon Sep 19, 2022 2:21 pm
Forum: MSWin
Topic: bash:........bad interepter. no such file or directory
Replies: 12
Views: 430

Re: bash:........bad interepter. no such file or directory

Which version of NEURON are you using, and exactly what version and distribution Python are you using? And what bash are you using--the one that comes with NEURON, or something else? And are you first starting a bash shell, and then executing the command
nrngui
at the bash prompt?
by ted
Fri Sep 16, 2022 12:20 pm
Forum: NEURON + Python
Topic: Insert an ion channel written in a .mod file
Replies: 8
Views: 606

Re: Insert an ion channel written in a .mod file

Which Python are you using? If you're using Anaconda, just open an Anaconda terminal (they probably call it a "shell") and use the commad line to do everything--cd to the directory that contains your source code, run nrnivmodl to compile mod files, execute nrngui someprogram.hoc or python ...