A method, including advancing a guidewire having a first diameter through a patient lumen, the guidewire being tracked by an electromagnetic system and an impedance system. While advancing the guidewire, signals of both systems, that are generated in response to differing positions of the guidewire in the lumen, are recorded. The method includes recording correspondences between the signals at each of the differing positions. The method also includes withdrawing the guidewire from the lumen, and then advancing through the lumen a second guidewire, having a second diameter smaller than the first diameter, which is tracked by the impedance system. While advancing the second guidewire, a signal of the impedance system generated in response to advancement of the second guidewire in the lumen is received. The method includes applying the correspondences to the signal in order to determine a position of the second guidewire in the lumen.