[xiph-commits] r17924 - trunk/ghost/monty/chirp
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Sun Apr 17 23:47:51 PDT 2011
Author: xiphmont
Date: 2011-04-17 23:47:51 -0700 (Sun, 17 Apr 2011)
New Revision: 17924
Modified:
trunk/ghost/monty/chirp/chirptest.c
Log:
correct phase error calculation in swept/randomized modes (must be circular)
Modified: trunk/ghost/monty/chirp/chirptest.c
===================================================================
--- trunk/ghost/monty/chirp/chirptest.c 2011-04-18 06:10:49 UTC (rev 17923)
+++ trunk/ghost/monty/chirp/chirptest.c 2011-04-18 06:47:51 UTC (rev 17924)
@@ -603,7 +603,7 @@
if(ret_minA[i]>v)ret_minA[i]=v;
if(ret_maxA[i]<v)ret_maxA[i]=v;
- v = chirps[i].P - estimates[i].P;
+ v = circular_distance(chirps[i].P, estimates[i].P);
if(ret_minP[i]>v)ret_minP[i]=v;
if(ret_maxP[i]<v)ret_maxP[i]=v;
@@ -670,7 +670,7 @@
/* P delta graph */
if(swept){
- set_error_color(cP_d,ret_maxP[yi]-ret_minP[yi],a);
+ set_error_color(cP_d,circular_distance(ret_maxP[yi],ret_minP[yi]),a);
cairo_rectangle(cP_d,xi+leftpad,yi+toppad,1,1);
cairo_fill(cP_d);
}
@@ -812,7 +812,7 @@
/* ymajor */ 100,
/* yminor */ 25,
- /* window */ window_functions.maxwell1,
+ /* window */ window_functions.hanning,
/* fit_tol */ .000001,
/* gauss_seidel */ 1,
/* fit_W */ 1,
@@ -825,8 +825,8 @@
/* symm_norm */ 1,
/* bound_zero */ 0,
- /* sweep_steps */ 0,
- /* randomize_p */ 0,
+ /* sweep_steps */ 16,
+ /* randomize_p */ 1,
/* est A range */ 0.,0.,
/* est P range */ 0.,0.,
@@ -836,7 +836,7 @@
/* est ddA range */ 0.,0.,
/* ch A range */ 1.,1.,
- /* ch P range */ M_PI/2.,M_PI/2.,
+ /* ch P range */ 0,2*M_PI,
/* ch W range */ 0.,0.,
/* ch dA range */ 0.,0.,
/* ch dW range */ 0.,0.,
More information about the commits
mailing list