added physics dept note taking
This commit is contained in:
@@ -1585,13 +1585,13 @@ def interactive_cpchart(rower,thedistances,thesecs,theavpower,
|
|||||||
background_fill_color='white',
|
background_fill_color='white',
|
||||||
text_color='black')
|
text_color='black')
|
||||||
)
|
)
|
||||||
plot.add_layout(
|
# plot.add_layout(
|
||||||
Label(x=100,y=120,x_units='screen',y_units='screen',
|
# Label(x=100,y=120,x_units='screen',y_units='screen',
|
||||||
text='Stayer Score (6min) '+str(stayerscore2)+'%',
|
# text='Stayer Score (6min) '+str(stayerscore2)+'%',
|
||||||
background_fill_alpha=0.7,
|
# background_fill_alpha=0.7,
|
||||||
background_fill_color='white',
|
# background_fill_color='white',
|
||||||
text_color='black')
|
# text_color='black')
|
||||||
)
|
# )
|
||||||
|
|
||||||
cpdata = dataprep.fetchcperg(rower, theworkouts)
|
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=sourcepaul,legend="Paul's Law")
|
||||||
plot.line('duration','power',source=sourcecomplex,legend="CP Model",
|
plot.line('duration','power',source=sourcecomplex,legend="CP Model",
|
||||||
color='green')
|
color='green')
|
||||||
plot.line('duration','fitpowerwc',source=sourcecomplex,
|
if p1wc is not None:
|
||||||
legend="World Class",
|
plot.line('duration','fitpowerwc',source=sourcecomplex,
|
||||||
color='Maroon',line_dash='dotted')
|
legend="World Class",
|
||||||
|
color='Maroon',line_dash='dotted')
|
||||||
|
|
||||||
plot.line('duration','fitpowerexcellent',source=sourcecomplex,
|
plot.line('duration','fitpowerexcellent',source=sourcecomplex,
|
||||||
legend="90% percentile",
|
legend="90% percentile",
|
||||||
color='Purple',line_dash='dotted')
|
color='Purple',line_dash='dotted')
|
||||||
|
|
||||||
plot.line('duration','fitpowergood',source=sourcecomplex,
|
plot.line('duration','fitpowergood',source=sourcecomplex,
|
||||||
legend="75% percentile",
|
legend="75% percentile",
|
||||||
color='Olive',line_dash='dotted')
|
color='Olive',line_dash='dotted')
|
||||||
|
|
||||||
plot.line('duration','fitpowerfair',source=sourcecomplex,
|
plot.line('duration','fitpowerfair',source=sourcecomplex,
|
||||||
legend="50% percentile",
|
legend="50% percentile",
|
||||||
color='Gray',line_dash='dotted')
|
color='Gray',line_dash='dotted')
|
||||||
|
|
||||||
plot.line('duration','fitpoweraverage',source=sourcecomplex,
|
plot.line('duration','fitpoweraverage',source=sourcecomplex,
|
||||||
legend="25% percentile",
|
legend="25% percentile",
|
||||||
color='SkyBlue',line_dash='dotted')
|
color='SkyBlue',line_dash='dotted')
|
||||||
|
|
||||||
|
|
||||||
script, div = components(plot)
|
script, div = components(plot)
|
||||||
|
|||||||
@@ -422,11 +422,16 @@ def handle_otwsetpower(self,f1, boattype, weightvalue,
|
|||||||
|
|
||||||
progressurl += "/rowers/record-progress/"
|
progressurl += "/rowers/record-progress/"
|
||||||
progressurl += job_id
|
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,
|
rowdata.otw_setpower_silent(skiprows=5, mc=weightvalue, rg=rg,
|
||||||
powermeasured=powermeasured,
|
powermeasured=powermeasured,
|
||||||
progressurl=progressurl,
|
progressurl=progressurl,
|
||||||
secret=secret
|
secret=secret,
|
||||||
|
usetable=True,storetable=physics_cache,
|
||||||
)
|
)
|
||||||
|
|
||||||
# save data
|
# save data
|
||||||
|
|||||||
@@ -7306,7 +7306,7 @@ def workout_stats_view(request,id=0,message="",successmessage=""):
|
|||||||
# Normalized power & TSS
|
# Normalized power & TSS
|
||||||
duration = datadf['time'].max()-datadf['time'].min()
|
duration = datadf['time'].max()-datadf['time'].min()
|
||||||
duration /= 1.0e3
|
duration /= 1.0e3
|
||||||
pwr4 = datadf['power']**(4)
|
pwr4 = datadf['power']**(4.0)
|
||||||
normp = (pwr4.mean())**(0.25)
|
normp = (pwr4.mean())**(0.25)
|
||||||
if not np.isnan(normp):
|
if not np.isnan(normp):
|
||||||
ftp = float(r.ftp)
|
ftp = float(r.ftp)
|
||||||
|
|||||||
Reference in New Issue
Block a user