[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to extract sequenced data from an array?
From: |
Ghostly |
Subject: |
Re: How to extract sequenced data from an array? |
Date: |
Fri, 31 Dec 2010 18:40:41 +0100 |
Data file would be large for upload even if properly compressed. Easy way to
gather similar data that comes to my mind, would involve creating 2-3 sec of
audio WAVE data and append it over itself couple of times, then load it as
array.
I solved the problem by using Python/Scipy:
----------------------------------------
#~ type(x) = numpy.array
for i in range(1, 1 + x.size/4):
if (x[0, 0] == x[::i, 0]).all():
sequence = x[:i]
break
----------------------------------------
I thought on Scipy/Numpy as I'm familiar with Python magic. Here Scipy is used
only to load data as 2D (2 column) array (Numpy array), but loop is in simple
Python code, which is reasonably fast with my data ans usage
Tips mentioned here like xcorr and others will be used at some point, but as I
already have solution to this problem I went ahead
Cheers, and thanks again for all replies
> Is it possible for you to publish this example of the real data? That
> would make it easier to test ideas for the solution.
- Re: How to extract sequenced data from an array?, (continued)
- Re: How to extract sequenced data from an array?, Francesco Potortì, 2010/12/23
- Re: How to extract sequenced data from an array?, Sergei Steshenko, 2010/12/22
- Re: How to extract sequenced data from an array?, new_user, 2010/12/22
- Re: How to extract sequenced data from an array?, Doug Stewart, 2010/12/22
- Re: How to extract sequenced data from an array?, Przemek Klosowski, 2010/12/22
- Re: How to extract sequenced data from an array?, Kim Hansen, 2010/12/31
- Re: How to extract sequenced data from an array?,
Ghostly <=
Re: How to extract sequenced data from an array?, veryhappy, 2010/12/23