Optimize the SNR of a laser-scanning microscope with lock-in amplifiers

Improving the signal-to-noise ratio (SNR) is desirable for every laser-scanning microscopy application. It enables the observation of smaller changes or faster processes in a sample. This blog post explains how using a lock-in amplifier or a boxcar averager can boost the SNR compared to using a digitizer only. Furthermore, I elaborate on how modern lock-in amplifiers can recover various independent signals simultaneously by demodulating one signal at multiple frequencies—for example, capturing the signal from two Raman modes in parallel.

This blog post accompanies a presentation I gave at the Focus on Microscopy 2021 conference. The talk was recorded and the video is available on our YouTube channel: if you prefer watching over reading, take a look at the video here.


Laser-scanning microscopy schemes include many different techniques exploiting linear interaction like absorption microscopy to nonlinear interaction such as multi-photon microscopy or the Raman techniques, e.g. stimulated Raman scattering (SRS) or coherent anti-Stokes Raman (CARS) microscopy. While the type of physical interaction varies, the setups are very similar. Figure 1 depicts the two most typical schemes. In panel a), a standard laser-scanning microscope is shown: on the left is the laser as the light source. The light beam enters the microscope, in which the scanner advances the illuminated point on the sample in a systematic way. Typical techniques are sample scanners with stages, galvo mirrors scanning the sample line by line, or spinning disc scanners, enabling more complex measurement patterns. After the interaction of the laser beam with the sample, the outgoing light impinges onto a photodiode. The detection electronics, e.g. a digitizer, a lock-in amplifier, or a Boxcar averager, analyzes the resulting photoelectrons. The electronics capture the signal and depict the image using the spatial coordinates from the scanner data. When a lock-in amplifier or boxcar averager is used, a modulation mechanism is required, such as a chopper wheel, an acoustic-optic modulator (AOM), or an electro-optic modulator (EOM). Panel b) shows a microscope setup with pump-probe illumination used for SRS and CARS microscopy, for example. The laser has two output branches, the probe branch (in red) and the pump beam (in green). Only the pump branch is modulated and imprints this modulation onto the probe branch during the interaction process in the sample. After the microscope, the probe beam is detected with the photodiode (PD) and recorded with the lock-in amplifier. Naturally, there are many ways to improve the SNR of such a system. Here we focus only on the electronics. In the next section, I discuss the advantage of a lock-in measurement in contrast to a digitizer and explain why the technique is superior for achieving a high SNR.

Figure 1: Typical laser-scanning microscopy setups. a) Setup for multi-photon microscopy with laser illuminating the sample over a scanner (e.g., sample scanner, galvo scanner) into the microscope. After the sample, the photon flux is transferred with the PD and sent into the lock-in amplifier. b) Typical setup for pump-probe-based techniques, such as SRS or CARS imaging. The laser system provides a probe branch (orange line) and a pump branch (green line). The latter is modulated and then co-focused in the microscope with the probe beam into the sample. After the interaction, it is detected by a photodiode (PD) and analyzed with a lock-in amplifier.

Digitizer vs lock-in amplifier

Most often, digitizers are used to acquire data in laser-scanning microscopes. They are fairly simple to use and record multiple signals simultaneously, e.g. the optical signal and the associated coordinates from the scanning system. A typical resulting image is shown in Fig. 2a). The beads that are imaged can be identified, but the SNR is poor because the entire image is buried in noise. A lock-in amplifier, however, can recover an image with a much better SNR, as shows in Fig. 2b), starting with the very same signal and within the same measurement time window. The beads can be clearly identified now, and there is minimal visible noise. In summary, the digitizer captures much more noise than the lock-in amplifier.

For all the data in this blog post, the signals originate from an SRS measurement with typical signal power but were played back for demonstration purposes using an AWG. The advantage of the lock-in amplifier compared to the digitizer is not related to this signal procedure but is inherent to many signals. This becomes clear by looking at the underlying noise structure and the measurement filter functions of the different techniques.

Figure 2: Comparison of images captured with a) a digitizer and b) a lock-in amplifier in the same measurement time. In b), four beads are missing because they consist of a different material with another Raman response.

The typical noise structure in a laser-scanning microscopy measurement is depicted in Fig.3b). It consists, as most signals, of the typical combination of 1/f noise at lower frequencies shown as the grey area and a white noise floor independent of the frequency and shown in light blue. Additionally, multiple noise peaks typically come from a pickup, such as a power line or radio signals. To minimize the noise affecting a measurement, the use of filters is well-established. The filter function in the frequency domain must cover the entire signal bandwidth given by the scanning speed. For an image of 128×128 pixel and a frame rate of 10 Hz, it would be ~164 kHz. Both signal and noise components in this bandwidth contribute to the recorded signal. In the frequency domain, this corresponds to the cross-section of the filter functions (see the blue dashed line) and the noise floor.

The digitizer performs a measurement centered at 0 Hz with finite bandwidth. This contains a huge amount of noise, which is also apparent in the time-domain measurement result in Fig. 3 a). The measurement principle of the lock-in amplifier, on the contrary, allows for shifting the measurement to a frequency at which the noise floor is much lower. (For a detailed discussion, please see our white paper [1] and the blogposts [2-3]) Consequently, the noise contained in the same filter function at a different center frequency is characterized by much less noise (see the orange area). Shifted to even higher frequencies where the white noise floor dominates, it is only limited by the shot noise of the photon flux and, therefore, quantum-limited.

A comparison of the SNR for the different results within the same measurement time window is shown in the time domain in Fig. 3a). The digitizer measurement is shown in blue, whereas the lock-in amplifier measurements with increasing modulation frequency but identical measurement bandwidth are shown in yellow, green, and red. The advantage offered by the lock-in measurements is apparent. Of course, it is important to keep in mind that the comparison will always depend on the noise of the laser system and setup as well as on the detector in use.

Modern lock-in amplifiers can do more than simply reducing noise. They can demodulate one signal at multiple frequencies simultaneously and thus recover more information in a single measurement. I discuss this feature in the next section.

Figure 3: SNR comparison for different modulation frequencies. a) The amplitude of signal depicted over time. b) The power spectral density is depicted as a function of frequency. The typical noise has a 1/f component (grey area) that transitions into a white noise floor (light blue area). The same filter is depicted at three modulation frequencies, DC, f_1, and f_2. The colored filter areas display the amount of accumulated noise. The signal captured with the digitizer (blue line/area) exhibits significantly more noise than the others signals measured with a lock-in amplifier.

Capturing multiple images in parallel

Let’s imagine the following experiment: a sample is analyzed at two different Raman modes to characterize or distinguish between different materials. This is the case for an ensemble of beads containing both PMMA and PS beads, for instance. To record both in parallel, we can envision an extended measurement scheme based on the setup for pump-probe microscopy in Fig. 1b). Here, a second pump beam is added with a modulation frequency that differs from one of the first pump beams. Now both pump beams are spatio-temporally combined with the probe beam and focused onto the sample.

Figure 4: Schematic of a pump-probe microscopy setup with two pump branches (green and blue lines) modulated at different frequencies, and one probe branch from one laser system. All three are temporally overlapped and co-focused onto the sample. After the microscope, only the probe is detected and analyzed with detection electronics (such as a lock-in amplifier).

After the microscope, the probe beam is detected and fed into the lock-in amplifier as the two modulation frequencies and the coordinates of the scanner. For the measurement, the wavelength difference of the first pump beam is tuned to be resonant with the Raman mode of PMMA, while the second pump beam is set so that it is resonant with the Raman mode of PS. The probe beam carries the information of the amount of PMMA at modulation frequency f1, and for PS at modulation frequency f2. Demodulating the signal from the photodiode at the two frequencies in parallel enables the perfectly parallel recording of sample images at two distinct Raman modes, as displayed in Fig. 5.

Figure 5: Simultaneous image recording, in real time, of an ensemble of mixed PMMA and PS beads with an image acquisition line by line. On the left, only PMMA beads are visible. In the middle, only PS beads are visible. On the right, the cuts at both images at the blue and orange lines are shown and indicate how close both species are to one another.

The plot in Fig. 5 (to the right) shows the cut along the blue and orange lines in the images. The perfect alignment of the two datasets is clear. Taking two complementary datasets at the same time is advantageous as it prevents any change in the parameters between the two measurements. This is even more important for investigating processes that take place on the time scale of only a few seconds.

To summarize, a lock-in amplifier can improve the SNR of a laser scanning microscopy system. Furthermore, a modern lock-in amplifier can help to incorporate innovative measurement schemes, for example, dual pump-probe Raman microscopy. But there is more that can help you optimize your measurements, such as direct sideband modulation [4] or the use of a boxcar averager [5] and the correct setting of the lock-in amplifier filter [6]. Please contact me and my colleagues to discuss more.



[1] White paper Principles of Lock-In Detection

[2] Blogpost Mehdi Alem, Time-Domain Response of Lock-in Filters

[3] Blogpost Mehdi Alem, Frequency-Domain Response of Lock-in Filter

[4] YouTube, Squeeze More out of your Measurement with Lock-in amplifiers

[5] YouTube, Focus on Recovering Signals in Optical Experiments

[6] YouTube, Low-pass filter settings done right