[chronojump] graph.R writeCurves don't prints unneded data
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] graph.R writeCurves don't prints unneded data
- Date: Fri, 17 Jul 2015 16:28:33 +0000 (UTC)
commit 9759f74edb845f7edba19de97d0b5e5b67f558f0
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Jul 17 18:27:21 2015 +0200
graph.R writeCurves don't prints unneded data
encoder/graph.R | 21 ++++++++++++---------
encoder/util.R | 4 +++-
src/gui/encoderTreeviews.cs | 5 +----
3 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 673549c..13426fd 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -2892,36 +2892,39 @@ doProcess <- function(options)
}
if(op$Analysis == "curves" || writeCurves) {
+ #this columns are going to be removed from paf:
+ pafCurves <- subset( paf, select = -c(mass, massBody, massExtra, laterality,
inertiaMomentum) )
+
if(singleFile)
- paf = cbind(
+ pafCurves = cbind(
"1", #seriesName
"exerciseName",
op$MassBody,
op$MassExtra,
curves[,1],
- curves[,2]-curves[,1],position[curves[,2]]-curves[,3],paf)
+ curves[,2]-curves[,1],position[curves[,2]]-curves[,3],pafCurves)
else {
if(discardingCurves)
curvesHeight = curvesHeight[-discardedCurves]
- paf = cbind(
+ pafCurves = cbind(
curves[,9], #seriesName
curves[,4], #exerciseName
curves[,5], #massBody
curves[,6], #massExtra
curves[,1],
- curves[,2]-curves[,1],curvesHeight,paf)
+ curves[,2]-curves[,1],curvesHeight,pafCurves)
}
- colnames(paf)=c("series","exercise","massBody","massExtra",
+ colnames(pafCurves) = c("series","exercise","massBody","massExtra",
"start","width","height",
"meanSpeed","maxSpeed","maxSpeedT",
"meanPower","peakPower","peakPowerT",
"pp_ppt",
- "meanForce", "maxForce", "maxForceT",
- "mass", "massBody", "massExtra", #unneded
- "laterality","Inertia")
- write.csv(paf, op$OutputData1, quote=FALSE)
+ "meanForce", "maxForce", "maxForceT"
+ )
+
+ write.csv(pafCurves, op$OutputData1, quote=FALSE)
#print("curves written")
}
}
diff --git a/encoder/util.R b/encoder/util.R
index 4f7dbad..748dbfa 100644
--- a/encoder/util.R
+++ b/encoder/util.R
@@ -625,11 +625,13 @@ pafGenerate <- function(eccon, kinematics, massBody, massExtra, laterality, iner
#here paf is generated
#mass is not used by pafGenerate, but used by Kg/W (loadVSPower)
#meanForce and maxForce are not used by pafGenerate, but used by F/S (forceVSSpeed)
+ mass = kinematics$mass
+ #names will be used on graph.R writeCurves
return(data.frame(
meanSpeed, maxSpeed, maxSpeedT,
meanPower, peakPower, peakPowerT, pp_ppt,
meanForce, maxForce, maxForceT,
- kinematics$mass, massBody, massExtra, #kinematics$mass is Load
+ mass, massBody, massExtra, #kinematics$mass is Load
laterality, inertiaMomentum))
}
diff --git a/src/gui/encoderTreeviews.cs b/src/gui/encoderTreeviews.cs
index e67691b..c05ca61 100644
--- a/src/gui/encoderTreeviews.cs
+++ b/src/gui/encoderTreeviews.cs
@@ -89,7 +89,7 @@ public partial class ChronoJumpWindow
cells[8], cells[9], cells[10], //meanSpeed, maxSpeed,
maxSpeedT
cells[11], cells[12], cells[13],//meanPower, peakPower,
peakPowerT
cells[14], //peakPower / peakPowerT
- cells[15], cells[16], cells[17] //meanForce, maxSForce
maxForceT
+ cells[15], cells[16], cells[17] //meanForce, maxForce
maxForceT
));
}
@@ -1216,9 +1216,6 @@ public partial class ChronoJumpWindow
for(int i=15; i <= 17; i++)
cells[i] =
Util.TrimDecimals(Convert.ToDouble(Util.ChangeDecimalSeparator(cells[i])),3);
- //18, 19, 20 ara mass, massBody, massExtra. They are unneded because this parameters are also
in cells [3],[4]
- //21: laterality
-
return cells;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]