From d6982b711b365477a3e44d2e20044f770fb9010f Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 20 Oct 2021 14:28:47 +0200 Subject: Set crystal name in MTZ files When using the GUI, it will be set to the corresponding indexing result name. --- libcrystfel/src/reflist-utils.c | 11 ++++------- libcrystfel/src/reflist-utils.h | 3 ++- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/reflist-utils.c b/libcrystfel/src/reflist-utils.c index 8f461522..a2de12d8 100644 --- a/libcrystfel/src/reflist-utils.c +++ b/libcrystfel/src/reflist-utils.c @@ -1030,7 +1030,9 @@ int write_to_mtz(RefList *reflist, double min_res, double max_res, const char *filename, - const char *dataset_name) + const char *dataset_name, + const char *crystal_name, + const char *project_name) { #ifdef HAVE_LIBCCP4 MTZ *mtz; @@ -1076,12 +1078,7 @@ int write_to_mtz(RefList *reflist, cellp[4] = rad2deg(be); cellp[5] = rad2deg(ga); - /* FIXME: Proposed labelling (GitLab #28): - * title = as above - * project = basename of folder containing crystfel.project - * crystal = name of indexing results run - * dataset = name of merge results run */ - cr = MtzAddXtal(mtz, "Crystal_name", "Project_name", cellp); + cr = MtzAddXtal(mtz, crystal_name, project_name, cellp); ds = MtzAddDataset(mtz, cr, dataset_name, 0.0); columns[0] = MtzAddColumn(mtz, ds, "H", "H"); columns[1] = MtzAddColumn(mtz, ds, "K", "H"); diff --git a/libcrystfel/src/reflist-utils.h b/libcrystfel/src/reflist-utils.h index bd60c642..ef65fba8 100644 --- a/libcrystfel/src/reflist-utils.h +++ b/libcrystfel/src/reflist-utils.h @@ -81,7 +81,8 @@ extern void reflist_add_command_and_version(RefList *list, extern int write_to_mtz(RefList *reflist, SymOpList *sym, UnitCell *cell, double min_res, double max_res, - const char *filename, const char *dataset_name); + const char *filename, const char *dataset_name, + const char *crystal_name, const char *project_name); extern int write_to_xds(RefList *reflist, SymOpList *sym, UnitCell *cell, double min_res, double max_res, const char *filename); -- cgit v1.2.3