diff options
author | Thomas White <taw@physics.org> | 2023-09-19 10:48:15 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-09-19 10:48:15 +0200 |
commit | ab95491a006265f2d8f71f7518caf51762e1934c (patch) | |
tree | 9067218ad8be62d0c884ecdaae4d77c8d218b5c5 | |
parent | a5ae81e83123209de8d8387cc1e721b593886ba5 (diff) |
Prediction refinement: Weaken restraint and reduce number of iterations
The restraint was way too strong, after the last round of tweaking.
With a weaker restraint, the algorithm converges very quickly - it's
practically linear - so ten iterations is way too much.
-rw-r--r-- | libcrystfel/src/predict-refine.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c index 6ef59d44..ba1bb3ae 100644 --- a/libcrystfel/src/predict-refine.c +++ b/libcrystfel/src/predict-refine.c @@ -714,7 +714,7 @@ static int iterate(struct reflpeak *rps, int n, UnitCell *cell, int k; for ( k=0; k<num_params; k++ ) { double M_curr = gsl_matrix_get(M, k, k); - gsl_matrix_set(M, k, k, M_curr+1e-7); + gsl_matrix_set(M, k, k, M_curr+1e-18); } //show_matrix_eqn(M, v); @@ -852,8 +852,8 @@ int refine_prediction(struct image *image, Crystal *cr, Mille *mille) for ( i=0; i<12; i++ ) total_shifts[i] = 0.0; - /* Refine (max 10 cycles) */ - for ( i=0; i<10; i++ ) { + /* Refine (max 5 cycles) */ + for ( i=0; i<5; i++ ) { update_predictions(cr); if ( iterate(rps, n, crystal_get_cell(cr), image, Minvs, total_shifts) ) { |