Hi, Hugh,
Right now, the built-in fft code requires using separate variables to
contain the
real and imaginary components of the original array. For example, to
find the
Fourier transform of a real array $a nondestructively, one can:
$ai = zeroes $a;
$ar = copy $a;
fft($ar,$ai);
or
$aa = copy $a;
realfft($aa);
$ar = $a->(0:$a->dim(0)/2-1);
$ai = $a->($a->dim(0)/2:-1);
The FFTW stuff requires running dim 0 across (real,imaginary), so one
says
$result = fftw $cplx
where $cplx has size 2 in in the 0 dim. Different but also reasonable.
I'm not sure whether the complex handling has to be changed, but I
don't like that the built in fft stuff is automatically inplace. I've
been complaining about that for a long time, but since I'm finally
diving into the code I figure now's the time do something about it
(provided that nobody pipes up and complains). Certainly I'm open to
making the built-ins behave more like fftw if there's a desire to do so.
Cheers,
Craig
On Mar 27, 2009, at 10:29 AM, Hugh Sasse wrote:
> On Fri, 27 Mar 2009, Craig DeForest wrote:
>
>> I've been meaning to overhaul the internal FFT code for a long time,
> [...]
>>
>> What's the consensus on how to overhaul FFT'ing? I am hesitant to
>> ditch the internal FFT code entirely, because it's nice to have an
>> internal fallback from the rather nice FFTW library (and hence avoid
>> yet another dependency for basic operations like convolution).
>
>
> This isn't going to be consensus opinion, but I think complex numbers
> are pretty important to useful FFT code. You told me:
>
> CD> PDL::Complex was never fully implemented, in the sense of
> CD> overloading all the basic operators. Hence many operations will
> CD> "fall through" to the PDL implementation that is under the hood.
>
> slightly reformatted.
> See the thread starting
> Message-ID: <[email protected]
> >
>
> Maybe there's nothing that can be done to simplify this, but I thought
> It raise it given the opportunity.
>
> Hugh
>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl