I have found at least part of the answer. It seems, that it has to do with the number of samples. If the waveform contains too many samples, then the reference waveform gets reduced. Is that really necessary??