aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-10-09 15:06:23 +0200
committerThomas White <taw@physics.org>2013-10-09 15:06:23 +0200
commitca0bd5924ce038d42b731fbf45324bd05a35f636 (patch)
treec321a8a3e32331c837548e982a0bf2fd7028e888
parent39f63a391bae09087136e48fbc4093ef83b3b33e (diff)
Set matrix components to zero before calculating bg matrix integrals
-rw-r--r--libcrystfel/src/integration.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c
index 2d90d5e4..0643dc23 100644
--- a/libcrystfel/src/integration.c
+++ b/libcrystfel/src/integration.c
@@ -764,6 +764,16 @@ static void setup_peak_integrals(struct intcontext *ic, struct peak_box *bx)
bx->pks_q = 0.0;
bx->m = 0;
+ gsl_matrix_set(bx->bgm, 0, 0, 0.0);
+ gsl_matrix_set(bx->bgm, 0, 1, 0.0);
+ gsl_matrix_set(bx->bgm, 0, 2, 0.0);
+ gsl_matrix_set(bx->bgm, 1, 0, 0.0);
+ gsl_matrix_set(bx->bgm, 1, 1, 0.0);
+ gsl_matrix_set(bx->bgm, 1, 2, 0.0);
+ gsl_matrix_set(bx->bgm, 2, 0, 0.0);
+ gsl_matrix_set(bx->bgm, 2, 1, 0.0);
+ gsl_matrix_set(bx->bgm, 2, 2, 0.0);
+
for ( p=0; p<ic->w; p++ ) {
for ( q=0; q<ic->w; q++ ) {