# Average waveform or calculated values?

1. Sep 23, 2012

### JaWiB

I have an experiment where I calculate a value based on a waveform acquired by a digitizing oscilloscope. Since the signal is very noisy, I need to average the results many times to get a reasonably accurate value for each measured data point. My question is how should I spend the time averaging (or whether it even matters). On the one hand, I can take many waveforms and then average them together (the digitizer has a function to do this). On the other hand, I could take one waveform and perform my calculation (roughly speaking, just a numerical integration over time) and average many results of the calculation.

It seems to me that both methods should be mathematically equivalent as basically a sum over integrals or an integral over sums, but I can't help but feel like I'm missing something.

2. Sep 24, 2012

### Number Nine

Do you know anything about the noise? High frequency noise can be attenuated by a variety of smoothing techniques.

How you approach this will depend on what kind of analysis you're doing, and what you know about the noise.

3. Sep 24, 2012

### JaWiB

Well, the primary issue is high frequency noise and it's probably due to a large number of things. The signal comes from a lock-in amplifier which already has a low-pass filter.

Perhaps it helps if I describe the calculation. The first half of the signal represents a measurement taken under one experimental condition while the second is taken under another condition. We integrate over part of the first half, and (ideally) the same part of the second half, and the final data point is the difference between those integrals. I can either do those integrals on a single waveform, or let the digitizer average a bunch of times and then do the integral. As far as I know, the other students in the lab have always done the latter--I just don't know if it matters.

4. Sep 24, 2012

### ImaLooser

Integration is a linear operator, so the sum of integrals is always the same as the integral of sums.