aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui_index.c8
-rw-r--r--src/gui_project.c12
2 files changed, 11 insertions, 9 deletions
diff --git a/src/gui_index.c b/src/gui_index.c
index fab3880f..42df35e7 100644
--- a/src/gui_index.c
+++ b/src/gui_index.c
@@ -824,10 +824,12 @@ char **indexamajig_command_line(const char *geom_filename,
add_arg(args, n_args++, "-p");
add_arg(args, n_args++, indexing_params->cell_file);
}
+ /* indexing_params->tols is in frac (not %) and radians.
+ * Indexamajig command line wants percent and degrees */
snprintf(tols, 2048, "--tolerance=%f,%f,%f,%f,%f,%f",
- rad2deg(indexing_params->tols[0]),
- rad2deg(indexing_params->tols[1]),
- rad2deg(indexing_params->tols[2]),
+ indexing_params->tols[0]*100.0,
+ indexing_params->tols[1]*100.0,
+ indexing_params->tols[2]*100.0,
rad2deg(indexing_params->tols[3]),
rad2deg(indexing_params->tols[4]),
rad2deg(indexing_params->tols[5]));
diff --git a/src/gui_project.c b/src/gui_project.c
index 83d9f083..f0bb2b38 100644
--- a/src/gui_project.c
+++ b/src/gui_project.c
@@ -731,12 +731,12 @@ void default_project(struct crystfelproject *proj)
proj->indexing_params.no_retry = 0;
proj->indexing_params.no_peak_check = 0;
proj->indexing_params.no_cell_check = 0;
- proj->indexing_params.tols[0] = 5.0;
- proj->indexing_params.tols[1] = 5.0;
- proj->indexing_params.tols[2] = 5.0;
- proj->indexing_params.tols[3] = deg2rad(1.5);
- proj->indexing_params.tols[4] = deg2rad(1.5);
- proj->indexing_params.tols[5] = deg2rad(1.5);
+ proj->indexing_params.tols[0] = 0.05; /* frac (not %) */
+ proj->indexing_params.tols[1] = 0.05; /* frac (not %) */
+ proj->indexing_params.tols[2] = 0.05; /* frac (not %) */
+ proj->indexing_params.tols[3] = deg2rad(1.5); /* rad */
+ proj->indexing_params.tols[4] = deg2rad(1.5); /* rad */
+ proj->indexing_params.tols[5] = deg2rad(1.5); /* rad */
proj->indexing_params.min_peaks = 0;
proj->indexing_params.integration_method = strdup("rings");
proj->indexing_params.overpredict = 0;