From 25cfcc9e110ff087f22e5c7945ff1ec37ac76e22 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 12 Jan 2024 10:01:40 +0100 Subject: 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. --- src/gui_backend_local.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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, -- cgit v1.2.3