.PS cct_init # Usual defs... qrt=dimen_/4; hlf=dimen_/2; dim=dimen_; "$V_i$ " rjust_; dot; line right_ hlf Op1:opamp(right_,,,,P) with .In2 at Here line from Op1.In1 left_ qrt then up_ hlf; Rleft:Here diode(from Op1.Out right_); Rright:dot {capacitor(down_);rlabel(,10\mu,); ground} line right_ hlf; dot {resistor(down_); llabel(,10M,); line left_ hlf; dot} line right_ qrt; dot " $V_\mathrm{out}$" ljust_ I:line invis from Rleft to (Rright,Rleft) move to I.center then left_ hlf R:resistor(right_); llabel(,10k,) line from I.start to R.start; line from R.end to I.end line to Rright "\tiny PrecisionPeak" at (1.5*dim, -1*dim) rjust_ .PE