Thanks for feedback, but I am still confused. Let me make an example: there are two leads 0 and 1, the lead 0 is filled more than lead 1; from the leads 0 there is an outgoing mode exp(i k x), which is normalized by flux in the leads; the wave function inside of the scattering region is psi = t exp (i k x) + r exp (-i k x)
What does the program give if the wave function is called with lead number 0? psi? (and when the leads have couple of modes, then psi[i] are sorted is some comfortable for the program way) or r exp (-i k x)?