aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/predict-refine.c
AgeCommit message (Collapse)Author
2024-04-16Tweak prediction refinement weightingsThomas White
2024-02-06Crystals shouldn't own RefLists (part 4)Thomas White
This fixes the general prediction/partiality parts.
2024-02-06Use libcrystfel memory allocation routines everywhereThomas White
2024-02-06Crystal: Remove reference to image structure (part 1)Thomas White
2024-01-12indexamajig: Implement --max-mille-levelThomas White
2023-09-20Fix inappropriate use of r_devThomas White
These should be get_exerr. Following 1ae9a4582, the r_dev values are no longer useful physical quantities, only a refinement target function. This was causing the last few Git versions to not predict any reflections at all!
2023-09-19Prediction refinement: Weaken restraint and reduce number of iterationsThomas White
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.
2023-09-18Use a*a instead of pow(a, 2)Thomas White
2023-09-18Build EXC_WEIGHT into r_devThomas White
This avoids weird weighting factors everywhere and much confusion. Since Millepede doesn't have an easy way of weighting measurements (only via altering the ESD values), treating it as a units conversion seems to be easier.
2023-09-18pred_residual: Remove vestigial conversion to metresThomas White
We want the residual in pixels, as described in the comment for EXC_WEIGHT. This routine is only used for displaying the total residuals, not for the real minimisation maths. However, we need to be clear.
2023-09-18Prediction refinement: Record excitation error and distance residuals separatelyThomas White
2023-09-18Prediction refinement: Record initial residual and total shiftsThomas White
2023-09-12Fix sense of panel rotationsThomas White
Should always be a right-hand grip rotation around positive axis direction.
2023-08-30Add excitation error to Millepede data (local-only measurement)Thomas White
2023-08-24Use built-in Mille writer instead of wrapping C++ versionThomas White
2023-07-28Fix some memory leaksThomas White
2023-07-28Adjust refinement weights and restraintsThomas White
2023-07-28Fix parameter refinement unitsThomas White
The *parameters* will be in metres, radians, m^-1 for translation, rotation and cell parameters respectively. The *residuals*, however, are in pixels.
2023-07-28Rotation centre coordinates need to be in metres (not pixels)Thomas White
2023-07-28Fix iterate() for prediction refinementThomas White
I was confused when I wrote acd0de4e4a21, and completely broke the maths. To fix it, I copied the guts of iterate() back from the old version and re-created the intermediate steps - switching x/y to fs/ss, calculating fs/ss gradients together and the hooks for Minv.
2023-07-28Redefine ray vector without trigonometryThomas White
This makes the gradients very simple!
2023-07-28Implement rotation gradients (with test)Thomas White
2023-07-28Separate gradients into "panel" and "physics" partsThomas White
2023-07-28Factorise matrix operationsThomas White
This makes the code much clearer. Note that two opposing sign errors have been fixed in the gradient calculation.
2023-07-28Implement panel x gradientsThomas White
2023-07-28Calculate panel MinvsThomas White
2023-07-28Calculate fs and ss gradients together, SPOT panel number, add matrix hooksThomas White
2023-07-28r_gradient: Re-order parameters to match {fs,ss}_gradientThomas White
2023-07-28Trim the list of geometric parametersThomas White
2023-07-28Don't refine detector at all, in prediction refinementThomas White
Following the advice in https://doi.org/10.1107/S2059798318009191
2023-07-28Remove a #defineThomas White
2023-07-28Reduce scope of rv[]Thomas White
2023-07-28Move gradients to predict-refineThomas White
Makes sense for the _dev and _gradient functions to be in the same place.,
2023-07-28Put residual into metresThomas White
2023-07-28Remove z-component and x/y trackingThomas White
2023-07-28Initial re-parameterisation of prediction refinement with fs/ss coordinatesThomas White
The gradients need to be updated.
2023-07-28z-rotation gradientsThomas White
2023-07-28indexamajig: Set all group translation gradientsThomas White
2023-07-28Move Mille stuff to separate fileThomas White
2023-07-28Remove excitation error termsThomas White
2023-07-28Add clen refinementThomas White
2023-07-28Add profiling for MilleThomas White
2023-07-28Set sensible sigma values for MilleThomas White
2023-07-28Add Millepede measurementsThomas White
2023-07-28indexamajig: Hooks for MilleThomas White
2022-07-12Zero-weight negative intensity peaks in prediction refinementThomas White
Strongly negative peaks can occur if there are unmasked bad pixels. These cause the refinement to diverge badly. This change stabilises the refinement such that it works even in these cases. But of course, the real solution is to mask out those pixels. Negative intensity peaks are unlikely to show up "for real" in the peak search results (because we look for strong peaks!). However, if the intensity is negative, we aren't even sure that the peak exists at all and have no reason to assume it should be close to the Bragg condition.
2022-06-09pair_peaks: Use fabs instead of abs for floating point valuesThomas White
2021-11-15pair_peaks: Use reciprocal space distance instead of pixel distanceThomas White
The reciprocal space distance limit has been set as one third of the smallest inter-Bragg spacing. Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/38
2021-11-15Ensure that crystal doesn't end up with invalid reflist after prediction ↵Thomas White
refinement
2021-10-22pair_peaks: Skip reflections if the indices are too largeThomas White