[chronojump] MIF time converted from microseconds to seconds



commit b0820576963fb527224ca7c5bece71582eeddfc9
Author: Xavier Padullés <x padulles gmail com>
Date:   Tue Sep 19 16:23:45 2017 +0200

    MIF time converted from microseconds to seconds

 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 162024c..c446326 100644
--- a/r-scripts/maximumIsometricForce.R
+++ b/r-scripts/maximumIsometricForce.R
@@ -88,7 +88,6 @@ getForceModel <- function(time, force, startTime, # startTime is the instant whe
                           fmaxi,           # fmaxi is the initial value for the force. For numeric purpouses
                           initf)              # initf is the sustained force before the increase
 {
-
         timeTrimmed = time[which(time == startTime):length(time)]
         forceTrimmed = force[which(time == startTime):length(time)]
         timeTrimmed = timeTrimmed -  startTime
@@ -103,7 +102,7 @@ getDynamicsFromLoadCellFile <- function(inputFile, averageLength = 0.1, percentC
 {
         originalTest = read.csv(inputFile, header = F, dec = op$decimalChar, sep = ";", skip = 2)
         colnames(originalTest) <- c("time", "force")
-        originalTest$time = as.numeric(originalTest$time)
+        originalTest$time = as.numeric(originalTest$time / 1000000)  # Time is converted from microseconds 
to seconds
         
         #Instantaneous RFD
         rfd = getRFD(originalTest)


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