I want to plot just a simple compartmental branch by using the command below(which was in the “User’s guide” ):
morpho=Section(n=5, diameter=[15, 5, 10, 5, 10, 5]*um, length=[10, 20, 5, 5, 10]*um)
without defining Soma I get an error that says: float division by zero
What you have already tried
I added Soma by :
morpho = Soma(diameter=3*um)
morpho.child=Section(n=5, diameter=[15, 5, 10, 5, 10, 5]*um, length=[10, 20, 5, 5, 10]*um)
and it got fixed. but I don’t want to have soma in my simulation. where did I make a mistake? and is it possible to have a simulation without soma? just a single dendritic branch?
Hi @shirin. The generate_coordinates method is meant to generate coordinates for an artificial morphology so that it “looks nice”. Admittedly it should not generate an error for a morphology that only has a single section, but in either case it will not be very useful. As a workaround, you can directly set coordinates yourself instead of specifying the length of your compartments:
Note that I also set the show_diameter option, otherwise you’d only see a simple line.
It is perfectly fine to have a simulation without the soma (like in a number of examples in the documentation, e.g. Example: cylinder — Brian 2 2.5.4 documentation), your problems are only related to plotting such morphologies.