only calculate phis and psis, not each matrix element