BlueBrain / morph-tool

https://morph-tool.readthedocs.org/
GNU Lesser General Public License v3.0
8 stars 7 forks source link

📝 Improve morph-tool diff #44

Closed wizmer closed 3 years ago

wizmer commented 3 years ago

--rtol and --atol can now be passed to the CLI

to change the tolerances. See https://numpy.org/doc/stable/reference/generated/numpy.allclose.html

better logging

When two morphologies differ, it will report which index of the vector differs and the values that differ.

Example

$ morph-tool diff actual.h5 expected.h5 --rtol 0.1

INFO:morph_tool:Morphologies not identical
INFO:morph_tool:Attributes Section.diameters of:
Section(id=0, points=[(-5.006 -1.56494 -1.50834),..., (-17.1488 -8.69046 -6.10697)])
Section(id=0, points=[(-5.006 -1.56494 -1.50834),..., (-17.1488 -8.69046 -6.10697)])
have the same shape but different values
Vector diameters differs at index 1: 0.8771874904632568 != 0.48936277627944946