[chronojump] MIF. More accurate detection of the initial force



commit 93e835854ca99e628c8a65179d67dbcea890f666
Author: Xavier Padullés <x padulles gmail com>
Date:   Wed May 24 15:04:49 2017 +0200

    MIF. More accurate detection of the initial force

 r-scripts/maximumIsometricForce.R |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/r-scripts/maximumIsometricForce.R b/r-scripts/maximumIsometricForce.R
index 53a5d7e..acbd1ae 100644
--- a/r-scripts/maximumIsometricForce.R
+++ b/r-scripts/maximumIsometricForce.R
@@ -119,7 +119,7 @@ getDynamicsFromLoadCellFile <- function(inputFile, averageLength = 0.1, percentC
                 print("Not previos steady tension applied before performing the test")
                 return(NA)
         }
-        initf = mean(originalTest$force[1:(startSample - 10)]) #ATENTION. This value is different from f0.raw
+        initf = mean(originalTest$force[(startSample - 20):(startSample - 10)]) #ATENTION. This value is 
different from f0.raw
         fmax.raw = max(originalTest$force)
         
         #Trimming the data before and after contraction
@@ -131,7 +131,6 @@ getDynamicsFromLoadCellFile <- function(inputFile, averageLength = 0.1, percentC
         model = getForceModel(test$time, test$force, startTime, fmax.smoothed, initf)
         f.fitted = initf + model$fmax*(1-exp(-model$K*(originalTest$time - startTime)))
         
-        
         f0.raw = test$force[1]                                                       #Force at t=0ms. 
ATENTION. This value is different than initf
         f100.raw = test$force[which.min(abs(test$time - (startTime + 0.1)))]         #Force at t=100ms
         f100.fitted = model$fmax*(1 - exp( - model$K * 0.1)) + initf


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]