In one example, wherein the device is a pacemaker or ICD and the fields are MRI fields, the device first detects the MRI system by sensing for any magnetic field, static or otherwise, that exceeds a predetermined MRI detection threshold, which is set based on the magnetic field strengths expected to be encountered during a typical MRI. If MRI fields are sensed, the device then determines whether t