A system, comprising: multiple surface-electrodes, which are attached externally to a patient and are configured to transmit multiple respective voltages into a heart of the patient; a processor, which is configured to: repeat per each region of a plurality of regions of the heart: (i) receiving multiple calibration-voltages measured in the region by an electrode carried by a calibration-tool; (ii) selecting for the region a respective partial sub-set of the surface-electrodes whose corresponding calibration-voltages minimize a cost-function, wherein the cost-function comprises 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) recording the partial sub-set of surface-electrodes, selected for the region, for use in a subsequent session; and receive multiple location measurements from a location-measuring system that tracks the calibration-tool at multiple locations in the heart, and derive respective relations between the multiple location measurements and respective sets of measured calibration-voltages; and in the subsequent session, calculate a position of a probe inserted into a given region of the heart, by: receiving multiple measured investigation-voltages using the probe; deriving an identity of the given region from the measured investigation-voltages and the derived relations; and calculating the position of the probe, based only on the measured investigation-voltages that originate from the surface-electrodes belonging to the sub-set selected for the given region. multiple surface-electrodes, which are attached externally to a patient and are configured to transmit multiple respective voltages into a heart of the patient; a processor, which is configured to: repeat per each region of a plurality of regions of the heart: (i) receiving multiple calibration-voltages measured in the region by an electrode carried by a calibration-tool; (ii) selecting for the region a respective partial sub-set of the surface-electrodes whose corresponding calibration-voltages minimize a cost-function, wherein the cost-function comprises 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) recording the partial sub-set of surface-electrodes, selected for the region, for use in a subsequent session; and receive multiple location measurements from a location-measuring system that tracks the calibration-tool at multiple locations in the heart, and derive respective relations between the multiple location measurements and respective sets of measured calibration-voltages; and in the subsequent session, calculate a position of a probe inserted into a given region of the heart, by: receiving multiple measured investigation-voltages using the probe; deriving an identity of the given region from the measured investigation-voltages and the derived relations; and calculating the position of the probe, based only on the measured investigation-voltages that originate from the surface-electrodes belonging to the sub-set selected for the given region. repeat per each region of a plurality of regions of the heart: (i) receiving multiple calibration-voltages measured in the region by an electrode carried by a calibration-tool; (ii) selecting for the region a respective partial sub-set of the surface-electrodes whose corresponding calibration-voltages minimize a cost-function, wherein the cost-function comprises 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) recording the partial sub-set of surface-electrodes, selected for the region, for use in a subsequent session; and (i) receiving multiple calibration-voltages measured in the region by an electrode carried by a calibration-tool; (ii) selecting for the region a respective partial sub-set of the surface-electrodes whose corresponding calibration-voltages minimize a cost-function, wherein the cost-function comprises 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) recording the partial sub-set of surface-electrodes, selected for the region, for use in a subsequent session; and receive multiple location measurements from a location-measuring system that tracks the calibration-tool at multiple locations in the heart, and derive respective relations between the multiple location measurements and respective sets of measured calibration-voltages; and in the subsequent session, calculate a position of a probe inserted into a given region of the heart, by: receiving multiple measured investigation-voltages using the probe; deriving an identity of the given region from the measured investigation-voltages and the derived relations; and calculating the position of the probe, based only on the measured investigation-voltages that originate from the surface-electrodes belonging to the sub-set selected for the given region. receiving multiple measured investigation-voltages using the probe; deriving an identity of the given region from the measured investigation-voltages and the derived relations; and calculating the position of the probe, based only on the measured investigation-voltages that originate from the surface-electrodes belonging to the sub-set selected for the given region.