If I am not mistaken, Julia uses FFTW for FFT. I don't remember seeing anything in the FFTW manual about automatically doing zero-padded FFTs without manipulating the input data.
If you are not interested in speed and are only using FFT as a shorthand for the discrete Fourier transform (DFT), you could do the DFT with a DFT function of arbitrary frequency bin sampling or just run the transform manually. It will no longer be an O( N log N ) operation but it does avoid manually padding your original data vector and you can space the sampling of the transform as you need, e.g. oversampling the parts of the spectrum that you are interested in or leaving out the parts that you do not care about.
For example, to make the DFT matrix that samples at frequencies f
:
M = exp( -2im*pi * f/Fs * (0:N-1)' )
where Fs
is the sampling rate of the data vector and N
is the length of the data vector. f
is also a vector of frequency values. Apply with matrix multiplication:
y = M * x
If the DFT matrix gets too big, just apply each row of it in a loop.