[Numpy-discussion] numpy.correlate with phase offset 1D data series

Ray Schumacher subscriber100 at rjs.org
Mon Mar 3 16:45:28 EST 2008


At 01:24 PM 3/3/2008, you wrote:
> > If you use 'same' or 'full' you'll end of with different
> >amounts of offset. I imagine that this is due to the way the data is padded.
> >The offset should be deterministic based on the mode and the size of the
> >data, so it should be straightforward to compensate for.

I agree

> > If I use a real time domain signal like
> >  http://rjs.org/Python/sample.sig fh = open(r'sample.sig','rb') s1 =
> > numpy.fromstring(fh.read(), numpy.int32) fh.close()
>
>When I download this, it's full of NaNs. There's either a problem in the way
>I downloaded it or in the uploaded file. You didn't by chance upload it as
>an ASCII file did you?

I just tested the URL myself with Firefox; it came down OK. It is a 
binary string from numpy.tostring(), 29,956 bytes of int32. It has a 
fundamental of 42 cycles in the data, and other fs of less power.
I just uploaded a http://rjs.org/Python/sample.csv version

Xie's 2D algorithm reduced to 1D works nicely for computing the 
relative phase, but is it the fastest way? It might be, since some 
correlation algorithms use FFTs as well. What does _correlateND use, in scipy?

Thanks,
Ray


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.3/1308 - Release Date: 3/3/2008 10:01 AM





More information about the NumPy-Discussion mailing list