Most
nutrient manufactures design their
nutrients based on RO water, because the water quality of RO is much more consistent than tap, well or rain water. Not sure about Magnesium, but Calcium deficiencies are rarely due to a lack of Calcium in the nutrient solution. But rather are usually due to conditions that affect the plants ability to absorb the Calcium in the nutrient solution, so adding more doesn't change or fix the problem.