generate_contours

FermiSurface.generate_contours(band_indices: list[list[int]] | None = None, interpolation=500, ignore_scalars: bool = False)[source]

Generate 2D Fermi surface contours for selected bands.

This method interpolates the band energies onto a regular grid in the kx-ky plane and extracts contour lines at the specified energy level (typically the Fermi energy). It supports selection of specific bands and spin channels, and can optionally ignore scalar values associated with the bands.

Parameters:
  • band_indices (list of list of int, optional) – List of band indices to include for each spin channel. If None, uses the bands identified by find_energy().

  • interpolation (int, optional) – Number of grid points along each axis for interpolation, by default 500.

  • ignore_scalars (bool, optional) – If True, scalar values (e.g., projections) are ignored in the output, by default False.

Returns:

dict – Dictionary containing interpolated band energies, spin-projected densities, and band labels for each spin channel.

Raises:

RuntimeError – If find_energy() has not been called prior to this method.