Design, construction and characterization of a lock-in amplifier for detector readout.