aboutsummaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-05-16 17:46:09 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:27 +0100
commitb90ec67959ca72cab7a9339600eeacba37370fa8 (patch)
treeba048d10d38ccd81a745b5db8a2ab33a76871ed0 /src/index.c
parentc8057fc5efc6275ac05351d1ea79c49a295efc05 (diff)
Add partial matching (against 'a' and 'b' only)
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/index.c b/src/index.c
index 47866a18..2fa7f58d 100644
--- a/src/index.c
+++ b/src/index.c
@@ -154,6 +154,7 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm,
for ( i=0; i<image->ncells; i++ ) {
UnitCell *new_cell = NULL;
+ UnitCell *cand = image->candidate_cells[i];
if ( verbose ) {
STATUS("--------------------\n");
@@ -166,16 +167,16 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm,
/* Match or reduce the cell as appropriate */
switch ( cellr ) {
case CELLR_NONE :
- new_cell = cell_new_from_cell(image
- ->candidate_cells[i]);
+ new_cell = cell_new_from_cell(cand);
break;
case CELLR_REDUCE :
- new_cell = match_cell(image->candidate_cells[i],
- cell, verbose, 1);
+ new_cell = match_cell(cand, cell, verbose, 1);
break;
case CELLR_COMPARE :
- new_cell = match_cell(image->candidate_cells[i],
- cell, verbose, 0);
+ new_cell = match_cell(cand, cell, verbose, 0);
+ break;
+ case CELLR_COMPARE_AB :
+ new_cell = match_cell_ab(cand, cell);
break;
}