Isoline#

class ifermi.slice.Isoline(segments, band_idx, properties=None)[source]#

Bases: MSONable

An isoline object contains line segments mesh and line properties.

Variables:
  • segments – A (n, 2, 2) float array of the line segments..

  • band_idx – The band index to which the slice belongs.

  • properties – An optional (n, …) float array containing segment properties as scalars or vectors.

property has_properties: float#

Whether the isoline has properties.

property properties_ndim: int#

Dimensionality of face properties.

property properties_norms: ndarray#

(m, ) norm of isoline properties.

sample_uniform(spacing)[source]#

Sample line segments uniformly.

See the docstring for ifermi.analysis.sample_line_uniform for more details.

Parameters:

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

Return type:

ndarray

Returns:

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

scalar_projection(axis)[source]#

Get scalar projection of properties onto axis.

Parameters:

axis (tuple[int, int, int]) – A (3, ) int array of the axis to project onto.

Return type:

ndarray