diff options
author | Thomas White <taw@physics.org> | 2015-07-08 14:11:28 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-07-08 15:58:51 +0200 |
commit | 224e98bf0930f654fcfdd4be8ba6cc54510f195a (patch) | |
tree | 9a8e2eca93c1d8f7595e9539bdf5173d9c0caa95 /libcrystfel/src/predict-refine.c | |
parent | 3638ffdee226e248c351362fed7fdc213d4d39b0 (diff) |
Move {x,y}_gradient to geometry.h
Diffstat (limited to 'libcrystfel/src/predict-refine.c')
-rw-r--r-- | libcrystfel/src/predict-refine.c | 118 |
1 files changed, 0 insertions, 118 deletions
diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c index 6784aae2..135002c9 100644 --- a/libcrystfel/src/predict-refine.c +++ b/libcrystfel/src/predict-refine.c @@ -349,124 +349,6 @@ void refine_radius(Crystal *cr, struct image *image) } -/* Returns dx_h/dP, where P = any parameter */ -static double x_gradient(int param, Reflection *refl, UnitCell *cell, - struct panel *p, double lambda) -{ - signed int h, k, l; - double x, z, wn; - double ax, ay, az, bx, by, bz, cx, cy, cz; - - get_indices(refl, &h, &k, &l); - wn = 1.0 / lambda; - cell_get_reciprocal(cell, &ax, &ay, &az, &bx, &by, &bz, &cx, &cy, &cz); - x = h*ax + k*bx + l*cx; - z = h*az + k*bz + l*cz; - - switch ( param ) { - - case GPARAM_ASX : - return h * p->clen / (wn+z); - - case GPARAM_BSX : - return k * p->clen / (wn+z); - - case GPARAM_CSX : - return l * p->clen / (wn+z); - - case GPARAM_ASY : - return 0.0; - - case GPARAM_BSY : - return 0.0; - - case GPARAM_CSY : - return 0.0; - - case GPARAM_ASZ : - return -h * x * p->clen / (wn*wn + 2*wn*z + z*z); - - case GPARAM_BSZ : - return -k * x * p->clen / (wn*wn + 2*wn*z + z*z); - - case GPARAM_CSZ : - return -l * x * p->clen / (wn*wn + 2*wn*z + z*z); - - case GPARAM_DETX : - return -1; - - case GPARAM_DETY : - return 0; - - case GPARAM_CLEN : - return x / (wn+z); - - } - - ERROR("Positional gradient requested for parameter %i?\n", param); - abort(); -} - - -/* Returns dy_h/dP, where P = any parameter */ -static double y_gradient(int param, Reflection *refl, UnitCell *cell, - struct panel *p, double lambda) -{ - signed int h, k, l; - double y, z, wn; - double ax, ay, az, bx, by, bz, cx, cy, cz; - - get_indices(refl, &h, &k, &l); - wn = 1.0 / lambda; - cell_get_reciprocal(cell, &ax, &ay, &az, &bx, &by, &bz, &cx, &cy, &cz); - y = h*ay + k*by + l*cy; - z = h*az + k*bz + l*cz; - - switch ( param ) { - - case GPARAM_ASX : - return 0.0; - - case GPARAM_BSX : - return 0.0; - - case GPARAM_CSX : - return 0.0; - - case GPARAM_ASY : - return h * p->clen / (wn+z); - - case GPARAM_BSY : - return k * p->clen / (wn+z); - - case GPARAM_CSY : - return l * p->clen / (wn+z); - - case GPARAM_ASZ : - return -h * y * p->clen / (wn*wn + 2*wn*z + z*z); - - case GPARAM_BSZ : - return -k * y * p->clen / (wn*wn + 2*wn*z + z*z); - - case GPARAM_CSZ : - return -l * y * p->clen / (wn*wn + 2*wn*z + z*z); - - case GPARAM_DETX : - return 0; - - case GPARAM_DETY : - return -1; - - case GPARAM_CLEN : - return y / (wn+z); - - } - - ERROR("Positional gradient requested for parameter %i?\n", param); - abort(); -} - - static void update_detector(struct detector *det, double xoffs, double yoffs, double coffs) { |