diff options
author | Thomas White <taw@physics.org> | 2023-09-18 13:05:22 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-09-18 13:05:22 +0200 |
commit | 38b4e5fec7fc9d1cf554afa42b4209f14bc3444f (patch) | |
tree | 0f2a3697f1ac2b9667b4b1009a666aac24e2d952 /libcrystfel/src/predict-refine.h | |
parent | b91c1cdbdbd75b3c23f90faf98340e398f583406 (diff) | |
parent | b4e92e6b8851fdb45bd55a3b02fae9f5fa216b1a (diff) |
Merge branch 'millepede'
Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/3
Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/29
Diffstat (limited to 'libcrystfel/src/predict-refine.h')
-rw-r--r-- | libcrystfel/src/predict-refine.h | 51 |
1 files changed, 49 insertions, 2 deletions
diff --git a/libcrystfel/src/predict-refine.h b/libcrystfel/src/predict-refine.h index 5607e356..1e72a048 100644 --- a/libcrystfel/src/predict-refine.h +++ b/libcrystfel/src/predict-refine.h @@ -29,17 +29,64 @@ #ifndef PREDICT_REFINE_H #define PREDICT_REFINE_H +#include <gsl/gsl_matrix.h> + +struct reflpeak; + +/** Enumeration of parameters which may want to be refined */ +enum gparam { + GPARAM_ASX, + GPARAM_ASY, + GPARAM_ASZ, + GPARAM_BSX, + GPARAM_BSY, + GPARAM_BSZ, + GPARAM_CSX, + GPARAM_CSY, + GPARAM_CSZ, + GPARAM_DET_TX, + GPARAM_DET_TY, + GPARAM_DET_TZ, + GPARAM_DET_RX, /* Detector panel (group) rotation about +x */ + GPARAM_DET_RY, /* Detector panel (group) rotation about +y */ + GPARAM_DET_RZ, /* Detector panel (group) rotation about +z */ +}; + + +/* Weighting of excitation error term (m^-1) compared to position term (pixels) */ +#define EXC_WEIGHT (0.5e-7) + + #include "crystal.h" +#include "crystfel-mille.h" -struct image; +struct reflpeak { + Reflection *refl; + struct imagefeature *peak; + double Ih; /* normalised */ +}; /** * \file predict-refine.h * Prediction refinement: refinement of indexing solutions before integration. */ -extern int refine_prediction(struct image *image, Crystal *cr); +extern int refine_prediction(struct image *image, Crystal *cr, Mille *mille); + extern int refine_radius(Crystal *cr, struct image *image); +extern double r_dev(struct reflpeak *rp); + +extern double fs_dev(struct reflpeak *rp, struct detgeom *det); + +extern double ss_dev(struct reflpeak *rp, struct detgeom *det); + +extern double r_gradient(int param, Reflection *refl, UnitCell *cell, + double wavelength); + +extern int fs_ss_gradient(int param, Reflection *refl, UnitCell *cell, + struct detgeom_panel *p, gsl_matrix *panel_Minv, + double cx, double cy, double cz, + float *fsg, float *ssg); #endif /* PREDICT_REFINE_H */ |