The lock-in scan multiplies each signal sample by a reference sample and then adds the visible products. With four matching samples, every product is 1 and the correlation sum is 4; changing only the reference can weaken, cancel, or invert that sum. Real lock-in measurements depend on reference phase, sampling length, noise, bandwidth, calibration, finite records, and uncertainty.
Lock-in correlation is scanned across sample length and reference choice. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
A matching reference adds one product per sample
With four matching samples, every product is one and the correlation sum is four.
1+1+1+1=4
A longer matching run raises the correlation sum
When the reference matches every sample, correlation grows with the number of visible products.