aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-02-02 23:21:49 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:12 +0100
commit07db6fab9c2e4fac724db653cc4882042319905a (patch)
tree2ea7e6a100a7a9a5f332baae10bec861519d35af /src
parenteac6ae7c88b6f74a7a9e5fc19796b897ad6ff630 (diff)
Debug
Diffstat (limited to 'src')
-rw-r--r--src/hrs-scaling.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c
index 809298a7..928da4a7 100644
--- a/src/hrs-scaling.c
+++ b/src/hrs-scaling.c
@@ -32,6 +32,18 @@
/* Maximum number of iterations of NLSq scaling per macrocycle. */
#define MAX_CYCLES (30)
+static void show_matrix_eqn(gsl_matrix *M, gsl_vector *v, int r)
+{
+ int i, j;
+
+ for ( i=0; i<r; i++ ) {
+ STATUS("[ ");
+ for ( j=0; j<r; j++ ) {
+ STATUS("%+9.3e ", gsl_matrix_get(M, i, j));
+ }
+ STATUS("][ a%2i ] = [ %+9.3e ]\n", i, gsl_vector_get(v, i));
+ }
+}
static double s_uha(signed int hat, signed int kat, signed int lat,
struct image *images, int n, const char *sym, int a)
@@ -236,6 +248,7 @@ static double iterate_scale(struct image *images, int n,
}
rprime = gsl_vector_alloc(n);
val = gsl_blas_dgemv(CblasTrans, 1.0, e_vec, v, 0.0, rprime);
+ show_matrix_eqn(D, rprime, n);
/* Solve */
gsl_vector *sprime;
@@ -374,6 +387,7 @@ double *scale_intensities(struct image *images, int n, const char *sym,
if ( images[m].cpeaks[j].intensity < 0.1 ) scalable = 0;
images[m].cpeaks[j].scalable = scalable;
+ STATUS("%i %i %i\n", m, j, scalable);
}