Hi all, let me anticipate that I am a Perl novice. I am currently trying to port a python code, detailed here: https://github.com/tylerwmarrs/mass-ts/blob/master/mass_ts/_mass_ts.py, in particular the function mass(). I am using for this purpose the PDL::FFTW3 module. However, I am facing a lot of problems. First of all, look at this part of the python code:
X = np.fft.fft(x) Y = np.fft.fft(y) Y.resize(X.shape) Z = X * Y z = np.fft.ifft(Z) In perl, I am doing the following: my $target = PDL->new([@target]); my $t = rfft1($target); my $query = PDL->new([@query]); my $q= rfft1($query); my $p = Cmul($t, $q); my $p2 = ifft1($p); However, the result that I get is very different from the one I get in python. Notably, if instead of ifft1 I use irfft1(), the result I get in perl is identical to the "real" part that I get in python. Why is ifft1 returning a different result? Next problem I am encountering is, how can I slice part of a "complex" piddle? I could not find any function for that. Any help would be highly appreciated! Best, Daniel
_______________________________________________ pdl-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pdl-general
