Private
Public Access
1
0

some bug fixes

This commit is contained in:
Sander Roosendaal
2017-07-04 20:29:17 +02:00
parent 1fb7b99a7b
commit 6b5904ecf7
4 changed files with 19 additions and 3 deletions

View File

@@ -77,11 +77,14 @@ def geo_distance(lat1,lon1,lat2,lon2):
def isbreakthrough(delta,cpvalues,p0,p1,p2,p3,ratio):
pwr = p0/(1+delta/p2)
pwr += p1/(1+delta/p3)
pwr = abs(p0)/(1+(delta/abs(p2)))
pwr += abs(p1)/(1+(delta/abs(p3)))
pwr *= ratio
delta = delta.values
cpvalues = cpvalues.values
res = np.sum(cpvalues>pwr)
btdf = pd.DataFrame(
@@ -92,6 +95,7 @@ def isbreakthrough(delta,cpvalues,p0,p1,p2,p3,ratio):
}
)
btdf.sort_values('delta',axis=0,inplace=True)