Private
Public Access
1
0

added physics dept note taking

This commit is contained in:
Sander Roosendaal
2017-12-29 12:20:48 +01:00
parent 65364ec59a
commit acbe2d38d7
3 changed files with 30 additions and 24 deletions

View File

@@ -1585,13 +1585,13 @@ def interactive_cpchart(rower,thedistances,thesecs,theavpower,
background_fill_color='white',
text_color='black')
)
plot.add_layout(
Label(x=100,y=120,x_units='screen',y_units='screen',
text='Stayer Score (6min) '+str(stayerscore2)+'%',
background_fill_alpha=0.7,
background_fill_color='white',
text_color='black')
)
# plot.add_layout(
# Label(x=100,y=120,x_units='screen',y_units='screen',
# text='Stayer Score (6min) '+str(stayerscore2)+'%',
# background_fill_alpha=0.7,
# background_fill_color='white',
# text_color='black')
# )
cpdata = dataprep.fetchcperg(rower, theworkouts)
@@ -1640,25 +1640,26 @@ def interactive_cpchart(rower,thedistances,thesecs,theavpower,
plot.line('duration','power',source=sourcepaul,legend="Paul's Law")
plot.line('duration','power',source=sourcecomplex,legend="CP Model",
color='green')
plot.line('duration','fitpowerwc',source=sourcecomplex,
legend="World Class",
color='Maroon',line_dash='dotted')
if p1wc is not None:
plot.line('duration','fitpowerwc',source=sourcecomplex,
legend="World Class",
color='Maroon',line_dash='dotted')
plot.line('duration','fitpowerexcellent',source=sourcecomplex,
legend="90% percentile",
color='Purple',line_dash='dotted')
plot.line('duration','fitpowerexcellent',source=sourcecomplex,
legend="90% percentile",
color='Purple',line_dash='dotted')
plot.line('duration','fitpowergood',source=sourcecomplex,
legend="75% percentile",
color='Olive',line_dash='dotted')
plot.line('duration','fitpowergood',source=sourcecomplex,
legend="75% percentile",
color='Olive',line_dash='dotted')
plot.line('duration','fitpowerfair',source=sourcecomplex,
legend="50% percentile",
color='Gray',line_dash='dotted')
plot.line('duration','fitpowerfair',source=sourcecomplex,
legend="50% percentile",
color='Gray',line_dash='dotted')
plot.line('duration','fitpoweraverage',source=sourcecomplex,
legend="25% percentile",
color='SkyBlue',line_dash='dotted')
plot.line('duration','fitpoweraverage',source=sourcecomplex,
legend="25% percentile",
color='SkyBlue',line_dash='dotted')
script, div = components(plot)

View File

@@ -422,11 +422,16 @@ def handle_otwsetpower(self,f1, boattype, weightvalue,
progressurl += "/rowers/record-progress/"
progressurl += job_id
# determine cache file name
physics_cache = 'media/'+str(boattype)+'_'+str(int(weightvalue))
rowdata.otw_setpower_silent(skiprows=5, mc=weightvalue, rg=rg,
powermeasured=powermeasured,
progressurl=progressurl,
secret=secret
secret=secret,
usetable=True,storetable=physics_cache,
)
# save data

View File

@@ -7306,7 +7306,7 @@ def workout_stats_view(request,id=0,message="",successmessage=""):
# Normalized power & TSS
duration = datadf['time'].max()-datadf['time'].min()
duration /= 1.0e3
pwr4 = datadf['power']**(4)
pwr4 = datadf['power']**(4.0)
normp = (pwr4.mean())**(0.25)
if not np.isnan(normp):
ftp = float(r.ftp)