psi_from_emittance further polished for error handling.