aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
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
parentd8ff3bdfcc020ec296d2ad81209fce744343ad57 (diff)
Small tweaks
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/dirax.c2
-rw-r--r--libcrystfel/src/image.h14
-rw-r--r--libcrystfel/src/mosflm.c1
-rw-r--r--libcrystfel/src/reax.c8
4 files changed, 11 insertions, 14 deletions
diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/dirax.c
index 2cbb0ec1..414e6406 100644
--- a/libcrystfel/src/dirax.c
+++ b/libcrystfel/src/dirax.c
@@ -91,7 +91,7 @@ struct dirax_data {
int read_cell;
int best_acl;
int best_acl_nh;
- int acls_tried[MAX_CELL_CANDIDATES];
+ int acls_tried[MAX_DIRAX_CELL_CANDIDATES];
int n_acls_tried;
UnitCell *cur_cell;
int done;
diff --git a/libcrystfel/src/image.h b/libcrystfel/src/image.h
index 67fc9c49..8f9e296f 100644
--- a/libcrystfel/src/image.h
+++ b/libcrystfel/src/image.h
@@ -44,9 +44,6 @@
#include "crystal.h"
-#define MAX_CELL_CANDIDATES (32)
-
-
/* Structure describing a feature in an image */
struct imagefeature {
@@ -112,14 +109,9 @@ typedef struct _imagefeaturelist ImageFeatureList;
* by-product of the scattering vector calculation and can be used later for
* calculating intensities from differential scattering cross sections.
*
- * <structfield>candidate_cells</structfield> is an array of unit cells directly
- * returned by the low-level indexing system. <structfield>ncells</structfield>
- * is the number of candidate unit cells which were found. The maximum number
- * of cells which may be returned is <function>MAX_CELL_CANDIDATES</function>.
- * <structfield>indexed_cell</structfield> contains the "correct" unit cell
- * after cell reduction or matching has been performed. The job of the cell
- * reduction is to convert the list of candidate cells into a single indexed
- * cell, or <function>NULL</function> on failure.
+ * <structfield>crystals</structfield> is an array of %Crystal directly
+ * returned by the low-level indexing system. <structfield>n_crystals</structfield>
+ * is the number of crystals which were found in the image.
*
* <structfield>copyme</structfield> represents a list of HDF5 fields to copy
* to the output stream.
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c
index d1d3c134..4f7b0c3c 100644
--- a/libcrystfel/src/mosflm.c
+++ b/libcrystfel/src/mosflm.c
@@ -643,6 +643,7 @@ int run_mosflm(struct image *image, IndexingPrivate *ipriv)
mosflm->done = 0;
mosflm->success = 0;
+ rval = 0;
do {
fd_set fds;
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;