Merge branch 'feature/fasterload' into develop
This commit is contained in:
@@ -106,7 +106,7 @@ from pandas.core.groupby.groupby import DataError
|
|||||||
|
|
||||||
def newtestpower(x):
|
def newtestpower(x):
|
||||||
try:
|
try:
|
||||||
if abs(x['testpower'] - x['testdup']) < 1:
|
if abs(x['testpower'] - x['testdup']) < 0.2:
|
||||||
return np.nan
|
return np.nan
|
||||||
except (AttributeError,TypeError):
|
except (AttributeError,TypeError):
|
||||||
return np.nan
|
return np.nan
|
||||||
@@ -198,7 +198,7 @@ def build_goldmedalstandards(workouts,kfitness):
|
|||||||
# fitnesses.append(np.nan)
|
# fitnesses.append(np.nan)
|
||||||
|
|
||||||
for w in workouts:
|
for w in workouts:
|
||||||
ids = [w.id for w in workouts.filter(date__gte=w.date-datetime.timedelta(days=90),
|
ids = [w.id for w in workouts.filter(date__gte=w.date-datetime.timedelta(days=42),
|
||||||
date__lte=w.date)]
|
date__lte=w.date)]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1652,15 +1652,26 @@ def performancemanager_view(request,userid=0,mode='rower',
|
|||||||
'dofatigue':dofatigue,
|
'dofatigue':dofatigue,
|
||||||
})
|
})
|
||||||
|
|
||||||
script, thediv, endfitness, endfatigue, endform, ids = performance_chart(
|
if not is_ajax:
|
||||||
theuser,startdate=startdate,enddate=enddate,
|
script, thediv, endfitness, endfatigue, endform, ids = performance_chart(
|
||||||
kfitness = kfitness,
|
theuser,startdate=startdate,enddate=enddate,
|
||||||
kfatigue = kfatigue,
|
kfitness = kfitness,
|
||||||
metricchoice = metricchoice,
|
kfatigue = kfatigue,
|
||||||
doform = doform,
|
metricchoice = metricchoice,
|
||||||
dofatigue = dofatigue,
|
doform = doform,
|
||||||
showtests = True,
|
dofatigue = dofatigue,
|
||||||
)
|
showtests = True,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
script, thediv, endfitness, endfatigue, endform, ids = performance_chart(
|
||||||
|
theuser,startdate=startdate,enddate=enddate,
|
||||||
|
kfitness = kfitness,
|
||||||
|
kfatigue = kfatigue,
|
||||||
|
metricchoice = metricchoice,
|
||||||
|
doform = doform,
|
||||||
|
dofatigue = dofatigue,
|
||||||
|
showtests = False,
|
||||||
|
)
|
||||||
|
|
||||||
ids = pd.Series(ids).dropna().values
|
ids = pd.Series(ids).dropna().values
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user