What morphology is valid or invalid? NeuroM completely follows MorphIO in this question because NeuroM uses MorphIO for reading/writing of morphologies. The rule is be less rigid as possible. If there is a problem with morphology then NeuroM rather print a warning about instead of raising an error. If you want validate morphologies as strictly as possible then
import morphio morphio.set_raise_warnings(True)
This will make MorphIO (hence NeuroM as well) raise warnings as errors. You might want to skip some warnings at all. For example, zero diameter is ok to have in your morpology. Then you can:
try: morphio.set_raise_warnings(True) # warnings you are not interested in morphio.set_ignored_warning(morphio.Warning.zero_diameter, True) m = morphio.Morphology('path/to/morph') finally: morphio.set_ignored_warning(morphio.Warning.zero_diameter, False) morphio.set_raise_warnings(False)
For more documentation on that topic refer to https://morphio.readthedocs.io/en/latest/warnings.html.