Methods and devices for magnetising permanent magnets