Why do we get ripples in the frequency spectrum of a chirp, and how do I remove it?
Another thing the OP can do is use the "complex" chirp. What you really have to do is (at two different times and both times sweeping all frequencies from -Nyquist through DC to +Nyquist) pass the real part, $x_r(t)=\cos(\pi \beta t^2)$ and then pass the imaginary part $x_i(t)=\sin(\pi \beta t^2)$ of the complex chirp through the material under test and synchronously measure the two real results ($y_r(t)$ and $y_i(t)$), then assemble them as the real and imaginary parts of the response.

Let
$$ \begin{align}
x(t) &amp; =  e^{j \pi \beta t^2} \\
&amp; = \cos(\pi \beta t^2) + j \sin(\pi \beta t^2) \\
&amp; = x_r(t) \qquad + j \ x_i(t) \\
\end{align} $$

Then
$$ X(f) \ \triangleq \ \mathscr{F}\left\{ x(t) \right\} \ = \ \sqrt{\frac{j}{\beta}} e^{-j\frac{\pi}{\beta} f^2} $$

You will see that $ |X(f)| = \sqrt{\frac{1}{\beta}} $ for all $f$.

The respective outputs that are synchronously measured with the two driving signals are $y_r(t)$ and $y_i(t)$:

$$ \begin{align}
y_r(t) &amp; \triangleq h(t) \circledast x_r(t) \\
 &amp; = h(t) \circledast \cos(\pi \beta t^2) \\
\\
y_i(t) &amp; \triangleq h(t) \circledast x_i(t) \\
 &amp; = h(t) \circledast \sin(\pi \beta t^2) \\
\end{align} $$

Then this aggregate complex output, $y(t)$, can be assembled (in the mind of the computer) from the responses of the cosine sweep (the real part) and the sine sweep (the imaginary part):

$$ \begin{align}
y(t) &amp; =  y_r(t) + j \ y_i(t) \\
&amp; = h(t) \circledast x_r(t) + j \ h(t) \circledast x_i(t) \\
&amp; = h(t) \circledast \left(x_r(t) + j \ x_i(t)\right) \\
&amp; = h(t) \circledast x(t) \\
&amp; = \int_{-\infty}^{+\infty} h(u) \, x(t-u) \ du \\
&amp; = \int_{-\infty}^{+\infty} h(u) \, e^{j \pi \beta (t-u)^2} \ du \\
&amp; = \int_{-\infty}^{+\infty} h(u) \, e^{j \pi \beta (t^2-2tu+u^2)} \ du \\
&amp; = e^{j \pi \beta t^2} \int_{-\infty}^{+\infty} \left(h(u) \, e^{j \pi \beta u^2}\right) \, e^{-j 2 \pi \beta t u} \ du \\
&amp; = e^{j \pi \beta t^2} \int_{-\infty}^{+\infty} \tilde{h}(u) \, e^{-j 2 \pi (\beta t) u} \ du \\
&amp; = e^{j \pi \beta t^2} \tilde{H}(\beta t) \\
\end{align} $$

where
$$ \tilde{H}(f) \triangleq \int_{-\infty}^{+\infty} \tilde{h}(t) e^{-j 2 \pi f t} \ dt = \mathscr{F}\left\{\tilde{h}(t) \right\} $$

and
$$ \tilde{h}(t) \triangleq h(t) e^{j \pi \beta t^2} $$

So this is what you get: first consider making this adjustment (dechirping) in the measured output:
$$ y(t) e^{-j \pi \beta t^2} = \tilde{H}(\beta t) $$

Now if the sweep rate $\beta$ is low enough, then $e^{j \pi \beta t^2} \approx 1$ for as long as $h(t)$ is not close to 0. Then $\tilde{h}(t) \approx h(t)$ and $\tilde{H}(f) \approx H(f)$ and $\tilde{H}(\beta t) \approx H(\beta t)$ and what you have measured in the output is another chirp, but with relative magnitude and phase changed by $\tilde{H}(\beta t) \approx H(\beta t)$.

Even if the sweep rate is not so low, you can compute either the true frequency response $H(f)$ by first computing

$$ \begin{align}
\tilde{h}(t) &amp; =  \mathscr{F}^{-1}\left\{ \tilde{H}(f) \right\} \\
&amp; = \int_{-\infty}^{+\infty} \tilde{H}(f) e^{j 2 \pi f t} df \\
&amp; = h(t) e^{j \pi \beta t^2} \\
\end{align} $$

Or from that result you can get the true impulse response $h(t)$ and then $H(f)$ if that's what you want. It should be the same $H(f)$ you would get if you divided $Y(f) = \mathscr{F}\left\{ y(t) \right\} $ by $X(f) = \mathscr{F}\left\{ x(t) \right\} = \sqrt{\frac{j}{\beta}} e^{-j\frac{\pi}{\beta} f^2}$. And there is no division by zero, because there are no ripples in $X(f)$ because the magnitude is a constant $\sqrt{\frac{1}{\beta}}$.

That is how to remove ripples (and any danger of division by zero) in the spectrum of a linearly-swept chirp.