sample_line_uniform#

ifermi.analysis.sample_line_uniform(segments, spacing)[source]#

Sample line segments to a consistent density.

Note: the segments must be ordered so that they are adjacent.

Parameters:
  • segments (ndarray) – (n, 2, 2) float array of line segments.

  • spacing (float) – The desired spacing in Å^-1.

Return type:

ndarray

Returns:

A (m, ) int array containing the indices of uniformly spaced segments.