Magnetometer calibration and field mapping through thin plate splines