[xiph-commits] r17985 - trunk/chirptest

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Sun May 15 01:32:38 PDT 2011


Author: xiphmont
Date: 2011-05-15 01:32:38 -0700 (Sun, 15 May 2011)
New Revision: 17985

Modified:
   trunk/chirptest/chirpgraph.c
   trunk/chirptest/chirptest.c
Log:
Add dW 2-chirp graphs


Modified: trunk/chirptest/chirpgraph.c
===================================================================
--- trunk/chirptest/chirpgraph.c	2011-05-15 07:56:11 UTC (rev 17984)
+++ trunk/chirptest/chirpgraph.c	2011-05-15 08:32:38 UTC (rev 17985)
@@ -269,7 +269,7 @@
 
   /* Y axis numeric labels */
   cairo_set_source_rgb(c,0,0,0);
-  for(i=y0s+fontsize;i<=y1s;i++){
+  for(i=y0s+fontsize/2;i<=y1s;i++){
     if(i%ymajor==0){
       int y = toppad+y_n-i+y0s;
       char buf[80];

Modified: trunk/chirptest/chirptest.c
===================================================================
--- trunk/chirptest/chirptest.c	2011-05-15 07:56:11 UTC (rev 17984)
+++ trunk/chirptest/chirptest.c	2011-05-15 08:32:38 UTC (rev 17985)
@@ -3052,57 +3052,66 @@
   arg.window = window_functions.maxwell1;
   graph_1chirp("2ch-",&arg);
 
-  /* A vs dW *****************************************************************/
+  /* dW vs W *****************************************************************/
 
-  /* relative to alt chirp */
-  arg.chirp.W_0 = arg.chirp.W_1 = 0;
+  arg.chirp.A_0 = arg.chirp.A_1 = 0.;
 
-  arg.x_dim=DIM_CHIRP_dW;
-  arg.chirp.dW_0 = -5;
-  arg.chirp.dW_1 = 5;
-  arg.xaxis_label = "test chirp dW (cycles/block)";
+  arg.y_dim=DIM_CHIRP_dW;
+  arg.chirp.dW_0 = -10.;
+  arg.chirp.dW_1 = 10.;
+  arg.y_major = 1;
+  arg.y_minor = .25;
+  arg.yaxis_label = "test chirp dW (cycles/block)";
 
-  arg.fit_nonlinear=0;
-  arg.window = window_functions.rectangle;
-  graph_1chirp("2ch-",&arg);
-  arg.window = window_functions.sine;
-  graph_1chirp("2ch-",&arg);
-  arg.window = window_functions.hanning;
-  graph_1chirp("2ch-",&arg);
-  arg.window = window_functions.tgauss_deep;
-  graph_1chirp("2ch-",&arg);
-  arg.window = window_functions.maxwell1;
-  graph_1chirp("2ch-",&arg);
+  {
+    int amp;
+    for(amp=-60;amp<=0;amp+=20){
 
-  arg.fit_nonlinear=1;
-  arg.window = window_functions.rectangle;
-  graph_1chirp("2ch-",&arg);
-  arg.window = window_functions.sine;
-  graph_1chirp("2ch-",&arg);
-  arg.window = window_functions.hanning;
-  graph_1chirp("2ch-",&arg);
-  arg.window = window_functions.tgauss_deep;
-  graph_1chirp("2ch-",&arg);
-  arg.window = window_functions.maxwell1;
-  graph_1chirp("2ch-",&arg);
+      arg.chirp.A_0=arg.chirp.A_1=amp;
 
-  arg.fit_nonlinear=2;
-  arg.fit_dW_alpha_0 = arg.fit_dW_alpha_1 = 2.25;
-  arg.window = window_functions.rectangle;
-  graph_1chirp("2ch-",&arg);
-  arg.fit_dW_alpha_0 = arg.fit_dW_alpha_1 = 1.711;
-  arg.window = window_functions.sine;
-  graph_1chirp("2ch-",&arg);
-  arg.fit_dW_alpha_0 = arg.fit_dW_alpha_1 = 1.618;
-  arg.window = window_functions.hanning;
-  graph_1chirp("2ch-",&arg);
-  arg.fit_dW_alpha_0 = arg.fit_dW_alpha_1 = 1.5;
-  arg.window = window_functions.tgauss_deep;
-  graph_1chirp("2ch-",&arg);
-  arg.fit_dW_alpha_0 = arg.fit_dW_alpha_1 = 1.554;
-  arg.window = window_functions.maxwell1;
-  graph_1chirp("2ch-",&arg);
+      arg.fit_nonlinear=0;
+      arg.window = window_functions.rectangle;
+      graph_1chirp("2ch-",&arg);
+      arg.window = window_functions.sine;
+      graph_1chirp("2ch-",&arg);
+      arg.window = window_functions.hanning;
+      graph_1chirp("2ch-",&arg);
+      arg.window = window_functions.tgauss_deep;
+      graph_1chirp("2ch-",&arg);
+      arg.window = window_functions.maxwell1;
+      graph_1chirp("2ch-",&arg);
 
+      arg.fit_nonlinear=1;
+      arg.window = window_functions.rectangle;
+      graph_1chirp("2ch-",&arg);
+      arg.window = window_functions.sine;
+      graph_1chirp("2ch-",&arg);
+      arg.window = window_functions.hanning;
+      graph_1chirp("2ch-",&arg);
+      arg.window = window_functions.tgauss_deep;
+      graph_1chirp("2ch-",&arg);
+      arg.window = window_functions.maxwell1;
+      graph_1chirp("2ch-",&arg);
+
+      arg.fit_nonlinear=2;
+      arg.fit_dW_alpha_0 = arg.fit_dW_alpha_1 = 2.25;
+      arg.window = window_functions.rectangle;
+      graph_1chirp("2ch-",&arg);
+      arg.fit_dW_alpha_0 = arg.fit_dW_alpha_1 = 1.711;
+      arg.window = window_functions.sine;
+      graph_1chirp("2ch-",&arg);
+      arg.fit_dW_alpha_0 = arg.fit_dW_alpha_1 = 1.618;
+      arg.window = window_functions.hanning;
+      graph_1chirp("2ch-",&arg);
+      arg.fit_dW_alpha_0 = arg.fit_dW_alpha_1 = 1.5;
+      arg.window = window_functions.tgauss_deep;
+      graph_1chirp("2ch-",&arg);
+      arg.fit_dW_alpha_0 = arg.fit_dW_alpha_1 = 1.554;
+      arg.window = window_functions.maxwell1;
+      graph_1chirp("2ch-",&arg);
+    }
+  }
+
 #endif
 
   return 0;



More information about the commits mailing list