AFQ.recognition.curvature#

Module Contents#

Functions#

sl_curve(sl, n_points)

Calculate the direction of the displacement between

sl_curve_dist(curve1, curve2)

Calculate the mean angle using the directions of displacement

AFQ.recognition.curvature.sl_curve(sl, n_points)[source]#

Calculate the direction of the displacement between each point along a streamline

Parameters
sl2d array-like

Streamline to calcualte displacements for.

n_pointsint

Number of points to resample the streamline to

Returns
2d array of shape (len(sl)-1, 3) with displacements
between each point in sl normalized to 1.
AFQ.recognition.curvature.sl_curve_dist(curve1, curve2)[source]#

Calculate the mean angle using the directions of displacement between two streamlines

Parameters
curve1, curve22d array-like

Two curves calculated from sl_curve.

Returns
The mean angle between each curve across all steps, in radians