recognize C2 Logbook summary
This commit is contained in:
BIN
logos/logofornk.psd
Normal file
BIN
logos/logofornk.psd
Normal file
Binary file not shown.
Binary file not shown.
@@ -178,36 +178,50 @@ def interactive_forcecurve(theworkouts):
|
|||||||
|
|
||||||
plot.add_layout(avf)
|
plot.add_layout(avf)
|
||||||
|
|
||||||
avflabel = Label(x=450,y=500,x_units='screen',y_units='screen',
|
peakflabel = Label(x=455,y=530,x_units='screen',y_units='screen',
|
||||||
|
text="Fpeak: {peakforceav:6.2f}".format(peakforceav=peakforceav),
|
||||||
|
background_fill_alpha=.7,
|
||||||
|
text_color='blue',
|
||||||
|
)
|
||||||
|
|
||||||
|
avflabel = Label(x=465,y=500,x_units='screen',y_units='screen',
|
||||||
text="Favg: {averageforceav:6.2f}".format(averageforceav=averageforceav),
|
text="Favg: {averageforceav:6.2f}".format(averageforceav=averageforceav),
|
||||||
background_fill_alpha=.7,
|
background_fill_alpha=.7,
|
||||||
text_color='blue',
|
text_color='blue',
|
||||||
)
|
)
|
||||||
|
|
||||||
catchlabel = Label(x=450,y=470,x_units='screen',y_units='screen',
|
catchlabel = Label(x=460,y=470,x_units='screen',y_units='screen',
|
||||||
text="Catch: {catchav:6.2f}".format(catchav=catchav),
|
text="Catch: {catchav:6.2f}".format(catchav=catchav),
|
||||||
background_fill_alpha=0.7,
|
background_fill_alpha=0.7,
|
||||||
text_color='red',
|
text_color='red',
|
||||||
)
|
)
|
||||||
|
|
||||||
finishlabel = Label(x=450,y=440,x_units='screen',y_units='screen',
|
peakforceanglelabel = Label(x=420,y=440,x_units='screen',y_units='screen',
|
||||||
|
text="Peak angle: {peakforceangleav:6.2f}".format(peakforceangleav=peakforceangleav),
|
||||||
|
background_fill_alpha=0.7,
|
||||||
|
text_color='red',
|
||||||
|
)
|
||||||
|
|
||||||
|
finishlabel = Label(x=455,y=410,x_units='screen',y_units='screen',
|
||||||
text="Finish: {finishav:6.2f}".format(finishav=finishav),
|
text="Finish: {finishav:6.2f}".format(finishav=finishav),
|
||||||
background_fill_alpha=0.7,
|
background_fill_alpha=0.7,
|
||||||
text_color='red',
|
text_color='red',
|
||||||
)
|
)
|
||||||
|
|
||||||
sliplabel = Label(x=450,y=410,x_units='screen',y_units='screen',
|
sliplabel = Label(x=470,y=380,x_units='screen',y_units='screen',
|
||||||
text="Slip: {slipav:6.2f}".format(slipav=slipav),
|
text="Slip: {slipav:6.2f}".format(slipav=slipav),
|
||||||
background_fill_alpha=0.7,
|
background_fill_alpha=0.7,
|
||||||
text_color='red',
|
text_color='red',
|
||||||
)
|
)
|
||||||
|
|
||||||
washlabel = Label(x=450,y=380,x_units='screen',y_units='screen',
|
washlabel = Label(x=460,y=350,x_units='screen',y_units='screen',
|
||||||
text="Wash: {washav:6.2f}".format(washav=washav),
|
text="Wash: {washav:6.2f}".format(washav=washav),
|
||||||
background_fill_alpha=0.7,
|
background_fill_alpha=0.7,
|
||||||
text_color='red',
|
text_color='red',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
plot.add_layout(peakflabel)
|
||||||
|
plot.add_layout(peakforceanglelabel)
|
||||||
plot.add_layout(avflabel)
|
plot.add_layout(avflabel)
|
||||||
plot.add_layout(catchlabel)
|
plot.add_layout(catchlabel)
|
||||||
plot.add_layout(sliplabel)
|
plot.add_layout(sliplabel)
|
||||||
@@ -234,6 +248,8 @@ def interactive_forcecurve(theworkouts):
|
|||||||
finishlabel=finishlabel,
|
finishlabel=finishlabel,
|
||||||
sliplabel=sliplabel,
|
sliplabel=sliplabel,
|
||||||
washlabel=washlabel,
|
washlabel=washlabel,
|
||||||
|
peakflabel=peakflabel,
|
||||||
|
peakforceanglelabel=peakforceanglelabel,
|
||||||
), code="""
|
), code="""
|
||||||
var data = source.data
|
var data = source.data
|
||||||
var data2 = source2.data
|
var data2 = source2.data
|
||||||
@@ -300,6 +316,8 @@ def interactive_forcecurve(theworkouts):
|
|||||||
finishlabel.text = 'Finish: '+finishav.toFixed(2)
|
finishlabel.text = 'Finish: '+finishav.toFixed(2)
|
||||||
sliplabel.text = 'Slip: '+slipav.toFixed(2)
|
sliplabel.text = 'Slip: '+slipav.toFixed(2)
|
||||||
washlabel.text = 'Wash: '+washav.toFixed(2)
|
washlabel.text = 'Wash: '+washav.toFixed(2)
|
||||||
|
peakflabel.text = 'Fpeak: '+peakforceav.toFixed(2)
|
||||||
|
peakforceanglelabel.text = 'Peak angle: '+peakforceangleav.toFixed(2)
|
||||||
|
|
||||||
source.trigger('change');
|
source.trigger('change');
|
||||||
""")
|
""")
|
||||||
|
|||||||
@@ -3734,6 +3734,13 @@ def workout_upload_view(request,message=""):
|
|||||||
fileformat = fileformat[2]
|
fileformat = fileformat[2]
|
||||||
os.remove(f_to_be_deleted)
|
os.remove(f_to_be_deleted)
|
||||||
|
|
||||||
|
if fileformat == 'c2log':
|
||||||
|
message = "This C2 logbook summary does not contain stroke data. Please download the Export Stroke Data file from the workout details on the C2 logbook."
|
||||||
|
url = reverse(workout_upload_view,
|
||||||
|
args=[str(message)])
|
||||||
|
response = HttpResponseRedirect(url)
|
||||||
|
return response
|
||||||
|
|
||||||
if fileformat == 'unknown':
|
if fileformat == 'unknown':
|
||||||
message = "We couldn't recognize the file type"
|
message = "We couldn't recognize the file type"
|
||||||
url = reverse(workout_upload_view,
|
url = reverse(workout_upload_view,
|
||||||
|
|||||||
Reference in New Issue
Block a user