make cart2sph work with scalars