I will try to explain the maths (much as I can understand) behind the ripples seen with measurements that are not full range Nyquist (ie 0-24,000Hz for 48,000Hz sampling rate):
REW's uses a "refined" version of the measurement method called ESS (exponentially swept sine). While the exponentially swept sine signal formulated (in discrete terms) below is being played,
x(k)=sin(w1 x K / ln(w2/w1) x exp(k/K x ln(w2/w1)); k=0,....,K (w1,w2 angular frequencies)
the recorded signal is convolved with the time reversed and -6dB/octave damped (amplitude rolled off) version of that excitation signal. Then, linear impulse response is separated and most of the harmonic distortion is passed on to the non-causal part.
The sweep needs to begin and end in zero phase to minimize any ripples due to the boundary effects at the start and end points. To achieve this, there are two adjustments made:
1. Fix the start and end frequencies and end the sweep in exactly the Nyquist frequency (w2=PI),
2. Let the sweep span a "fixed" number of octaves (w1=PI/2^p) where p is the number of octaves
With these changes, the start and end phase becomes:
phase(0)=(PI x K) / (2^p x ln(2^p)), phase(K)=(PI x K) / (ln (2^p)
Choosing K = M x 2^(p+1) x ln (2^p) , where M is an integer ensures that both endpoints will have the correct phase. However, since K is discrete and integer, two different values are needed for it; one ideal according to the previous criterion, and one rounded to the nearest integer. Having two different K values causes a frquency stretch by a factor of Kideal / K which should also be compensated in the time inversed x(k). The error is typically in the order of 10^(-6):
fs 48,000
Kmax 480,000
p 10
Kideal 468,456.591
K 468,457
Kideal/K 0.999999126