Design of arbitrarily homogeneous permanent magnet systems for NMR and MRI: theory and experimental developments of a simple portable magnet.