BlueBrain / NeuroR

A collection of tools to repair morphologies
https://neuror.readthedocs.io/
GNU Lesser General Public License v3.0
9 stars 7 forks source link

Raise an Error if 0-length section is found at the soma #106

Closed FrancescoCasalegno closed 2 years ago

FrancescoCasalegno commented 2 years ago

This is related to #105.

Context

Currently, if a 0-length section is found at the soma, sanitize will drop the entire neurite that is attached to it.

This behavior is not what a normal user could expect, especially because there is no Warning or Error when this dropping takes place during sanitization and the user cannot know that this has happened.

Action

After discussions (@lidakanari @adrien-berchet @mgeplf @eleftherioszisis) we agreed that the solution would be to raise an informative Error (e.g. ValueError("Zero-length section found at the soma ...") and terminate the execution of sanitize.

eleftherioszisis commented 2 years ago

The proposal has been implemented in #107.