Frequency response of Resample
serrano
Dear Igoristas,
A question from a user who is not very good at DSP: What is the frequency response of the Resample function with the default Hanning window? I'd like an analytical solution but googling did not get me very far.
A MWE:
#include <power spectral density>
Function MWE()
//Generate white noise data
Variable rate = 1e3 // e.g. 1kHz
Make/O/N=1e6 data = gnoise(1)
setscale/P x, 0, 1/rate, data
//Generate PSD
fPowerSpectralDensity(data,256,"Hann",1)
//Downsample and generate PSD of downsampled data
Variable factor=2
Duplicate/O data, data_res
Resample/DOWN=(factor) data_res //Hann window default
fPowerSpectralDensity(data_res,256/factor,"Hann",1)
End
Function MWE()
//Generate white noise data
Variable rate = 1e3 // e.g. 1kHz
Make/O/N=1e6 data = gnoise(1)
setscale/P x, 0, 1/rate, data
//Generate PSD
fPowerSpectralDensity(data,256,"Hann",1)
//Downsample and generate PSD of downsampled data
Variable factor=2
Duplicate/O data, data_res
Resample/DOWN=(factor) data_res //Hann window default
fPowerSpectralDensity(data_res,256/factor,"Hann",1)
End
Basically, I'd like to know the frequency-dependent ratio between data_psd and data_res_psd for a given sampling rate and a given factor, analytically. Can somebody please point me in the right direction?