Data Set Averaging
This small utility will combine many f_sweep_tr.py output data sets into
one averaged file. Example: f_sweep_tr.py makes measurements every 50kHz in groups
of 11, then changes the gnuradio DUC/DDC center frequency and makes
another 11 measurements, changes DUC/DDC, etc. Any random noise and
pattern in the groups of 11 can be averaged out by making 11 test
runs, each with a 50Khz offset from the last. This is slow and tedious
(and should be automated!) but can produce a graph like this:
and a magnified section:
The code: merge_average_3.py
Usage: combine test run data sets into one concatenated file:
$ cat refl_open_1 refl_open_2 refl_open_3 refl_open_4 refl_open_5 refl_open_6 refl_open_7 refl_open_8 refl_open_9 refl_open_10 refl_open_11 > refl_open_sum
then run merge_average_3.py on it to conbine lines with the same frequency into
an averaged line for that one frequency:
$ ./merge_average_3.py refl_open_sum refl_open_avg
Then treat it as one smoothed data set. I have not determined if this
actually helps absolute accuracy yet, but the plots above are definitely smoother.