function Sp = compute_spectrum(res, res1, int_factor)
if nargin < 3
    int_factor = 2;
end
spect = res.';
spect = interp1(abs(spect(:)), 1:1/int_factor:length(spect(:)));
spect1 = res1.';
spect1 = interp1(abs(spect1(:)), 1:1/int_factor:length(spect1(:)));
spect1 = circshift(spect1, [0, 1]);
Spect = (spect + spect1)/2;
Sp = [Spect, Spect(end)];
