aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-22 16:38:50 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:30 +0100
commit591e2f712e517780c2dd72d1e7efaabdee2fb6fa (patch)
treeea457d310e4dc176e4496c9d2bb2e083d7d7bdaf /src
parentd72134811702f08888035a743b9d0609610c4de7 (diff)
Comment out debug, rename show_eigen() for clarity
Diffstat (limited to 'src')
-rw-r--r--src/post-refinement.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c
index a48a2052..1782e7da 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -216,19 +216,20 @@ static void apply_shift(struct image *image, int k, double shift)
}
-static void show_eigen(gsl_vector *e_val)
+static void check_eigen(gsl_vector *e_val)
{
int i;
double vmax, vmin;
const int n = e_val->size;
const double max_condition = 1e6;
+ const int verbose = 0;
- STATUS("Eigenvalues:\n");
+ if ( verbose ) STATUS("Eigenvalues:\n");
vmin = +INFINITY;
vmax = 0.0;
for ( i=0; i<n; i++ ) {
double val = gsl_vector_get(e_val, i);
- STATUS("%i: %e\n", i, val);
+ if ( verbose ) STATUS("%i: %e\n", i, val);
if ( val > vmax ) vmax = val;
if ( val < vmin ) vmin = val;
}
@@ -248,7 +249,10 @@ static void show_eigen(gsl_vector *e_val)
if ( val > vmax ) vmax = val;
if ( val < vmin ) vmin = val;
}
- STATUS("Condition number: %e / %e = %5.2f\n", vmax, vmin, vmax/vmin);
+ if ( verbose ) {
+ STATUS("Condition number: %e / %e = %5.2f\n",
+ vmax, vmin, vmax/vmin);
+ }
}
@@ -275,7 +279,7 @@ static gsl_vector *solve_svd(gsl_vector *v, gsl_matrix *M)
}
/* "M" is now "U" */
- show_eigen(s_val);
+ check_eigen(s_val);
shifts = gsl_vector_calloc(n);
err = gsl_linalg_SV_solve(M, s_vec, s_val, v, shifts);
@@ -404,7 +408,7 @@ static double pr_iterate(struct image *image, const RefList *full,
}
//show_matrix_eqn(M, v, NUM_PARAMS);
- STATUS("%i reflections were scalable\n", nref);
+ //STATUS("%i reflections were scalable\n", nref);
if ( nref == 0 ) {
ERROR("No reflections left to scale!\n");
return 0.0;