For the tmax calculation only the data points after the intervention should be used. In this example there is a placebo measurement which starts at -30 min with higher values then after the intervention at 0 min (resulting in negative tmax values).
This is basically a problem of how to handle the more special timecourses which are not classical pharmacokinetics.
~/git/pkdb_data$ upload_study -s studies/glucose/Hoogwerf1986/
INFO --------------------------------------------------------------------------------
INFO Upload studies/glucose/Hoogwerf1986/
INFO --------------------------------------------------------------------------------
INFO - 0.03 [s] : Created TSVs ['Fig1', 'Tab1']
INFO - 0.23 [s] : Upload references
INFO - 7.27 [s] : Upload files
INFO - 0.23 [s] : Upload core study
INFO - 0.50 [s] : Upload groups
INFO - 0.23 [s] : Upload individuals
WARNING
{
"calculated outputs": [
"{'mean': 'Numeric values need to be positive (>=0) for all measurement types except <[]>.', 'detail': {'mean': -0.25, 'unit': 'hour', 'measurement_type': tmax, 'calculated': True, 'tissue': <Tissue: Tissue object (5)>, 'method': None, 'substance': <Substance: glucagon>, 'group': <Group: Group object (1191)>, 'individual': None, 'study': <Study: Hoogwerf1986>}}"
]
}
ERROR UPLOAD ERROR (check errors and warnings)
For the tmax calculation only the data points after the intervention should be used. In this example there is a placebo measurement which starts at -30 min with higher values then after the intervention at 0 min (resulting in negative tmax values). This is basically a problem of how to handle the more special timecourses which are not classical pharmacokinetics.