You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steven and myself have been testing interpolation methods for the frequency to create smoother delay spectra in UVBeam. We have found that using a Fourier interpolation with a Gaussian taper gives us the best results at the center of the spectra, though we expect due to non-periodicity the method will perform poorly at the ends. That being said, because it performs so much better than spline interpolation in creating a smooth spectra, (about 4 orders of magnitude more than cubic interpolation), we would like Fourier interpolation as an option to interpolate the frequency. I have attached an image of the Fourier with Gaussian taper and with no taper compared to various spline interpolations below. To create this, we ran Fourier interpolation on the beam itself and then used "cubic" interpolation to run the simulation.
The method we used for the Fourier interpolation and Gaussian taper is shown here:
def fftinterp(y, m, taper=np.ones):
n = y.shape[-1]
tapered = y * taper(n)
X = np.fft.fft(tapered)
N = n * m
z = np.arange(N)/m
pad = np.zeros(y.shape[:-1]+(N,), dtype=complex)
pad[..., :n//2 + 1] = X[..., :n//2 + 1]
pad[..., -n//2:] = X[...,-n//2:]
X = np.fft.ifft(pad)
return z, X * m / taper(N)
We used n = 10 for this simulation to pad the interpolation. The default taper is none, or np.ones, but we substituted gauss=gausstaper(n) for better results. When adding this to the software, we may want to make Gauss taper the default, since no taper leads to very poor results, but other tapers may be affective as well.
The text was updated successfully, but these errors were encountered:
Steven and myself have been testing interpolation methods for the frequency to create smoother delay spectra in UVBeam. We have found that using a Fourier interpolation with a Gaussian taper gives us the best results at the center of the spectra, though we expect due to non-periodicity the method will perform poorly at the ends. That being said, because it performs so much better than spline interpolation in creating a smooth spectra, (about 4 orders of magnitude more than cubic interpolation), we would like Fourier interpolation as an option to interpolate the frequency. I have attached an image of the Fourier with Gaussian taper and with no taper compared to various spline interpolations below. To create this, we ran Fourier interpolation on the beam itself and then used "cubic" interpolation to run the simulation.
The method we used for the Fourier interpolation and Gaussian taper is shown here:
We used n = 10 for this simulation to pad the interpolation. The default taper is none, or
np.ones
, but we substitutedgauss=gausstaper(n)
for better results. When adding this to the software, we may want to make Gauss taper the default, since no taper leads to very poor results, but other tapers may be affective as well.The text was updated successfully, but these errors were encountered: