Always remove the sensor first and replace it last when working on a wheel. Do not take a chance by leaving the sensor in place. It is fragile and expensive. The sensor is a magnet plus coil. The alternating steel then blank rectangles in the ring cause a pulse change in magnetic field as the field is stronger with the added steel and weaker at a blank hole. The field pulse translates to a power pulse in the sensor wires.