LinearInterpolator

class ifermi.interpolate.LinearInterpolator(kpoints, data)[source]

Bases: object

Class to perform linear interpolation of periodic properties.

Parameters:
  • kpoints (ndarray) – The k-points in fractional coordinates as a numpy array. with the shape (nkpoints, 3). Note, the k-points must cover the full Brillouin zone, not just the irreducible part.

  • data (dict[Spin, ndarray]) – The data to interpolate. Should be given for spin up and spin down bands. If the system is not spin polarized then only spin up should be set. The data for each spin channel should be a numpy array with the shape (nbands, nkpoints, …). The values to interpolate can be scalar or multidimensional.

interpolate(spin, bands, kpoints)[source]

Get the interpolated data for a spin and series of bands and k-points.

Parameters:
  • spin (Spin) – The spin channel.

  • bands (ndarray) – A list of bands at which to interpolate.

  • kpoints (ndarray) – A list of k-points at which to interpolate. The number of k-points must equal the number of bands.

Returns:

A list of interpolated values.