Calcium and Magnesium are NOT ferrous, therefore, a Magnet is going to completely ignore them. However, a magnet could conceivably attract the ferrous oxide out of the water (rust) if that's any help.
Go for the ion exchange water softener. There is a post from a few weeks ago about how they work. I believe I called it Water Softeners 101.
© 2016 Renovate Your World LLC