Re: [Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Charles R Harris
On 8/29/07, Anne Archibald <[EMAIL PROTECTED]> wrote: > > On 29/08/2007, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > Is this also appropriate for the other FFTs? (inverse real, complex, > > > hermitian, what have you) I have written a quick hack (attached) that > > > should do just that res

Re: [Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Anne Archibald
On 29/08/2007, Charles R Harris <[EMAIL PROTECTED]> wrote: > > Is this also appropriate for the other FFTs? (inverse real, complex, > > hermitian, what have you) I have written a quick hack (attached) that > > should do just that rescaling, but I don't know that it's a good idea, > > as implemente

Re: [Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Charles R Harris
Hi Anne, On 8/29/07, Anne Archibald <[EMAIL PROTECTED]> wrote: > > On 29/08/2007, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > > What is going on is that the coefficient at the Nyquist frequency > appears > > once in the unextended array, but twice when the array is extended with > > zeros

Re: [Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Anne Archibald
On 29/08/2007, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > What is going on is that the coefficient at the Nyquist frequency appears > once in the unextended array, but twice when the array is extended with > zeros because of the Hermitean symmetry. That should probably be fixed in > the ups

Re: [Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Charles R Harris
On 8/29/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > > Anne, > > On 8/29/07, Anne Archibald <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > numpy's Fourier transforms have the handy feature of being able to > > upsample and downsample signals; for example the documentation cites > > irfft(rfft(

Re: [Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Charles R Harris
Anne, On 8/29/07, Anne Archibald <[EMAIL PROTECTED]> wrote: > > Hi, > > numpy's Fourier transforms have the handy feature of being able to > upsample and downsample signals; for example the documentation cites > irfft(rfft(A),16*len(A)) as a way to get a Fourier interpolation of A. > However, ther

[Numpy-discussion] Bug or surprising undocumented behaviour in irfft

2007-08-29 Thread Anne Archibald
Hi, numpy's Fourier transforms have the handy feature of being able to upsample and downsample signals; for example the documentation cites irfft(rfft(A),16*len(A)) as a way to get a Fourier interpolation of A. However, there is a peculiarity with the way numpy handles the highest-frequency coeffi