diff options
-rw-r--r-- | libcrystfel/src/geometry.c | 1 | ||||
-rw-r--r-- | src/post-refinement.c | 96 |
2 files changed, 0 insertions, 97 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c index 6e867ead..e8e2f9ac 100644 --- a/libcrystfel/src/geometry.c +++ b/libcrystfel/src/geometry.c @@ -622,7 +622,6 @@ static double do_integral(double q2, double zl, double R, } - static void ginn_spectrum_partialities(Crystal *cryst) { RefList *list; diff --git a/src/post-refinement.c b/src/post-refinement.c index f20f9832..05d7889f 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -78,102 +78,6 @@ const char *str_prflag(enum prflag flag) } -static void apply_cell_shift(UnitCell *cell, int k, double shift) -{ - double asx, asy, asz; - double bsx, bsy, bsz; - double csx, csy, csz; - double as, bs, cs; - - cell_get_reciprocal(cell, &asx, &asy, &asz, - &bsx, &bsy, &bsz, - &csx, &csy, &csz); - as = modulus(asx, asy, asz); - bs = modulus(bsx, bsy, bsz); - cs = modulus(csx, csy, csz); - - /* Forbid any step which looks too large */ - switch ( k ) - { - case GPARAM_ASX : - case GPARAM_ASY : - case GPARAM_ASZ : - if ( fabs(shift) > 0.1*as ) return; - break; - - case GPARAM_BSX : - case GPARAM_BSY : - case GPARAM_BSZ : - if ( fabs(shift) > 0.1*bs ) return; - break; - - case GPARAM_CSX : - case GPARAM_CSY : - case GPARAM_CSZ : - if ( fabs(shift) > 0.1*cs ) return; - break; - } - - switch ( k ) - { - case GPARAM_ASX : asx += shift; break; - case GPARAM_ASY : asy += shift; break; - case GPARAM_ASZ : asz += shift; break; - case GPARAM_BSX : bsx += shift; break; - case GPARAM_BSY : bsy += shift; break; - case GPARAM_BSZ : bsz += shift; break; - case GPARAM_CSX : csx += shift; break; - case GPARAM_CSY : csy += shift; break; - case GPARAM_CSZ : csz += shift; break; - } - - cell_set_reciprocal(cell, asx, asy, asz, - bsx, bsy, bsz, - csx, csy, csz); -} - - -/* Apply the given shift to the 'k'th parameter of 'image'. */ -static void apply_shift(Crystal *cr, int k, double shift) -{ - double t; - struct image *image = crystal_get_image(cr); - - switch ( k ) { - - case GPARAM_DIV : - if ( shift > 0.1*image->div ) return; - image->div += shift; - if ( image->div < 0.0 ) image->div = 0.0; - break; - - case GPARAM_R : - t = crystal_get_profile_radius(cr); - if ( shift > 0.1*t ) return; - t += shift; - crystal_set_profile_radius(cr, t); - break; - - case GPARAM_ASX : - case GPARAM_ASY : - case GPARAM_ASZ : - case GPARAM_BSX : - case GPARAM_BSY : - case GPARAM_BSZ : - case GPARAM_CSX : - case GPARAM_CSY : - case GPARAM_CSZ : - apply_cell_shift(crystal_get_cell(cr), k, shift); - break; - - default : - ERROR("No shift defined for parameter %i\n", k); - abort(); - - } -} - - double residual(Crystal *cr, const RefList *full, int free, int *pn_used, const char *filename) { |