Added some code for doing peak detection, this is part of developing a
spice model for piezoelectric transducers.