Towards sympathetic cooling of trapped ions with laser-cooled Mg +  ions for mass spectrometry and laser spectroscopy