Пример #1
0
num = 4000
# da="centauriA1.dat"
# da="kepler1.dat"
# da="data0.dat"
subplot(2, 1, 1)
[x, y, z] = opendata.opendata(data=da)
y = submean.submean(y)
for i in range(len(x)):
    y[i] = float(y[i])
    x[i] = float(x[i]) * (3600 * 24)
    z[i] = 1 / float(z[i]) ** 2
z = None
nykvist = 1 / (2 * (x[2] - x[1]))
print nykvist
# [y,f]=aband.aband(x,y,1000,z,0.0001,0.0021,3,0.0005,0.0015)
[y] = aband.aband(x, y, z, num, 0.1 * nykvist, nykvist, 3, 3e-3, 4e-3)
[f, p, a, b] = aft.aft(x, y, z, 0.1 * nykvist, nykvist, num)
f = multiply(1000, f)
qq = []
uu = []
for i in range(10, len(f) / 10):
    qq.append(auto.auto(f, p, i))
    uu.append(i * (f[2] - f[1]))
q = 0
for i in range(len(qq)):
    if qq[i] > q:
        q = qq[i]
        ii = i
print "1"
print q
print ii
Пример #2
0
da="sol.dat"
num=5000
#da="centauriA1.dat"
#da="kepler1.dat"
#da="data0.dat"
[x,y,z]=opendata.opendata(data=da)
y=submean.submean(y)
for i in range(len(x)):
    y[i]=float(y[i])
    x[i]=float(x[i])#*(3600)
#    z[i]=1/float(z[i])**2
z=None
nykvist=1/(2*(x[2]-x[1]))
print nykvist
#[y,f]=aband.aband(x,y,1000,z,0.0001,0.0021,3,0.0005,0.0015)
[y]=aband.aband(x,y,z,num,0.1*nykvist,nykvist,2,0.4*nykvist,0.4*nykvist)
[f,p,a,b]=aft.aft(x,y,z,0.1*nykvist,nykvist,num)
f=multiply(1000,f)
subplot(3,3,1)

qq=[]
uu=[]
for i in range(10,len(f)/10): 
 qq.append(auto.auto(f,p,i))
 uu.append(i*(f[2]-f[1])) 


plot(p,f)
ylabel('correlation')
title('Low-pass 0.1-0.4 $f_{nykvist}$ Sun')
legend()
Пример #3
0
path="pictures/"
num=7000
#da="centauriA1.dat"
#da="kepler1.dat"
#da="data0.dat"
[x,y,z]=opendata.opendata(data=da)
y=submean.submean(y)
for i in range(len(x)):
    y[i]=float(y[i])
    x[i]=float(x[i])*(3600)*24
    z[i]=1/float(z[i])**2
#z=None
nykvist=1/(2*(x[2]-x[1]))
print nykvist
#[y,f]=aband.aband(x,y,1000,z,0.0001,0.0021,3,0.0005,0.0015)
[y]=aband.aband(x,y,z,num,0.1*nykvist,nykvist,3,0.0040,0.0045)
[f,p,a,b]=aft.aft(x,y,z,0.1*nykvist,nykvist,num)
f=multiply(1000,f)

qq=[]
uu=[]
for i in range(10,len(f)/10): 
 qq.append(auto.auto(f,p,i))
 uu.append(i*(f[2]-f[1]))

indexvalue=[] 
lv=0#qq[0]
for i in range(len(qq)):
 if qq[i] > lv and uu[i]>0.08 and uu[i]<0.2:
  lv=qq[i]
  indexvalue=i