aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2024-01-12 10:01:40 +0100
committerThomas White <taw@physics.org>2024-01-12 10:01:40 +0100
commit25cfcc9e110ff087f22e5c7945ff1ec37ac76e22 (patch)
tree9d0cff48a259e5cfba83805350fe8adc48bdcd0d
parentc2ba0eb77f0da8ba825ede18eb1c6e6d5bee424a (diff)
GUI: Copy geometry file into indexing job folder
This could be used for indexing, but it seems more transparent to have the "real" filename in the script for auditing. The geometry copy will be used for detector alignment. The alternative - extracting the geometry from the stream - seems quite a lot more complicated.
-rw-r--r--src/gui_backend_local.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui_backend_local.c b/src/gui_backend_local.c
index d2068250..71c94871 100644
--- a/src/gui_backend_local.c
+++ b/src/gui_backend_local.c
@@ -535,6 +535,9 @@ static void *run_indexing(const char *job_title,
gchar *stream_rel_filename;
gchar *harvest_rel_filename;
gchar *mille_rel_filename;
+ GFile *ggeom;
+ GFile *ggeomcopy;
+ GError *error;
workdir = make_job_folder(job_title, job_notes);
if ( workdir == NULL ) return NULL;
@@ -558,6 +561,16 @@ static void *run_indexing(const char *job_title,
harvest_rel_filename = relative_to_cwd(workdir, "parameters.json");
mille_rel_filename = relative_to_cwd(workdir, "mille-data");
+ /* Copy geometry file into working directory
+ * Used for geometry refinement, not indexing! */
+ ggeom = g_file_new_for_path(proj->geom_filename);
+ ggeomcopy = g_file_get_child(workdir, "detector.geom");
+ error = NULL;
+ g_file_copy(ggeom, ggeomcopy, G_FILE_COPY_BACKUP | G_FILE_COPY_ALL_METADATA,
+ NULL, NULL, NULL, &error);
+ g_object_unref(ggeom);
+ g_object_unref(ggeomcopy);
+
if ( !write_indexamajig_script(sc_rel_filename,
proj->geom_filename,
n_thread_str,