Control of relative positioning of the magnetic and optical transducers