aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-11-22 16:56:32 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:07 +0100
commit24746060a47d220c016f34e3598665817e3d407d (patch)
tree606ca7847fe950f4222e9eac111fe76de39b6bd6
parentdf8c88903686266ae406dc8842d4e5cf2c4e3b95 (diff)
Allow selected reflections to change
This partially reverts a2611c8c2acf977eddac2d1a372760383d395da5.
-rw-r--r--src/facetron.c4
-rw-r--r--src/geometry.c2
-rw-r--r--src/geometry.h2
-rw-r--r--src/post-refinement.c6
-rw-r--r--src/templates.c2
5 files changed, 7 insertions, 9 deletions
diff --git a/src/facetron.c b/src/facetron.c
index dd82256a..78a4b72b 100644
--- a/src/facetron.c
+++ b/src/facetron.c
@@ -102,7 +102,7 @@ static void refine_image(int mytask, void *tasks)
return;
}
- spots = find_intersections(image, image->indexed_cell, &n, 0, NULL);
+ spots = find_intersections(image, image->indexed_cell, &n, 0);
dev = +INFINITY;
i = 0;
do {
@@ -166,7 +166,7 @@ static void integrate_image(int mytask, void *tasks)
}
/* Figure out which spots should appear in this pattern */
- spots = find_intersections(image, image->indexed_cell, &n, 0, NULL);
+ spots = find_intersections(image, image->indexed_cell, &n, 0);
/* For each reflection, estimate the partiality */
for ( j=0; j<n; j++ ) {
diff --git a/src/geometry.c b/src/geometry.c
index 326f2f5c..263be4af 100644
--- a/src/geometry.c
+++ b/src/geometry.c
@@ -230,7 +230,7 @@ static int check_reflection(struct image *image, double mres, int output,
struct cpeak *find_intersections(struct image *image, UnitCell *cell,
- int *n, int output, struct cpeak *t)
+ int *n, int output)
{
double asx, asy, asz;
double bsx, bsy, bsz;
diff --git a/src/geometry.h b/src/geometry.h
index 03fde52f..0782a3e1 100644
--- a/src/geometry.h
+++ b/src/geometry.h
@@ -18,7 +18,7 @@
#endif
extern struct cpeak *find_intersections(struct image *image, UnitCell *cell,
- int *n, int output, struct cpeak *t);
+ int *n, int output);
extern double integrate_all(struct image *image, struct cpeak *cpeaks, int n);
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 537c430b..69a9563c 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -274,7 +274,6 @@ double pr_iterate(struct image *image, double *i_full, const char *sym,
gsl_vector *shifts;
int h, param;
struct cpeak *spots = *pspots;
- struct cpeak *spots_old;
M = gsl_matrix_calloc(NUM_PARAMS, NUM_PARAMS);
v = gsl_vector_calloc(NUM_PARAMS);
@@ -351,9 +350,8 @@ double pr_iterate(struct image *image, double *i_full, const char *sym,
gsl_vector_free(v);
gsl_vector_free(shifts);
- spots_old = spots;
- spots = find_intersections(image, image->indexed_cell, n, 0, spots_old);
- free(spots_old);
+ free(spots);
+ spots = find_intersections(image, image->indexed_cell, n, 0);
*pspots = spots;
return mean_partial_dev(image, spots, *n, sym, i_full, NULL);
}
diff --git a/src/templates.c b/src/templates.c
index 57434473..4bd85a76 100644
--- a/src/templates.c
+++ b/src/templates.c
@@ -172,7 +172,7 @@ IndexingPrivate *generate_templates(UnitCell *cell, const char *filename,
cell_rot = rotate_cell(cell, omega, phi, 0.0);
- cpeaks = find_intersections(&image, cell_rot, &n, 0, NULL);
+ cpeaks = find_intersections(&image, cell_rot, &n, 0);
if ( cpeaks == NULL ) {
ERROR("Template calculation failed.\n");
return NULL;