Formation of Magnesium Ions by Charge Transfer