An IMD may transition to an MRI mode automatically in response to detecting one or more conditions indicative of the presence of a strong magnetic field. Measuring the total current returned to the flight tube provides a useful indication of the total ion current in the ion beam leaving the flight tube as well as any electrons travelling back to, and being absorbed by, the flight tube. A first current route in which a direct current flows through the first diode and a second current route in which a direct current flows through the second diode are connected in parallel with each other. The LDL then compares that number to a preset threshold number. Nonlimiting examples of cyanide sources include amino acids such as glycine, alanine, and serine. In some instances the apparatus may be an accelerometer having two photodiodes formed on a silicon-on-insulator wafer with the photodiodes defined by one or more etched channels extending through the device layer of the SOI wafer.