With a little modification, the basic precision rectifier can be used for detecting signal level peaks. In the following circuit, a capacitor retains the peak voltage level of the signal, and a switch is used for resetting the detected level. When the input Vin exceeds Vc (voltage across capacitor), the diode is forward biased and the circuit becomes voltage follower.