diff options
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/index.c | 7 | ||||
-rw-r--r-- | libcrystfel/src/predict-refine.c | 15 |
2 files changed, 11 insertions, 11 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index 12cd9190..5b0f742f 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -50,6 +50,7 @@ #include "cell-utils.h" #include "predict-refine.h" #include "profile.h" +#include "crystfel-mille.h" #include "indexers/dirax.h" #include "indexers/asdf.h" #include "indexers/mosflm.h" @@ -774,6 +775,12 @@ static int try_indexer(struct image *image, IndexingMethod indm, } profile_end("cell-compare-to-others"); + if ( (mille != NULL) && !crystal_get_user_flag(cr) ) { + profile_start("mille-write"); + crystfel_mille_write_record(mille); + profile_end("mille-write"); + } + } n_bad = remove_flagged_crystals(image); diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c index adbb418f..cc740db3 100644 --- a/libcrystfel/src/predict-refine.c +++ b/libcrystfel/src/predict-refine.c @@ -872,6 +872,7 @@ int refine_prediction(struct image *image, Crystal *cr, crystal_add_notes(cr, tmp); if ( mille != NULL ) { + crystfel_mille_delete_last_record(mille); profile_start("mille-calc"); write_mille(mille, n, crystal_get_cell(cr), rps, image, max_mille_level, Minvs); @@ -887,18 +888,10 @@ int refine_prediction(struct image *image, Crystal *cr, n = pair_peaks(image, cr, NULL, rps); free_rps_noreflist(rps, n); + if ( n < 3 ) { - if ( mille != NULL ) { - crystfel_mille_delete_last_record(mille); - } return 1; + } else { + return 0; } - - if ( mille != NULL ) { - profile_start("mille-write"); - crystfel_mille_write_record(mille); - profile_end("mille-write"); - } - - return 0; } |