kwant.plotter.current

kwant.plotter.current(syst, current, relwidth=0.05, **kwargs)[source]

Show an interpolated current defined for the hoppings of a system.

The system graph together with current intensities defines a “discrete” current density field where the current density is non-zero only on the straight lines that connect sites that are coupled by a hopping term.

To make this scalar field easier to visualize and interpret at different length scales, it is smoothed by convoluting it with the bell-shaped bump function f(r) = max(1 - (2*r / width)**2, 0)**2. The bump width is determined by the relwidth parameter.

This routine samples the smoothed field on a regular (square or cubic) grid and displays it using an enhanced variant of matplotlib’s streamplot.

This is a convenience function that is equivalent to streamplot(*interpolate_current(syst, current, relwidth), **kwargs). The longer form makes it possible to tweak additional options of interpolate_current.

Parameters:

syst : kwant.system.FiniteSystem

The system for which to plot the current.

current : sequence of float

Sequence of values defining currents on each hopping of the system. Ordered in the same way as syst.graph. This typically will be the result of evaluating a Current operator.

relwidth : float or None

Relative width of the bumps used to smooth the field, as a fraction of the length of the longest side of the bounding box.

**kwargs : various

Keyword args to be passed verbatim to kwant.plotter.streamplot.

Returns:

fig : matplotlib figure

A figure with the output if ax is not set, else None.

Previous topic

kwant.plotter.density

Next topic

kwant.plotter.bands

This Page