Gaussian line profile using numeric python

John J. Lee phrxy at
Sat Mar 31 16:04:51 CEST 2001

On 30 Mar 2001, Konrad Hinsen wrote:

> "John J. Lee" <phrxy at> writes:
> > but you probably don't need to know in detail, it boils down to
> >
> > inv_FFT(FFT(data)*FFT(kernel))
> Except for zero-padding in case of non-periodic signals. That's why
> I always recommend to look at a detailed description before doing
> this; some of my colleagues keep telling me that FFT techniques "don't
> work", and I suspect this is the reason.


Yes.  And that's (IIRC) what Numeric's convolve() doesn't do quite as
generally as it might -- but there is (IIRC again) an XXX in the manual
somewhere that admits it.

Good old 'Numerical Recipes' has a reasonable description of the
accountancy for the various kinds of convolutions, as long as you've
grasped that you do inevitably lose some of your function to end effects
for non-periodic functions (as I didn't, to start with!).


More information about the Python-list mailing list