Export a subset of loaded morphology
Posted: Tue Apr 26, 2016 12:35 am
I have a use case where I import a (large, complex) morphology from an swc file.
Then I have a procedure for pruning branches to make a simpler morphology. At the end of the day, I have a python list with of NEURON section objects (they are all connected and the list contains the root node).
Now I want to export a new morphology file with just this subset of sections. The exported file could also be swc, though I'm not attached to this (anything that is easily reimported back to NEURON would work fine for me). Is there an easy function/procedure to do this, or do I need to write my own swc parser? Thanks!
Then I have a procedure for pruning branches to make a simpler morphology. At the end of the day, I have a python list with of NEURON section objects (they are all connected and the list contains the root node).
Now I want to export a new morphology file with just this subset of sections. The exported file could also be swc, though I'm not attached to this (anything that is easily reimported back to NEURON would work fine for me). Is there an easy function/procedure to do this, or do I need to write my own swc parser? Thanks!