diff options
Diffstat (limited to 'libcrystfel/src/predict-refine.c')
-rw-r--r-- | libcrystfel/src/predict-refine.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c index 6da0d3d1..083d86c5 100644 --- a/libcrystfel/src/predict-refine.c +++ b/libcrystfel/src/predict-refine.c @@ -142,15 +142,15 @@ double r_gradient(int param, Reflection *refl, UnitCell *cell, double wavelength /* Spot position gradients for diffraction physics (anything that changes the * diffracted ray direction) */ int fs_ss_gradient_physics(int param, Reflection *refl, UnitCell *cell, - struct detgeom_panel *p, gsl_matrix *Minv, - double fs, double ss, double mu, - float *fsg, float *ssg) + struct detgeom_panel *p, gsl_matrix *Minv, + double fs, double ss, double mu, + float *fsg, float *ssg) { signed int h, k, l; gsl_vector *dRdp; gsl_vector *v; - get_indices(refl, &h, &k, &l); + get_symmetric_indices(refl, &h, &k, &l); dRdp = gsl_vector_calloc(3); @@ -302,7 +302,7 @@ int fs_ss_gradient(int param, Reflection *refl, UnitCell *cell, double mu; double fs, ss; - get_indices(refl, &h, &k, &l); + get_symmetric_indices(refl, &h, &k, &l); kpred = get_kpred(refl); cell_get_reciprocal(cell, &asx, &asy, &asz, &bsx, &bsy, &bsz, @@ -811,7 +811,7 @@ int refine_prediction(struct image *image, Crystal *cr, reflist = reflist_new(); n = pair_peaks(image, cr, reflist, rps); - if ( n < 10 ) { + if ( n < 3 ) { cffree(rps); reflist_free(reflist); return 1; @@ -871,7 +871,8 @@ int refine_prediction(struct image *image, Crystal *cr, total_shifts[0], total_shifts[1], total_shifts[2]); crystal_add_notes(cr, tmp); - if ( mille != NULL ) { + if ( (mille != NULL) && (n>4) ) { + 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 < 10 ) { - if ( mille != NULL ) { - crystfel_mille_delete_last_record(mille); - } - return 1; - } - if ( mille != NULL ) { - profile_start("mille-write"); - crystfel_mille_write_record(mille); - profile_end("mille-write"); + if ( n < 3 ) { + return 1; + } else { + return 0; } - - return 0; } |