Lock-In is a sophisticated technique to distil signals from a noisy measurement by modulation of the signal and correlation to the modulation.
Yet, I am having problems in understanding the difference to background subtraction for the case of square wave modulation. In my understanding lock-in is then the integration of the product of the square wave modulated signal and the reference square wave. But this seems to me nothing but the subtraction of the average background signal from the average signal. Then lock-in would be just an automated background subtraction. What am I missing?