Search found 5266 matches

by ted
Thu Aug 16, 2018 2:22 pm
Forum: Getting started
Topic: Save in a vector the Range graph that ModelView displays
Replies: 4
Views: 59

Re: Save in a vector the Range graph that ModelView displays

Here's a working example that should help you discover and fix the problem with your own code. load_file("nrngui.hoc") create soma, dend access soma connect dend(0), soma(1) soma.L = 12 dend.L = 60 forall nseg = 3 soma for (x,0) diam(x) = x*L dend for (x,0) diam(x) = x*L/10 objref rvp rvp = new Rang...
by ted
Thu Aug 16, 2018 1:13 pm
Forum: Getting started
Topic: Save in a vector the Range graph that ModelView displays
Replies: 4
Views: 59

Re: Save in a vector the Range graph that ModelView displays

I just did this now, starting with a graph that I created with the GUI that shows a plot of v vs. distance along a path in a model cell. First step was to discover the name of the RangeVarPlot. Big clue: it's not the name of the graph that shows the plot of v vs. distance--that's just an instance of...
by ted
Thu Aug 16, 2018 10:54 am
Forum: Getting started
Topic: simulation gamma rhythm and altering orientation tuning curves?
Replies: 1
Views: 19

Re: simulation gamma rhythm and altering orientation tuning curves?

i am wondering if it is possible to simulate the gamma rhythm (40-80Hz) of the LFP using visual stimulus of a population, where in the population i can control orientation tuning preference and width of the individual cells?
Sure. All you need is a model that generates gamma rhythm etc..
by ted
Thu Aug 16, 2018 10:51 am
Forum: Other questions
Topic: Passing an object parameter to execute() in a function
Replies: 5
Views: 69

Re: Passing an object parameter to execute() in a function

I beleive I understand. I cannot declare an objref in a function or porcedure To prevent any misunderstanding by others who may read this thread, here some things about objrefs to keep in mind (this information is all contained in the Programmer's Reference). 1. If a variable name is to be used as ...
by ted
Wed Aug 15, 2018 10:47 am
Forum: Other questions
Topic: Passing an object parameter to execute() in a function
Replies: 5
Views: 69

Re: Passing an object parameter to execute() in a function

A statement of the form foo = new Bar() creates an instance of the Bar class and tells hoc that foo refers to that instance. This objfunc baz() { . . . . . . foo = new Bar() . . . return foo } creates and returns an instance of the Bar class regardless of whether foo is an objref or a localobj.
by ted
Wed Aug 15, 2018 10:30 am
Forum: Other questions
Topic: Best Method
Replies: 1
Views: 42

Re: Best Method

The first question is whether your hypothesis, or the biological process that you are studying, requires you to do anything at all about ionic concentration. For most published models, the answer appears to be no; in such models, ionic concentrations and equilibrium potentials are assumed to be cons...
by ted
Mon Aug 13, 2018 10:14 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Computational Optogenetics: modelling ChR2 in NMODL
Replies: 2
Views: 56

Re: Computational Optogenetics: modelling ChR2 in NMODL

A very efficient way to deal with functions that consist entirely of straight line segments is to store just the coordinates of the breakpoints in the vectors, and use the Vector class's play method with interpolation. Example: This sequence of coordinates defines a ramp that begins at t = 0 and las...
by ted
Sat Aug 11, 2018 11:16 pm
Forum: Other questions
Topic: Passing an object parameter to execute() in a function
Replies: 5
Views: 69

Re: Passing an object parameter to execute() in a function

Forget your hypotheses about why your code didn't work--there were just too many syntax errors (for example, a variable cannot be declared to be an objref inside a procedure or function unless it has previously been declared to be an objref at the top level of the interpreter ("top level" means outs...
by ted
Sat Aug 11, 2018 9:38 am
Forum: NEURON hacks
Topic: how to read single line from a file in HOC
Replies: 3
Views: 60

Re: how to read single line from a file in HOC

String parsing is not hoc's long suit. Read everything you can about hoc's StringFunction class, and study the file-related methods mentioned in my previous post. If a possible solution doesn't jump out at you, then figure out some other way to do it. Python has powerful string parsing tools. Or may...
by ted
Fri Aug 10, 2018 11:46 am
Forum: NEURON hacks
Topic: how to read single line from a file in HOC
Replies: 3
Views: 60

Re: how to read single line from a file in HOC

Consider
scanf
scanstr
scantil
scanvar
or maybe even fscan.
Read about them in the Programmer's Reference.
by ted
Wed Aug 08, 2018 9:45 am
Forum: UNIX/Linux
Topic: upgrade problem in Ubuntu [SOLVED]
Replies: 3
Views: 52

Re: upgrade problem in Ubuntu

Which file did you use to install NEURON? nrn-7.6.1.x86_64-linux-py-36-35-27.deb, or nrn-7.6.1.tar.gz, both of which are locate in neuron.yale.edu/ftp/neuron/versions/alpha/ .
If you used the gzipped tar file, did an error message about ncurses appear during compilation?
by ted
Mon Aug 06, 2018 9:43 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Inconsistent units
Replies: 3
Views: 55

Re: Inconsistent units

The right hand side of the equation for o2o' is too complex for you to fix all possible units errors at one time. Deal with one major term at a time. First change o2o' = al*((1e4)*4*(ip)/(rho*diam*FARADAY)+ (1e4)*4*(igp)/(rho*diam*FARADAY)) + (D/delx2)*(o2-o2o) to : o2o' = al*((1e4)*4*(ip)/(rho*diam...
by ted
Sun Aug 05, 2018 9:43 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Inconsistent units
Replies: 3
Views: 55

Re: Inconsistent units

What is the error message?
by ted
Sun Aug 05, 2018 11:30 am
Forum: Other questions
Topic: Saving session doesn't save current plot correctly
Replies: 3
Views: 47

Re: Saving session doesn't save current plot correctly

I'm not sure I understand what you're doing that isn't working the way you expect. Maybe it would be useful to set up a Skype call with screen sharing so you can show me exactly what's going on. We're doing the NEURON course this week, so time will be tight from tomorrow (Monday, Aug. 6) through Sun...