diff options
author | Thomas White <taw@physics.org> | 2019-10-11 10:54:25 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-10-11 10:54:25 +0200 |
commit | bff069f97ad705b44e0432f93597a874d19baa8a (patch) | |
tree | 7947825fb12df50d35a6f91bace732c8d0b7a980 | |
parent | 71809b358a249e9d98e6102e1d78174595d4dedc (diff) |
Copy target cell's lattice type and unique axis into cell from indexing, after comparison
-rw-r--r-- | libcrystfel/src/index.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index 016767a9..d24e8355 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -587,10 +587,21 @@ static int check_cell(IndexingFlags flags, Crystal *cr, UnitCell *target, tolerance, &rm); if ( out != NULL ) { + /* Replace crystal's cell with new one */ cell_free(crystal_get_cell(cr)); crystal_set_cell(cr, out); rtnl_mtx_free(rm); + + /* Copy the target cell's lattice type and unique axis + * onto the crystal's cell. The cell from compare_r_c_p doesn't + * (yet) have the right values, because cell_transform_rational + * don't know how to determine them. The cell should be close + * to the target, of course, so this is less bad than leaving + * the lattice type as triclinic. */ + cell_set_lattice_type(out, cell_get_lattice_type(target)); + cell_set_unique_axis(out, cell_get_unique_axis(target)); + return 0; } |