aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/cell-utils.c
AgeCommit message (Collapse)Author
2021-09-07load_cell_from_file: Check fgets return value for first lineThomas White
2021-07-22Clean up shadowed variablesThomas White
2021-07-21Reduce variable scope where possibleThomas 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-05-07Add has_unique_axis()Thomas White
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-05Mass update of copyright dates in source code commentsThomas White
2021-01-11resolution(): Use reciprocal representation instead of crystallographicThomas White
This avoids a load of trigonometric functions. In combination with the new UnitCell representation caching, this gives a significant speedup for cases where resolution() is called in a loop.
2021-01-11UnitCell: Store all representations once they're calculatedThomas White
Previously, the "getter" functions would re-calculate the requested representation every time they were called. This could mean doing a matrix inversion in the middle of a tight loop, wasting loads of time. Now, it stores the calculated values and returns them directly next time. Setting the parameters invalidates the values for all representations other than the one given. The cost of doing this is that the cell can no longer be "const" in the getter functions. This tracked through some other code, but nothing too severe.
2021-01-06partialator: Reject crystals with obviously too large profile radiiThomas White
The criterion for "too large" is 20% of the 1/d value for the lowest reflection which is not systematically absent according to the centering. A profile radius larger than the 1/d value for a reflection will crash the xsphere partiality model, and some visualisation shows that this is a clearly non-physical situation. The profile radius shouldn't be anywhere near the inter-Bragg spacing for reasonable data. However, feedback shows that this is happening quite often in real data, probably due to bad indexing.
2020-10-26Label all uses of cell tolerancesThomas White
I'm sick of fixing this same issue over and over again. New rule: any code handling unit cell tolerances MUST be labelled with details of units.
2020-10-22compare_cell_parameters: Accept R/P pair as equivalentThomas White
See 0f18ff76a3d1f5979db for some discussion.
2020-07-29Add cell_print_onelineThomas White
2020-07-29Const-cleaningThomas White
2020-05-12Add missing newline in error messageThomas White
2020-05-12Fix silly mistake in cell reductionThomas White
2020-03-13uncenter_cell(): Convert R to PThomas White
Otherwise, the cell comparison doesn't recognise the cells as the same, breaking indexing with an R reference cell. Unfortunately, the resulting cell after comparison by compare_r_c_p still comes out as P, but that doesn't seem like a big loss. To get it strictly correct, we'd need some way of tracking through the information that the cell got "uncentered" from R to P, even though the matrix is an identity.
2020-02-11Fix comment typoThomas White
2020-01-10Mass update of copyright datesThomas White
2019-10-22Add some warnings and assertionsThomas White
2019-10-22reduce_g6: Fix sign criterion for step 3Thomas White
2019-09-12Fix possibly uninitialised CiAMCBThomas White
2019-09-03Fix memory leaks in cell comparisonThomas White
2019-08-29compare_reindexed_cell_parameters: Increase number of possibilities in final ↵Thomas White
permutation check More than 5 possible when there are axes with similar lengths.
2019-08-29Fix commentThomas White
2019-08-28compare_reindexed_cell_parameters: (Sort of) intelligent choice of solutionThomas White
2019-08-28Rationalise matrix mutliplicationThomas White
compare_reindexed_cell_parameters still needs to be updated
2019-08-28Avoid converting IntegerMatrix to RationalMatrixThomas White
2019-08-23Fix Niggli reduction logicThomas White
2019-08-22Remove match_cell and match_cell_abThomas White
2019-08-22Fix matrix multiplicationThomas White
2019-08-22Final implementation of Niggli-based cell comparisonThomas White
2019-08-22Tidy up comparison function definitionsThomas White
Especially, remove the last ltl/atl tolerance values.
2019-08-22Clean up / debugThomas White
2019-08-22Determine cell reduction tolerance automaticallyThomas White
2019-08-22Working Niggli reductionThomas White
2019-08-22Framework for new unit cell comparison functionThomas White
2019-08-22G6 cell reductionThomas White
Doesn't work yet
2019-08-16g6_distance: Take UnitCellThomas White
2019-08-16compare_permuted_cell_parameters{_and_orientation}: Accept wrong-handed cellThomas White
2019-08-16Clarify cell vs reference in comparison functions. Also reindexed vs permutedThomas White
2019-08-16Add compare_permuted_cell_parametersThomas White
2019-08-16compare_cell_parameters and compare_reindexed_cell_parameters: Accept 6 ↵Thomas White
tolerances
2019-08-16cell_print{_full}: Handle NULL cellThomas White
2019-08-16cell_volume: Give answer in m^3, not m^3Thomas White
2019-07-24compare_cell_parameters_and_orientation(): Fix documentation and variable namesThomas White
2019-05-07Update all source code comments to Doxygen formatThomas White
2019-04-05compare_reindexed_cell_parameters: Require lattice to be primitive unless ↵Thomas White
csl set
2019-04-05cell_tool: Add --cslThomas White