get_segment_arrows

ifermi.plot.get_segment_arrows(fermi_slice, spins, vector_spacing, vnorm, projection_axis)[source]

Get segment arrows from vector properties.

Parameters:
  • fermi_slice (FermiSlice) – The Fermi slice containing the isolines and properties.

  • spins (Collection[Spin]) – Spin channels from which to extract arrows.

  • vector_spacing (float) – The rough spacing between arrows. Uses a custom algorithm for resampling the Fermi slic to ensure that arrows are not too close together.

  • vnorm (float | None) – The value by which to normalize the vector lengths. For example, spin properties should typically have a norm of 1 whereas group velocity properties can have larger or smaller norms depending on the structure. By changing this number, the size of the vectors will be scaled. Note that the properties of two materials can only be compared quantitatively if a fixed values is used for both plots.

  • projection_axis (tuple[int, int, int] | None) – Projection axis that can be used to calculate the color of vector projects. If None, the norm of the properties will be used, otherwise the color will be determined by the dot product of the properties with the properties axis.

Return type:

list[tuple[ndarray, ndarray, ndarray]]

Returns:

The arrows, as a list of (starts, stops, intensities) for each face. The starts and stops are numpy arrays with the shape (narrows, 3) and intensities is a numpy array with the shape (narrows, ). The intensities are used to color the arrows during plotting.