[chronojump] Fixed forceSensorCSVFixCalibration.py



commit bbab417f01d24b4ba38748837642a4f694ee2b72
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Sep 13 13:39:55 2022 +0200

    Fixed forceSensorCSVFixCalibration.py

 python-r-scripts/forceSensorCSVFixCalibration.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/python-r-scripts/forceSensorCSVFixCalibration.py 
b/python-r-scripts/forceSensorCSVFixCalibration.py
index c8c24368b..ebfcba4a6 100644
--- a/python-r-scripts/forceSensorCSVFixCalibration.py
+++ b/python-r-scripts/forceSensorCSVFixCalibration.py
@@ -9,8 +9,8 @@ for filename in listdir():
     df = pd.read_csv(filename, sep=";", decimal=",")
     for i, row in df.iterrows():
         current = float(df.at[i,'Force(N)'])
-        new = ((current -257.13) / 13.4) * 930.59 #obviously, change the values
+        new = ((current -257.13) * 13.4) / 930.59 #obviously, change the values
         df.at[i,'Force(N)'] = new
         #print("row: " + str(i) + "; current: " + str(current) + "; new: " + str(new))
     
-    df.to_csv("../forceSensorCSVFixCalibration_files_fixed/" + filename, sep=';', decimal=",")
+    df.to_csv("../forceSensorCSVFixCalibration_files_fixed/" + filename, sep=';', decimal=",", index=False)


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