First pass change to Compare_wave_sets, using the calculated coefficient
to determine results.  Untested changes, simple algorithm, to test if
working.