formatPsi function

Formats the output of psi.