A method includes transmitting into a heart of a patient multiple voltages using multiple respective surface-electrodes attached externally to the patient. Repeatedly per each region of a plurality of regions of the heart (i) multiple respective calibration-voltages are measured in the region; (ii) a respective partial sub-set of the surface-electrodes is selected for the region, whose corresponding calibration-voltages minimize a cost-function, wherein the cost-function includes a first term that depends on magnitudes of gradients of the measured calibration-voltages, and a second term that depends on correlations among the gradients; and (iii) the partial sub-set of surface-electrodes selected for the region, are recorded for use in a subsequent session; and, in the subsequent session, a position of a probe inserted into a given region of the heart is calculated based only on the sub-set selected for the given region.