| CPC E21B 47/0228 (2020.05) [E21B 7/06 (2013.01); E21B 44/005 (2013.01); E21B 47/18 (2013.01); G01R 33/0017 (2013.01)] | 6 Claims |

|
1. A downhole tool comprising:
a magnetic field sensor deployed in a downhole tool body in sensory range of magnetic flux emanating from an intermittent source of electromagnetic interference;
a processor configured to:
cause the magnetic field sensor to make magnetic field measurements while the downhole tool is deployed in a wellbore;
compute a first average of the magnetic field measurements over a first time interval in which there is no EM interference;
compute a second average of the magnetic field measurements over a second time interval in which there is EM interference;
compute an interference offset as a difference between the first average and the second average; and
remove the interference offset from magnetic field measurements made during a subsequent period during which there is EM interference to compute compensated magnetic field measurements by computing a moving average of a sum of the magnetic field measurements and the offset.
|