[chronojump] Fixet sensitivity of check_encoder_analyze_eccon_together



commit 3c09f0d07fe765311cc0133bf80ab5ae63796479
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed May 20 18:39:12 2015 +0200

    Fixet sensitivity of check_encoder_analyze_eccon_together

 encoder/graph.R    |   10 ++++------
 src/gui/encoder.cs |   19 +++++++++++++------
 2 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index fd3218c..516c604 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -594,21 +594,21 @@ findSmoothingsEC <- function(singleFile, displacement, curves, eccon, smoothingO
                                        start = 0
                                        end = mean(which(position == max(position)))
                                }
-                               print("start, end")
-                               print(c(start, end))
+                               #print("start, end")
+                               #print(c(start, end))
 
                                concentric=displacement[(curves[i,1]+start):(curves[i,1]+end)]
                                
                                #get max speed at "c"
-                               print("calling speed 1")
+                               #print("calling speed 1")
                                #print("unique(concentric)")
                                #print(unique(concentric))
                                #print("concentric")
                                #print(concentric)
                                
                                speed <- getSpeed(concentric, smoothingOneC)
-                               print("called")
                                #maxSpeedC=max(speed$y)
+                               
                                powerC <- findSmoothingsECGetPower(speed)
                                maxPowerC <- max(powerC) 
 
@@ -616,10 +616,8 @@ findSmoothingsEC <- function(singleFile, displacement, curves, eccon, smoothingO
                                smoothingOneEC = smoothingOneC
                                for(j in seq(as.numeric(smoothingOneC),0,by=-.01)) 
                                {
-                                       print("calling speed 2")
                                        #write("calling speed 2", stderr())
                                        speed <- getSpeed(eccentric.concentric, j)
-                                       print("called")
                                        
                                        smoothingOneEC = j
                                        
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index f21f5f9..acc9580 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -2717,15 +2717,22 @@ public partial class ChronoJumpWindow
        }
        
        /*
-        * if we are analyzing current set and it's concentric
-        * separate phases button has to be unsensitive
+        * 1) neurmuscular should be separated
+        * 2) if we are analyzing current set and it's concentric separate phases button has to be unsensitive
+        * 3) single and side are together
         */
        private void block_check_encoder_analyze_eccon_together_if_needed() 
        {
-               if(
-                               check_encoder_analyze_signal_or_curves.Active &&
-                               findEccon(false) == "c") 
-               {
+               if(radiobutton_encoder_analyze_neuromuscular_profile.Active) { // 1)
+                       //separated, mandatory
+                       check_encoder_analyze_eccon_together.Sensitive = false;
+                       check_encoder_analyze_eccon_together.Active = false;
+               }
+               else if( 
+                               ( check_encoder_analyze_signal_or_curves.Active && findEccon(false) == "c" ) 
|| // 2)
+                               radiobutton_encoder_analyze_single.Active || 
radiobutton_encoder_analyze_side.Active // 3)
+                 ) {
+                       //together, mandatory
                        check_encoder_analyze_eccon_together.Sensitive = false;
                        check_encoder_analyze_eccon_together.Active = true;
                }


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