bmtk icon indicating copy to clipboard operation
bmtk copied to clipboard

Ensuring NEURON 3d() functions target the correct section.

Open aaberbach opened this issue 4 years ago • 0 comments

I was creating a cell model and came across an error in the following code:

https://github.com/AllenInstitute/bmtk/blob/022c24f6a3f318b66d1f9e1501bef1ed2741e1ef/bmtk/simulator/bionet/morphology.py#L51-L57

where the h.x3d(i, sec=sec) goes out of bounds. This was caused by the h.n3d() not accessing the correct section. When no sec is provided, NEURON uses a default section, and in this case, it was incorrect. Therefore, I went through bmtk and filled in sec=sec for these situations. This may not be necessary in all cases, but I think this is a situation where it is better to be safe than sorry.

aaberbach avatar Oct 16 '20 19:10 aaberbach