Private
Public Access
1
0

usersmooth

This commit is contained in:
Sander Roosendaal
2020-11-04 21:51:17 +01:00
parent d8c198f3b2
commit 33b4411a6f
5 changed files with 61 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ import pandas as pd
from scipy import optimize
from django.utils import timezone
from math import log10
from math import log10,log2
from rowers.mytypes import otwtypes,otetypes
nometrics = [
@@ -58,6 +58,7 @@ rowingmetrics = (
'mode':'both',
'type': 'basic',
'group':'basic',
'maysmooth': False,
'sigfigs': -1}),
('hr',{
@@ -68,6 +69,7 @@ rowingmetrics = (
'ax_max': 200,
'mode':'both',
'type': 'basic',
'maysmooth': False,
'group':'athlete',
'sigfigs':0,}),
@@ -80,6 +82,7 @@ rowingmetrics = (
'mode':'both',
'type': 'basic',
'sigfigs': 1,
'maysmooth': True,
'group': 'basic'}),
('velo',{
@@ -91,6 +94,7 @@ rowingmetrics = (
'default': 0,
'mode':'both',
'sigfigs': 1,
'maysmooth': True,
'type':'pro',
'group': 'basic'}),
@@ -113,6 +117,7 @@ rowingmetrics = (
'mode':'both',
'sigfigs': 1,
'type': 'basic',
'maysmooth': True,
'group':'basic'}),
('driveenergy',{
@@ -124,6 +129,7 @@ rowingmetrics = (
'mode':'both',
'sigfigs': 0,
'type': 'pro',
'maysmooth': True,
'group':'forcepower'}),
('power',{
@@ -135,6 +141,7 @@ rowingmetrics = (
'mode':'both',
'sigfigs': 0,
'type': 'basic',
'maysmooth': True,
'group':'forcepower'}),
('averageforce',{
@@ -145,6 +152,7 @@ rowingmetrics = (
'ax_max': 1200,
'mode':'both',
'sigfigs': 0,
'maysmooth': True,
'type': 'pro',
'group':'forcepower'}),
@@ -156,6 +164,7 @@ rowingmetrics = (
'ax_max': 1500,
'sigfigs': 0,
'mode':'both',
'maysmooth': True,
'type': 'pro',
'group':'forcepower'}),
@@ -167,6 +176,7 @@ rowingmetrics = (
'ax_max': 2.5,
'mode':'rower',
'sigfigs': 2,
'maysmooth': False,
'type': 'pro',
'group':'stroke'}),
@@ -177,6 +187,7 @@ rowingmetrics = (
'ax_min': 0,
'ax_max': 1,
'sigfigs': 2,
'maysmooth': True,
'mode':'both',
'type': 'pro',
'group': 'forcepower'}),
@@ -189,6 +200,7 @@ rowingmetrics = (
'ax_max': 1e5,
'sigfigs': 0,
'mode':'both',
'maysmooth': False,
'type': 'basic',
'group':'basic'}),
@@ -200,6 +212,7 @@ rowingmetrics = (
'ax_max': 1e5,
'mode':'both',
'sigfigs': 0,
'maysmooth': False,
'type': 'basic',
'group':'basic'}),
@@ -211,6 +224,7 @@ rowingmetrics = (
'ax_max': 4,
'default': 0,
'sigfigs': 2,
'maysmooth': True,
'mode':'both',
'type': 'pro',
'group': 'stroke'}),
@@ -225,6 +239,7 @@ rowingmetrics = (
'default': 0,
'sigfigs': 0,
'mode':'water',
'maysmooth': True,
'type': 'pro',
'group': 'stroke'}),
@@ -236,6 +251,7 @@ rowingmetrics = (
'ax_max': 20,
'default': 0,
'sigfigs': 1,
'maysmooth': True,
'mode':'water',
'type': 'pro',
'group': 'stroke'}),
@@ -248,6 +264,7 @@ rowingmetrics = (
'ax_max': 55,
'default': 0,
'sigfigs': 0,
'maysmooth': True,
'mode':'water',
'type': 'pro',
'group': 'stroke'}),
@@ -260,6 +277,7 @@ rowingmetrics = (
'ax_max': 30,
'default': 0,
'sigfigs': 1,
'maysmooth': True,
'mode':'water',
'type': 'pro',
'group': 'stroke'}),
@@ -272,6 +290,7 @@ rowingmetrics = (
'ax_max': 50,
'default': 0,
'sigfigs': 0,
'maysmooth': True,
'mode':'water',
'type': 'pro',
'group':'stroke'}),
@@ -285,6 +304,7 @@ rowingmetrics = (
'ax_max': 140,
'default': 0,
'sigfigs': 0,
'maysmooth': True,
'mode':'water',
'type': 'pro',
'group':'stroke'}),
@@ -299,6 +319,7 @@ rowingmetrics = (
'default': 0,
'sigfigs': 0,
'mode':'water',
'maysmooth': True,
'type': 'pro',
'group':'stroke'}),
@@ -311,6 +332,7 @@ rowingmetrics = (
'default': 1.0,
'sigfigs': 0,
'mode':'erg',
'maysmooth': True,
'type': 'pro',
'group':'stroke'}),
@@ -323,6 +345,7 @@ rowingmetrics = (
'default': 0,
'sigfigs': 0,
'mode':'water',
'maysmooth': True,
'type': 'pro',
'group':'forcepower'}),
@@ -334,12 +357,19 @@ rowingmetrics = (
'ax_max': 15,
'default': 0,
'sigfigs': 1,
'maysmooth': True,
'mode':'both',
'type': 'basic',
'group':'basic'}),
)
metricsdicts = {}
for key,dict in rowingmetrics:
metricsdicts[key] = dict
metricsgroups = list(set([d['group'] for n,d in rowingmetrics]))
dtypes = {}