diff options
author | Thomas White <taw@physics.org> | 2016-01-29 18:23:48 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2016-01-29 21:05:03 +0100 |
commit | c9c756db807f3ea22dcf2d01401a4ce69f73f4df (patch) | |
tree | 2d53d2355512a29976ce3ebbdd83f9a602d5bf60 /libcrystfel/src/image.c | |
parent | f2bf00dd32e79a06410b7a95fedaa2ee3bf33ef3 (diff) |
Perform prediction refinement straight after indexing
This allows indexing to be attempted again (either a new method or with
"retry") if the prediction refinement fails, increasing overall indexing
rate.
Side-effect: there are some hoops which would need to be jumped through
to store the profile radius before refinement and hence enable
scripts/plot-predict-refine to work. For now, we'll ignore this as it's
clear that the prediction refinement is working.
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r-- | libcrystfel/src/image.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index cd7047dd..82ad8f7e 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -280,6 +280,26 @@ void image_add_crystal(struct image *image, Crystal *cryst) } +void remove_flagged_crystals(struct image *image) +{ + int i; + + for ( i=0; i<image->n_crystals; i++ ) { + if ( crystal_get_user_flag(image->crystals[i]) ) { + int j; + Crystal *deleteme = image->crystals[i]; + cell_free(crystal_get_cell(deleteme)); + crystal_free(deleteme); + for ( j=i; j<image->n_crystals-1; j++ ) { + image->crystals[j] = image->crystals[j+1]; + } + image->n_crystals--; + } + } + +} + + /* Free all crystals, including their RefLists and UnitCells */ void free_all_crystals(struct image *image) { |