aboutsummaryrefslogtreecommitdiff
path: root/src/gui_project.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-10-26 15:06:38 +0100
committerThomas White <taw@physics.org>2020-10-26 15:08:50 +0100
commit2089e6e3c0a34430239dce596bc27db30611ac2f (patch)
tree0b269fba30065b28c51ca3456313d26347fc58e5 /src/gui_project.c
parent6819e268a8401fec0001812e7612909b3211fab1 (diff)
Label all uses of cell tolerances
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.
Diffstat (limited to 'src/gui_project.c')
-rw-r--r--src/gui_project.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui_project.c b/src/gui_project.c
index f0bb2b38..38e800ba 100644
--- a/src/gui_project.c
+++ b/src/gui_project.c
@@ -120,6 +120,7 @@ int match_filename(const char *fn, enum match_type_id mt)
}
+/* "tols" is in frac (not %) and radians */
static void parse_tols(const char *text, float *tols)
{
int r;
@@ -597,6 +598,9 @@ int save_project(struct crystfelproject *proj)
proj->indexing_params.no_peak_check);
fprintf(fh, "indexing.no_cell_check %i\n",
proj->indexing_params.no_cell_check);
+
+ /* Values in file are in percent and degrees */
+ /* Values in "tol" are in frac (not %) and radians */
fprintf(fh, "indexing.cell_tolerance %f,%f,%f,%f,%f,%f\n",
proj->indexing_params.tols[0]*100.0,
proj->indexing_params.tols[1]*100.0,