Merge branch 'develop' into feature/fastestchallenges
This commit is contained in:
@@ -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:
|
||||||
|
# newlen=int(tmax/2000.)
|
||||||
|
# newt = np.arange(newlen)*tmax/float(newlen)
|
||||||
|
# deltat = newt[1]-newt[0]
|
||||||
|
# else:
|
||||||
|
# newt = np.arange(0,tmax,10.)
|
||||||
|
# deltat = 10.
|
||||||
|
|
||||||
|
newlen = 1000
|
||||||
newt = np.arange(newlen)*tmax/float(newlen)
|
newt = np.arange(newlen)*tmax/float(newlen)
|
||||||
deltat = newt[1]-newt[0]
|
deltat = newt[1]-newt[0]
|
||||||
else:
|
|
||||||
newt = np.arange(0,tmax,10.)
|
|
||||||
deltat = 10.
|
|
||||||
|
|
||||||
dd = griddata(tt.values,
|
dd = griddata(tt.values,
|
||||||
dd.values,newt,method='linear',rescale=True)
|
dd.values,newt,method='linear',rescale=True)
|
||||||
|
|||||||
@@ -3480,7 +3480,7 @@ def interactive_windchart(id=0,promember=0):
|
|||||||
plot.xaxis.axis_label = "Distance (m)"
|
plot.xaxis.axis_label = "Distance (m)"
|
||||||
plot.yaxis.axis_label = "Wind Speed (m/s)"
|
plot.yaxis.axis_label = "Wind Speed (m/s)"
|
||||||
plot.y_range = Range1d(-7,7)
|
plot.y_range = Range1d(-7,7)
|
||||||
plot.sizing_mode = 'scale_both'
|
plot.sizing_mode = 'stretch_both'
|
||||||
|
|
||||||
|
|
||||||
plot.extra_y_ranges = {"winddirection": Range1d(start=0,end=360)}
|
plot.extra_y_ranges = {"winddirection": Range1d(start=0,end=360)}
|
||||||
|
|||||||
@@ -1987,6 +1987,7 @@ def plannedsession_view(request,id=0,userid=0):
|
|||||||
for record in vs:
|
for record in vs:
|
||||||
userid = record.userid
|
userid = record.userid
|
||||||
uu = User.objects.get(id=userid)
|
uu = User.objects.get(id=userid)
|
||||||
|
try:
|
||||||
w = Workout.objects.get(id=record.workoutid)
|
w = Workout.objects.get(id=record.workoutid)
|
||||||
wdict = {
|
wdict = {
|
||||||
'name': uu.first_name+' '+uu.last_name,
|
'name': uu.first_name+' '+uu.last_name,
|
||||||
@@ -2009,6 +2010,8 @@ def plannedsession_view(request,id=0,userid=0):
|
|||||||
wdict['coursecompleted'] = coursecompleted
|
wdict['coursecompleted'] = coursecompleted
|
||||||
|
|
||||||
ranking.append(wdict)
|
ranking.append(wdict)
|
||||||
|
except Workout.DoesNotExist:
|
||||||
|
pass
|
||||||
|
|
||||||
ranking = sorted(ranking, key=lambda k: k['time'])
|
ranking = sorted(ranking, key=lambda k: k['time'])
|
||||||
if ps.sessiontype == 'fastest_time':
|
if ps.sessiontype == 'fastest_time':
|
||||||
|
|||||||
Reference in New Issue
Block a user