Skip to Content
Back

Your first band diagram

Getting Started

Frequencies are returned in dimensionless units of c/ac/a, where aa is the lattice constant. The k-path is picked automatically from the lattice preset (Gamma,X,M,GammaGamma, X, M, Gamma for a square), and the returned freqs array always has shape (nk,nbands)(n_k, n_\text{bands}), sorted ascending in frequency at every k-point.

Explorer
first-band-diagram/
band_diagram.py
1import blaze
2
3# A square lattice of high-index rods in air.
4result = blaze.solve(
5    lattice_type="square",
6    epsilon_background=1.0,   # air
7    epsilon_atoms=8.9,        # dielectric rods
8    radius_atom=0.2,          # in units of the lattice constant a
9    polarization="TM",
10    n_bands=8,
11)
12
13print(result.freqs.shape)   # (n_kpoints, 8)
14print(result.k_labels)      # ['Γ', 'X', 'M', 'Γ']

Band diagram

Run the example to see the band diagram.

Result · BandResult

Run the example to inspect the result object.