kwant.plotter.
interpolate_density
(syst, density, relwidth=None, abswidth=None, n=9, mask=True)[source]¶Interpolate density in a system onto a regular grid.
The system sites together with a scalar for each site defines a “discrete” density field where the density is nonzero only at the site positions.
To make this vector field easier to visualize and interpret at different
length scales, it is smoothed by convoluting it with the bellshaped bump
function f(r) = max(1  (2*r / width)**2, 0)**2
. The bump width is
determined by the relwidth and abswidth parameters.
This routine samples the smoothed field on a regular (square or cubic) grid.
Parameters:  syst : A finalized system
density : 1D array of float
relwidth : float, optional
abswidth : float, optional
n : int
mask : Bool


Returns:  field : nd arraylike of float
box : sequence of 2sequences of float
