The NEURON Book: errata and discussion

News about new releases of NEURON, bug fixes, development threads, courses/conferences/workshops, meetings of the NEURON Users' Group etc.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

The NEURON Book: errata and discussion

Post by ted »

The purpose of this thread is for discussion of The NEURON Book.

Readers are invited to report errors, suggested corrections, and questions about
possible errors. We are interested in any kinds of errors you may find, such as
simple typographical errors or misspellings
version-specific differences in syntax
out-and-out mistakes
Errata and corrections will be collected from time to time and posted on a special page
of NEURON's WWW site, which we will create in the near future.

We also welcome suggestions for improvements to the book, ranging from the
explanations and example code and figures, to topics you wish had been covered in
greater detail or which were somehow omitted from the book. These suggestions will
help us develop new documentation, and will help guide our design of future editions.
Last edited by ted on Sun Jul 09, 2006 1:05 am, edited 2 times in total.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

errata and suggestions

Post by ted »

Michael Hines reported the following:

Typos:
page 169

Code: Select all

second_ order_current
should not have a space.
page 346 line 8 and 9. the i686 directory should not have a "." in front of it.
page 402 second line after A1.15 should be t > 0 instead of t < 0.

Suggested change:
page 343 second line: called hoc (rhymes with "joke")

Suggested new material and other revisions:
Installing and web site.
Need to update gap point process, how to set weight in NetGUI tool.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Symptom: space and shape plots don't update at each step

Post by ted »

Figure 1.36 of The NEURON book shows how to use Keep Lines to capture a sequence
of snapshots of the spatial variation of membrane potential in a model cell. However,
clicking on Init & Run in the RunControl panel produces only two traces: one shows v at
the very start of the simulation, and the other shows it at the very end.

This problem occurs because of changes to NEURON that were made while the book
was already in press. The fix is to use
Tools / Movie Run
to bring up a Movie Run panel. Launch simulations by clicking on Init & Run in that
panel and space plots (and shape plots) will work fine. This calls the standard run
system's proc movierun()

This is discussed in more detail here
https://www.neuron.yale.edu/phpBB2/viewtopic.php?t=333
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Preventing oscillations when using Crank-Nicholson

Post by ted »

The penultimate line in the text box on page 70 should say
DT / DX^2 <= 1/2
i.e. to avoid oscillations when using the Crank-Nicholson method, DT/DX^2 should be
<= 1/2 (where DT = dt / tau_m and DX = dx / lambda).
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Page 247 paragraph 2 line 7

Post by ted »

Page 247 paragraph 2 line 7
"mass/time" should be "(amount of material)/time"
Last edited by ted on Sun Dec 03, 2006 4:28 pm, edited 1 time in total.
zotric
Posts: 6
Joined: Fri Dec 01, 2006 4:42 am

Error on page 145

Post by zotric »

In the examples starting on page 145:
"dend" should probably be replaced by "ap" throughout.
My version with a couple of annotated tests that I think make it a bit clearer:

Code: Select all

load_file("nrngui.hoc")

// TOPOLOGY

NDEND = 10

create soma, apical, ap[NDEND], oblique[NDEND]

access soma

  connect apical(0), soma(1)
  
  // Set up the first apical dendrite (ap) and oblique section
  connect ap[0](0), apical(1)
  connect oblique[0](0), apical(1)
  
  for i=1,NDEND-1 {
    connect ap[i](0), ap[i-1](1)
    connect oblique[i](0), ap[i-1](1)
}

Code: Select all

// This is meant to straighten the 'spine'
forall pt3dclear()

soma {
    pt3dadd(0,0,0,30)
    pt3dadd(30,0,0,30)
}

apical {
    pt3dadd(30,0,0,5)    //
    pt3dadd(40,20,0,5)  // end apical 10 units right of soma and 20 above (so we can see it)
}
    
for i=0, NDEND-1 {
    ap[i] {
        pt3dadd(40+i*15, 0, 0, 2)
        pt3dadd(40+(i+1)*15, 0, 0, 2) 
    }
    oblique[i] {
        pt3dadd(40+i*15, 0, 0, 1)
        pt3dadd(40+i*15, 15+5*i, 0, 1) // calculate y based on index
        pt3dadd(40+i*20, 15+10*i, 0, 1) // add another bit!
        }
}
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Error on page 145

Post by ted »

Thanks, zotric, it's good to know that somebody is reading this stuff closely and cares
enough to help us catch the inevitable mistakes. The original code that I used to
generate Figure 6.4 does not have this error.

I should mention that Listing 6.5 on page 145 contains an additional error, which only now
caught my eye: as Figures 6.4 and 6.5 suggest, apical was supposed to be the same
length as soma, i.e. 30 um (see Listings 6.6 and 6.7). The relevant statement in Listing
6.5 should have read

Code: Select all

apical { L = 30  diam = 5 }
That said, there is a problem with this bit of zotric's code:

Code: Select all

// This is meant to straighten the 'spine'
 . . .
apical {
    pt3dadd(30,0,0,5)    //
    pt3dadd(40,20,0,5)  // end apical 10 units right of soma and 20 above (so we can see it)
}
in that the length of apical will be 10*sqrt(5), not 30. Likewise, the lengths of the oblique
sections generated by

Code: Select all

for i=0, NDEND-1 {
 . . .
    oblique[i] {
        pt3dadd(40+i*15, 0, 0, 1)
        pt3dadd(40+i*15, 15+5*i, 0, 1) // calculate y based on index
        pt3dadd(40+i*20, 15+10*i, 0, 1) // add another bit!
        }
}
will not be the same as those of the corresponding obliques produced by the code in
Listings 6.5 - 6.7.

All of which is just another reminder of the fact that the more eyes that see source code,
the more likely it is that bugs will be detected.
zotric
Posts: 6
Joined: Fri Dec 01, 2006 4:42 am

Obliques

Post by zotric »

Thanks, Ted - I'm verymuch a beginner here.
Plus I was just Messing about with it - I'll check
the code carefully now.

David (Aka Zotric)
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

That's fine. Everyone is welcome to contribute to this discussion thread; the more errors
that are caught, the better for all readers of The NEURON Book.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Banner changes after adding new mechanisms with NMODL

Post by ted »

The discussion of NMODL at the start of chapter 9 should include this parenthetical
statement:
(see 12.1 The interpreter and 12.2 Adding new mechanisms to the interpreter).

At the end of the discussion in 12.2 Adding new mechanisms to the interpreter
should be this statement:
Regardless of the operating system, NEURON's banner (see 12.3.1 Starting and exiting
the interpreter
) will report the names of the mod files that have been compiled, e.g. under
Linux the message will be something like

Code: Select all

loading membrane mechanisms from /home/jdoe/myhoc/testi686/.libs/libnrnmech.so
Additional mechanisms from files
 foo.mod fap.mod zap.mod
Just after the banner on page 347, insert this parenthetical statement:
(plus a list of any mod files that have been compiled with NMODL--see 12.2 Adding new
mechanisms to the interpreter
)
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

When shape is defined by 3-D data, what does diam(x) mean?

Post by ted »

On page 108, the first sentence of paragraph 3 says
"When 3-D data points exist, the value returned by diam(x) is the diameter of a right cylinder
that would have the same length and area as the segment that contains x."
It should say this:
"When 3-D data points exist, the value returned by diam(x) is the average diameter over the
corresponding length of the 3-D model."
Phillips
Posts: 1
Joined: Fri Feb 16, 2007 4:32 pm

Suggested Correction

Post by Phillips »

I am currently working through this book to teach myself NEURON. I thought I would report a problem in Chapter 1. No where in the text or figures of Chapter 1 is the reader given the values for setting the lengths and diameters of the basilar, apical, and axon sections. As a result, when the code is run, you do not get the voltage output shapes shown in the graphs. When I got to Chapter 6 and the same example is rendered in hoc, I finally saw the lengths and diameters that were supposed to be used.
In future editions of this book, I recommend fixing this oversight as this can be very confusing to the reader/user.

But thanks for this great resource!
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Suggested Correction

Post by ted »

Phillips wrote:No where in the text or figures of Chapter 1 is the reader given the values for setting the lengths and diameters of the basilar, apical, and axon sections.
How about Table 1.1 on the top of page 4? Or is that too easily forgotten, when one is in the midst of all those procedural details that fill the subsequent pages?

In writing this kind of material, one is constantly having to decide which details are essential and which can be safely omitted. Every time I read through chapter 1, I wonder how anyone can make it from start to finish. Half of the time, my doubts are driven by the density of details, but on the other occasions it is because one or more of the instructions seem too vague.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Page 114: for (var) stmt vs. for (var, 0) stmt

Post by ted »

In an email to me, Christopher Kushmerick wrote:
> In section
> 5.6.4.1 (p114), you give two forms of the for loop, one that supposedly
> includes the nodes at 0 and 1 and the other that skips these nodes. But in
> the text the two forms are identical. Should the second case be:
>
> for (var,0) stmt

It should indeed. Thanks for pointing this out, Christopher!
Eric Thomson
Posts: 15
Joined: Thu Mar 02, 2006 11:18 am
Contact:

Re: Suggested Correction

Post by Eric Thomson »

ted wrote:How about Table 1.1 on the top of page 4? Or is that too easily forgotten, when one is in the midst of all those procedural details that fill the subsequent pages?
Working through it myself, I had the same question. Perhaps add '(see Table 1.2 for the other parameters)' as a reminder, either at the end of section 1.5.3.3 or in the legend for Figure 1.19.
Post Reply