morph_tool.morphio_diff

Functionality that can be used to see if two morphologies are the same or not.

Functions

diff(morph1, morph2[, rtol, atol])

Returns a DiffResult object that is equivalent to True when morphologies differ.

Classes

DiffResult(is_different[, info])

An object that, when casted as a boolean, is equivalent to True when morphologies differ.

class morph_tool.morphio_diff.DiffResult(is_different, info=None)

An object that, when casted as a boolean, is equivalent to True when morphologies differ.

Additional information about why they differ is stored in DiffResult.info.

morph_tool.morphio_diff.diff(morph1, morph2, rtol=1e-05, atol=1e-08)

Returns a DiffResult object that is equivalent to True when morphologies differ.

Additional information about why they differ is stored in DiffResult.info Morphologies with different formats can be compared. Morphologies are considered different if one of the following property differ: - number of root sections - sections type - sections point array - sections diameter array - sections perimeter array - sections number of children The soma are NOT taken into consideration

Parameters
  • morph1 (str|morphio.Morphology|morphio.mut.Morphology) – a morphology

  • morph2 (str|morphio.Morphology|morphio.mut.Morphology) – a morphology

  • rtol (float) – the relative tolerance used for comparing points (see numpy.isclose help)

  • atol (float) – the absolute tolerance used for comparing points (see numpy.isclose help)