text1r: add wavefunction calculation (untested)