aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/predict-refine.c
AgeCommit message (Collapse)Author
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
2021-05-17Resolve FIXMEs and TODOsThomas White
Prompted by the article linked below, for each FIXME/TODO I've either referenced an issue in the tracker, or removed it if it's not worth fixing. https://schleiss.io/plotting-source-code-todos-for-open-source-projects
2021-04-27Rename libcrystfel's config.h to libcrystfel-config.hThomas White
This removes the big potential for confusion, which has happened several times (see e.g. 095cbebaf6). It also fixes in-tree builds with CMake (but seriously, always use out-of-tree builds). Fixes #2.
2021-03-25Avoid updating detector geometry structure during prediction refinementThomas White
This makes the behaviour consistent with the prediction itself, and removes another bit of mutable state.
2021-03-23Use crystal's detector shift during predictionThomas White
Previously, this was handled by updating the detector, but this could easily lead to strange double accounting.
2021-03-11detgeom_transform_coords: Take an additional detector shiftThomas White
This allows the refined detector position to be used in a lot of places.
2021-03-05Mass update of copyright dates in source code commentsThomas White
2020-12-07Get rid of ImageFeature->rx,ry,rzThomas White
These needed to be kept up to date with a call to map_all_peaks every time anything changed - wavelength, detector position etc. Not doing so has already led to bugs in another branch, and probably already causes problems on this branch. This patch eliminates the rx,ry,rz completely. Anyone who needs reciprocal space coordinates for a peak is now responsible for calling detgeom_transform_coords themselves.
2020-08-18Formatting/commentsThomas White
2020-08-18predict-refine: Remove out-of-bounds GSL vector accessThomas White
We got away with this because the GSL error handler is turned off in indexamjig.c, and invalid accesses are defined to return 0. However, these accesses should have been removed when the clen refinement was disabled in predict-refine
2020-07-29Convert predict-refine to detgeomThomas White
2020-07-29Convert stream to DataTemplateThomas White
2020-07-29Convert prediction gradients to detgeomThomas White
2020-07-29ImageFeatureList: Store panel number, not pointerThomas White
This makes the conversion to DataTemplate/detgeom MUCH easier.
2020-01-10Mass update of copyright datesThomas White
2019-12-13pair_peaks: Don't attempt to pair 000Thomas White
Normally the beam centre is masked out or not on the detector. However, when it is, pairing with 000 causes gradients to come out as NaN and the prediction refinement to fail.
2019-08-02Fix a small memory leakThomas White
2019-05-07Update all source code comments to Doxygen formatThomas White
2018-11-22Rename prediction refinement residual functionThomas White
Because there's another function with this name in merge.c
2018-07-27indexamajig: Complain if profile radius determination failsThomas White
2018-06-14Remove "unused" flagThomas White
2018-06-14Add final residual from prediction refinement to streamThomas White
2018-02-27New partiality model from Ginn et al.Thomas White
2018-02-27Separate partiality calculation from predictionThomas White
2017-09-15Add restraints to prediction refinementThomas White
2017-09-15Record indices in write_pairs() (debugging function)Thomas White
2016-10-10Fussiness / boilerplateThomas White
2016-10-10Added detector shift to crystal structure, wrote get and get functionsValerio Mariani
2016-07-01No more slab-relative coordinates in libcrystfelThomas White
2016-04-01Remove "Too few paired peaks" warningsThomas White
We know that the prediction refinement is working. These "warnings" are really just synonyms for "indexing failed for this pattern". No big deal.
2015-11-13Fussiness/add a FIXMEThomas White
2015-07-08Move {x,y}_gradient to geometry.hThomas White
2015-07-08Remove unnecessary calculations from prediction refinementThomas White
2015-06-26Fix prediction refinement memory leaksThomas White
2015-06-25Move predict-refine to libcrystfelThomas White