Private
Public Access
1
0

reducing nr data

This commit is contained in:
Sander Roosendaal
2020-11-10 21:38:50 +01:00
parent cd91a75fa0
commit 2a325bae8a

View File

@@ -377,13 +377,19 @@ def getfastest(df,thevalue,mode='distance'):
if tt.max() < thevalue: if tt.max() < thevalue:
return 0 return 0
if tmax > 500000:
newlen=int(tmax/2000.) # if tmax > 500000:
newt = np.arange(newlen)*tmax/float(newlen) # newlen=int(tmax/2000.)
deltat = newt[1]-newt[0] # newt = np.arange(newlen)*tmax/float(newlen)
else: # deltat = newt[1]-newt[0]
newt = np.arange(0,tmax,10.) # else:
deltat = 10. # newt = np.arange(0,tmax,10.)
# deltat = 10.
newlen = 1000
newt = np.arange(newlen)*tmax/float(newlen)
deltat = newt[1]-newt[0]
dd = griddata(tt.values, dd = griddata(tt.values,
dd.values,newt,method='linear',rescale=True) dd.values,newt,method='linear',rescale=True)