numpy - convolve unevenly spaced vectors in scipy -
i have measured spectrum, i.e. 1d array spec spec.shape = (n, ). individual points correspond unevenly spaced wavelengths, stored in 1d array wl wl.shape = (n, ). need convolve spectrum gaussian function of predefined fwhm.
how can using numpy/scipy?
currently, have this:
fwhm = .22 gaussian_window = scipy.signal.gaussian(spec.size, std=fwhm/2.3548201) result = scipy.signal.fftconvolve(spec, gaussian_window) however, doesn't take account uneven spacing of input data @ all.
any appreciated :)
it sounds interpolate unevenly spaced input data onto uniform grid. if spectrum should smooth provided choose same grid used gaussian window should okay.
Comments
Post a Comment