From ef2a5b59b78ecf7df4b72795e0f08eec345b5b82 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 3 Jul 2023 15:48:00 +0200 Subject: Calculate fs and ss gradients together, SPOT panel number, add matrix hooks --- tests/gradient_cell_asx.c | 15 +++++++-------- tests/gradient_check_utils.c | 1 - tests/gradient_panel_x.c | 15 +++++++-------- 3 files changed, 14 insertions(+), 17 deletions(-) (limited to 'tests') diff --git a/tests/gradient_cell_asx.c b/tests/gradient_cell_asx.c index 47649286..c9c00ab0 100644 --- a/tests/gradient_cell_asx.c +++ b/tests/gradient_cell_asx.c @@ -53,6 +53,7 @@ int main(int argc, char *argv[]) double asx, asy, asz; double bsx, bsy, bsz; double csx, csy, csz; + gsl_matrix *panel_matrices[64]; rps = make_test_image(&n_refls, &image); @@ -72,20 +73,18 @@ int main(int argc, char *argv[]) for ( i=0; ipanels[rps[i].peak->pn], + panel_matrices[rps[i].peak->pn], + &calc[1], &calc[2]); obs[0] = (after[0][i] - before[0][i]) / step; obs[1] = (after[1][i] - before[1][i]) / step; diff --git a/tests/gradient_check_utils.c b/tests/gradient_check_utils.c index f52d43ca..6b641b9d 100644 --- a/tests/gradient_check_utils.c +++ b/tests/gradient_check_utils.c @@ -172,7 +172,6 @@ struct reflpeak *make_test_image(int *pn_refls, struct image *image) rps[i].peak = pk; rps[i].refl = refl; rps[i].Ih = 1.0; - rps[i].panel = &image->detgeom->panels[pn]; i++; } diff --git a/tests/gradient_panel_x.c b/tests/gradient_panel_x.c index 460044da..012df9e1 100644 --- a/tests/gradient_panel_x.c +++ b/tests/gradient_panel_x.c @@ -51,6 +51,7 @@ int main(int argc, char *argv[]) int n_wrong_obsr = 0; int fail = 0; double step = 0.1; /* Pixels */ + gsl_matrix *panel_matrices[64]; rps = make_test_image(&n_refls, &image); @@ -61,20 +62,18 @@ int main(int argc, char *argv[]) for ( i=0; ipanels[rps[i].peak->pn], + panel_matrices[rps[i].peak->pn], + &calc[1], &calc[2]); obs[0] = (after[0][i] - before[0][i]) / step; obs[1] = (after[1][i] - before[1][i]) / step; -- cgit v1.2.3