[xiph-commits] r17940 - trunk/ghost/monty/chirp

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Thu Apr 28 05:20:22 PDT 2011


Author: xiphmont
Date: 2011-04-28 05:20:22 -0700 (Thu, 28 Apr 2011)
New Revision: 17940

Modified:
   trunk/ghost/monty/chirp/chirp.c
   trunk/ghost/monty/chirp/chirptest.c
Log:
can some graphs



Modified: trunk/ghost/monty/chirp/chirp.c
===================================================================
--- trunk/ghost/monty/chirp/chirp.c	2011-04-28 09:10:56 UTC (rev 17939)
+++ trunk/ghost/monty/chirp/chirp.c	2011-04-28 12:20:22 UTC (rev 17940)
@@ -132,6 +132,7 @@
   int i,j;
   int flag=1;
   float r[len];
+  int ret_count=iter_limit;
 
   float lasterr=0;
   float thiserr=0;
@@ -357,9 +358,10 @@
         }
       }
     }
-    if(flag)iter_limit--;
+    if(flag)ret_count--;
+    iter_limit--;
   }
-  return iter_limit;
+  return ret_count;
 }
 
 /* linear estimation iterator; sets fixed basis functions for each
@@ -409,6 +411,7 @@
   int flag=1;
   float lasterr=0;
   float thiserr=0;
+  int ret_count = iter_limit;
 
   for (i=0;i<n;i++){
     float tmpa=0;
@@ -590,7 +593,8 @@
 
 
     }
-    if(flag)iter_limit--;
+    if(flag)ret_count--;
+    iter_limit--;
   }
 
   for(i=0;i<n;i++){
@@ -609,7 +613,7 @@
     free(ttsin_table[i]);
   }
 
-  return iter_limit;
+  return ret_count;
 }
 
 /* Performs an iterative chirp estimation using the passed

Modified: trunk/ghost/monty/chirp/chirptest.c
===================================================================
--- trunk/ghost/monty/chirp/chirptest.c	2011-04-28 09:10:56 UTC (rev 17939)
+++ trunk/ghost/monty/chirp/chirptest.c	2011-04-28 12:20:22 UTC (rev 17940)
@@ -1176,15 +1176,19 @@
 
   };
 
+  /* Graphs for dW vs W ****************************************/
+
   w_e("linear-dW-vs-W",&arg);
   arg.fit_nonlinear=1;
-  arg.subtitle1="Partial nonlinear estimation, no ddA fit",
+  arg.subtitle1="Partial nonlinear estimation, no ddA fit";
   w_e("partial-nonlinear-dW-vs-W",&arg);
-  arg.subtitle1="Full nonlinear estimation, no ddA fit",
+  arg.subtitle1="Full nonlinear estimation, no ddA fit";
   arg.fit_nonlinear=2;
   w_e("full-nonlinear-dW-vs-W",&arg);
 
-  arg.subtitle1="Linear estimation, no ddA fit",
+  /* Graphs for W estimate distance vs W ************************/
+
+  arg.subtitle1="Linear estimation, no ddA fit";
   arg.fit_nonlinear=0;
   arg.yaxis_label="initial distance from W (cycles/block)";
   arg.y_dim = DIM_ESTIMATE_W;
@@ -1194,14 +1198,36 @@
   arg.max_chirp_dW=0.;
 
   w_e("linear-estW-vs-W",&arg);
-  arg.subtitle1="Partial nonlinear estimation, no ddA fit",
+  arg.subtitle1="Partial nonlinear estimation, no ddA fit";
+  arg.subtitle2="chirp: A=1.0, dA=dW=0., swept phase | estimate A=P=dA=dW=0";
   arg.fit_nonlinear=1;
   w_e("partial-nonlinear-estW-vs-W",&arg);
-  arg.subtitle1="Full nonlinear estimation, no ddA fit",
+  arg.subtitle1="Full nonlinear estimation, no ddA fit";
   arg.fit_nonlinear=2;
   w_e("full-nonlinear-estW-vs-W",&arg);
   arg.fit_nonlinear=0;
 
+  /* Graphs for dA vs W *****************************************/
+
+  arg.subtitle1="Linear estimation, no ddA fit",
+  arg.subtitle2="chirp: A=1.0, dW=0., swept phase | estimate A=P=dA=dW=0, estimate W=chirp W";
+  arg.fit_nonlinear=0;
+  arg.yaxis_label="dA (amplitude delta across block)";
+  arg.y_dim = DIM_CHIRP_dA;
+  arg.min_est_W = 0;
+  arg.max_est_W = 0;
+  arg.min_chirp_dA=-1.;
+  arg.max_chirp_dA=1.;
+
+  w_e("linear-dA-vs-W",&arg);
+  arg.subtitle1="Partial nonlinear estimation, no ddA fit",
+  arg.fit_nonlinear=1;
+  w_e("partial-nonlinear-dA-vs-W",&arg);
+  arg.subtitle1="Full nonlinear estimation, no ddA fit",
+  arg.fit_nonlinear=2;
+  w_e("full-nonlinear-dA-vs-W",&arg);
+  arg.fit_nonlinear=0;
+
   return 0;
 }
 



More information about the commits mailing list