aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/integration.c
AgeCommit message (Collapse)Author
4 daysRevert "integrate_rings_once: Handle case where reflection is negative by < ↵Thomas White
1 photon" This special case is not necessary, because the same situation is already handled by the within-one-photon-of-zero check just before. The value assigned to sig2_poisson in this special case is wrong anyway: it should be aduph*aduph. The wrong value leads to a jump in Poisson sigmas at low intensities. However, the overall sigma is usually dominated by the background variance for weak reflections, so it doesn't make a big difference overall. This reverts commit d4873dff09b3cf314fce0019d76e3a4ca64d7221.
2024-02-06Crystals shouldn't own RefLists (part 3)Thomas White
This fixes integration.c, peaks.c and process_hkl.c.
2024-02-06Use libcrystfel memory allocation routines everywhereThomas White
2024-02-06Crystal: Remove reference to image structure (part 1)Thomas White
2023-07-26intcontext_free: Free the intcontext structure itselfThomas White
2022-11-08indexamajig: Remove warning when using --integration=noneThomas White
For cases where you need it (high performance online processing), it's very spammy.
2021-10-13Remove NCurses dependencyThomas White
It's only used once, to get background colours for 'indexamajig --int-diag', itself a rarely used feature. The dependency itself seems to cause problems for some people, particularly those not using system libraries for everything. So I think it's better just to remove it, and use ANSI escape codes directly.
2021-09-07check_box: Fix type used for sizeofThomas White
2021-08-13Increase threshold for integration warningThomas White
The warning about "XXX reflections couldn't be integrated" is tiresome - it appears for practically every indexed pattern because there are always some reflections that fall in bad regions or at panel edges. This suppresses the warning unless the number of integration failures is more than a quarter of the total number of reflections.
2021-07-21Reduce variable scope where possibleThomas White
2021-07-21Make sure that memory gets freed on realloc failureThomas White
2021-07-21Add missing cleanup on error pathsThomas 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-26Add str_integration_methodThomas White
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
2021-01-08Remove "Bragg proximity check" during integrationThomas White
This test is meant to avoid integrating overlapping spots. It does a very bad job of this, because it doesn't take into account whether the neighbouring reflection is actually excited, or even allowed by the lattice. It's even worse when we think about wide bandwidth.
2021-01-07Formatting fussinessThomas 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-07-30Eliminate duplicate symbolsThomas White
This makes searching easier, and also permits Meson's unity build mode.
2020-07-29Expose a couple more functions for easier testingThomas White
2020-07-29Add low-level integration API (for better testing)Thomas White
2020-07-29Convert more bits to detgeomThomas White
2020-07-29Convert make_BgMask to detgeomThomas White
2020-07-29Convert prediction and integration to detgeomThomas White
2020-03-09integrate_rings_once: Handle case where reflection is negative by < 1 photonThomas White
2020-01-10Mass update of copyright datesThomas White
2019-09-23Get rid of "rescut" integration flagThomas White
Its behaviour is 100% covered by the push-res parameter, which can be set to infinity for no cutoff.
2019-09-17Add warning if reflections could not be integrated (e.g. due to overlap)Thomas White
2019-05-14Remove image.num_peaks and num_saturated_peaksThomas White
These values were inconsistently set by different parts of the code, e.g. different peak search methods. num_saturated_peaks was even set during final integration. Now, the peak count is taken from the ImageFeatureList, so it's authoritative.
2019-05-07Update all source code comments to Doxygen formatThomas White
2018-05-17Merge branch 'tom/cmake'Thomas White
2018-03-22Test for CursesThomas White
2018-02-27indexamajig: Add --overpredictThomas White
2018-02-27New partiality model from Ginn et al.Thomas White
2018-02-27Separate partiality calculation from predictionThomas White
2016-07-01No more slab-relative coordinates in libcrystfelThomas White
2016-04-01Add adu_per_photon (distinct from adu_per_eV)Thomas White
2015-12-10Fix integration tests for new saturation mapThomas White
2015-12-05Add option for per-pixel saturation valuesThomas White
2015-11-17Add a warningThomas White
2015-11-17Make gradient background fitting optionalThomas White
2015-11-10Remove old codeThomas White
2015-11-10Fix hardcoded maximum gradient for integrationThomas White
2015-06-26Plug some more leaksThomas White
2015-06-18Replace semaphore with a mutexThomas White
A mutex (in a shared memory segment) is the correct synchronisation primitive here. I had confused myself...
2015-06-17Use a POSIX semaphore for synchronising terminal access during indexingThomas White
Nice side-effect: indexamajig -j and --int-diag can now be used together
2015-04-28Reject boxes with very large gradients during rings integrationThomas White
2015-04-20Make panel assignments invariant during prediction- and post-refinementThomas White
Reflections appearing and disappearing are problematic when trying to do a least-squares refinement. Therefore, assume that reflections stay on panel and keep them under consideration even if their partialities go to zero (i.e. they drift off Bragg). This should stabilise both refinements, and simplifies quite a lot of code. Collateral "damage": the old "select_intersection()" is now gone.