diff options
author | Thomas White <taw@physics.org> | 2017-09-15 14:29:02 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-09-15 14:33:45 +0200 |
commit | 228f4da5d30418f6176557d07d0b063f5ee6ac00 (patch) | |
tree | 2c0cb0f263fc4b3517ceba2c26d1e93221a057b4 /libcrystfel | |
parent | f8ec4432d198e00998576108199bf0ab0e4b08d4 (diff) |
Add restraints to prediction refinement
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/predict-refine.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c index 015fd94d..e702cf33 100644 --- a/libcrystfel/src/predict-refine.c +++ b/libcrystfel/src/predict-refine.c @@ -488,6 +488,18 @@ static int iterate(struct reflpeak *rps, int n, UnitCell *cell, } + int k; + for ( k=0; k<num_params; k++ ) { + double M_curr; + M_curr = gsl_matrix_get(M, k, k); + if ( (rv[k] == GPARAM_DETX) || (rv[k] == GPARAM_DETY) ) { + M_curr += 10.0; + } else { + M_curr += 1e-18; + } + gsl_matrix_set(M, k, k, M_curr); + } + //show_matrix_eqn(M, v); shifts = solve_svd(v, M, NULL, 0); if ( shifts == NULL ) { |