aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/reax.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-02-08 15:52:19 -0800
committerThomas White <taw@physics.org>2013-02-08 15:52:19 -0800
commit13116e93b01faee7826b5ba95a1dbf5fc3d64b45 (patch)
treeb861e0a2aa50b122485dcd511f90b0caac3316f3 /libcrystfel/src/reax.c
parentd8ff3bdfcc020ec296d2ad81209fce744343ad57 (diff)
Small tweaks
Diffstat (limited to 'libcrystfel/src/reax.c')
-rw-r--r--libcrystfel/src/reax.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libcrystfel/src/reax.c b/libcrystfel/src/reax.c
index b144e266..4717dcb4 100644
--- a/libcrystfel/src/reax.c
+++ b/libcrystfel/src/reax.c
@@ -65,6 +65,9 @@
#define MAX_CANDIDATES (1024)
+/* Choose the best solution from this many candidate cells */
+#define MAX_REAX_CELL_CANDIDATES (32)
+
struct dvec
{
double x;
@@ -907,7 +910,7 @@ static void add_cell_candidate(struct cell_candidate_list *cl, UnitCell *cnew,
}
- if ( cl->n_cand >= MAX_CELL_CANDIDATES ) {
+ if ( cl->n_cand >= MAX_REAX_CELL_CANDIDATES ) {
/* "cshift" just fell off the end of the list */
} else {
cl->cand[cl->n_cand++] = cshift;
@@ -953,7 +956,8 @@ static void assemble_cells_from_candidates(struct image *image,
signed int ti, tj, tk;
struct cell_candidate_list cl;
- cl.cand = calloc(MAX_CELL_CANDIDATES, sizeof(struct cell_candidate));
+ cl.cand = calloc(MAX_REAX_CELL_CANDIDATES,
+ sizeof(struct cell_candidate));
if ( cl.cand == NULL ) {
ERROR("Failed to allocate cell candidate list.\n");
return;