FatBandsArea

class FatBandsArea(bands: BandsArea, data: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], labels: dict | None = None)

Band structure with data per k-point, like SOC or pDOS

Parameters:
bandsBandsArea

The bands on wich the data is written

dataarray_like

An array of values wich were computed as a function of the bands.k_path. It can be 2D or 3D. In the latter case each column represents the result of a different function applied to the same variable input.

labelsdict

Plot labels: ‘data’, ‘title’ and ‘columns’.

Attributes

callsig

data_area

energy_area

k_area

The area in the k-space

num_bands

Methods

_decorate_plot([point_labels, ax])

Decorate the band structure

_point_names(k_points)

area_to_list(data)

Convert the data to the list

colorbar(**kwargs)

Draw a colorbar with the label of Sweep.data

dos([energies, broadening])

Calculate the density of states as a function of energy

karea_to_kpath(k_area)

Convert the Area to the Path

line_plot([point_labels, ax, idx, plot_colorbar])

Line plot of the band structure with the color of the lines the data of the FatBands.

list_to_area(data)

Convert the list to the area

plot([point_labels, ax, band_index, colorbar])

Area plot of the selected band from the band structure

plot_bands(**kwargs)

Line plot of the band structure like in Bands.

plot_karea([point_labels])

Scatter plot of the k-area along which the bands were computed

plot_kpath([point_labels])

Quiver plot of the k-path along which the bands were computed

reduced([columns, orbitals, fill_other])

Return a copy where the data is summed over the columns

with_data(data)

Return a copy of this result object with different data

area_to_list(data: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) ndarray

Convert the data to the list

Parameters:
dataArrayLike

The data to convert.

colorbar(**kwargs)

Draw a colorbar with the label of Sweep.data

dos(energies: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None, broadening: float | None = None) Series

Calculate the density of states as a function of energy

\[\text{DOS}(E) = \frac{1}{c \sqrt{2\pi}} \sum_n{e^{-\frac{(E_n - E)^2}{2 c^2}}}\]

for each \(E\) in energies, where \(c\) is broadening and \(E_n\) is eigenvalues[n].

Parameters:
energiesarray_like

Values for which the DOS is calculated. Default: min/max from Bands().energy, subdivided in 100 parts [ev].

broadeningfloat

Controls the width of the Gaussian broadening applied to the DOS. Default: 0.05 [ev].

Returns:
Series
karea_to_kpath(k_area: Area) Path

Convert the Area to the Path

Parameters:
k_areaArea

The area in the k-space.

line_plot(point_labels: List[str] | None = None, ax: Axes | None = None, idx: int = 0, plot_colorbar: bool = True, **kwargs) LineCollection | None

Line plot of the band structure with the color of the lines the data of the FatBands.

Parameters:
point_labelsOptional[List[str]]

Labels for the k_points.

axOptional[plt.Axes]

The Axis to plot the bands on.

idxint

The i-th column to plot. Default: 0.

plot_colorbarbool

Show also the colorbar.

**kwargs

Forwarded to matplotlib.collection.LineCollection().

list_to_area(data: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) ndarray

Convert the list to the area

Parameters:
dataArrayLike

The data to convert.

plot(point_labels: List[str] | None = None, ax: Axes | None = None, band_index: int = 0, colorbar: bool = True, **kwargs) QuadMesh

Area plot of the selected band from the band structure

Parameters:
point_labelsOptional[List[str]]

Labels for the k_points.

axOptional[plt.Axes]

The Axis to plot the bands on.

band_indexint

The index of the band to plot. Default: 0.

colorbarbool

Show also the colorbar.

plot_bands(**kwargs) List[Line2D]

Line plot of the band structure like in Bands.

plot_karea(point_labels: List[str] | None = None, **kwargs) None

Scatter plot of the k-area along which the bands were computed

Combine with Lattice.plot_brillouin_zone() to see the path in context.

Parameters:
point_labelsOptional[List[str]]

Labels for the k-points.

**kwargs

Forwarded to scatter().

plot_kpath(point_labels: List[str] | None = None, **kwargs) None

Quiver plot of the k-path along which the bands were computed

Combine with Lattice.plot_brillouin_zone() to see the path in context.

Parameters:
point_labelsOptional[List[str]]

Labels for the k-points.

**kwargs

Forwarded to quiver().

reduced(columns: List[int] | None = None, orbitals: List[str] | None = None, fill_other: float = 0.0) FatBands

Return a copy where the data is summed over the columns

Only applies to results which may have multiple columns of data, e.g. results for multiple orbitals for LDOS calculation.

Parameters:
columnsOptional[List[int]]

The colummns to contract to the new array. The length of columns agrees with the dimensions of data.shape[2]. The value at each position corresponds to the new column of the new Series object

orbitals: Optional[List[str]]

Optional new list of entries for the orbitals label in labels

fill_otherfloat

In case an array is made with a new column, fill it with this value. Default: 0.

with_data(data: ndarray) FatBands

Return a copy of this result object with different data

property k_area: Area

The area in the k-space