Yeah, ok so `kwant.wavefunction(...)` returns a callable which you call
with a lead and you get back an array which we will call `wfs`. `wfs` is
a *2D* array, the first axis is the *mode number*, the second axis is
the *orbital number*. See the docs:
http://kwant-project.org/doc/1.0/reference/generated/kwant.solvers.default.wave_function
So you need to do:
wf = kwant.wave_function(fsys, energy=1.7, args=[par,])
wf0, wf1 = wavefunctions(0) # iterate over first (mode) axis
better_wf0 = site_indexer(wf0)
better_wf1 = site_indexer(wf1)
better_wf0(lat(1,0)) # returns a 4-element array
I checked it with your notebook and it works
Regards,
Joe