aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2016-08-16 11:03:07 +0200
committerThomas White <taw@physics.org>2016-08-16 11:03:07 +0200
commit53cb1d53d0b16e2fe99b1ddd19537c8da9764354 (patch)
treeb8a7bb3ba433102e910bab1ad48b56235554d3d0
parent42e2c1751ca82088f47ca62e796320d334c7a77c (diff)
get_hkl: Preserve input file's notes in output file
-rw-r--r--src/get_hkl.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/get_hkl.c b/src/get_hkl.c
index 7574641e..62c9e608 100644
--- a/src/get_hkl.c
+++ b/src/get_hkl.c
@@ -96,6 +96,12 @@ static void show_help(const char *s)
}
+static void copy_notes(RefList *out, RefList *in)
+{
+ reflist_add_notes(out, reflist_get_notes(in));
+}
+
+
/* Apply Poisson noise to all reflections */
static void poisson_reflections(RefList *list, double adu_per_photon)
{
@@ -152,6 +158,7 @@ static RefList *template_reflections(RefList *list, RefList *template)
RefList *out;
out = reflist_new();
+ copy_notes(out, list);
for ( refl = first_refl(template, &iter);
refl != NULL;
@@ -185,6 +192,7 @@ static RefList *twin_reflections(RefList *in, int need_all_parts,
int n;
out = reflist_new();
+ copy_notes(out, in);
/* No need to free and reallocate this for every reflection */
m = new_symopmask(holo);
@@ -296,6 +304,7 @@ static RefList *expand_reflections(RefList *in, const SymOpList *initial,
}
out = reflist_new();
+ copy_notes(out, in);
m = new_symopmask(initial);
for ( refl = first_refl(in, &iter);
@@ -361,6 +370,7 @@ static RefList *trim_centrics(RefList *in, const SymOpList *sym)
long long int ntrim = 0;
out = reflist_new();
+ copy_notes(out, in);
for ( refl = first_refl(in, &iter);
refl != NULL;
@@ -721,6 +731,7 @@ int main(int argc, char *argv[])
free(cellfile);
n = reflist_new();
+ copy_notes(n, input);
for ( refl = first_refl(input, &iter);
refl != NULL;
@@ -775,6 +786,7 @@ int main(int argc, char *argv[])
cs = modulus(csx, csy, csz);
n = reflist_new();
+ copy_notes(n, input);
for ( refl = first_refl(input, &iter);
refl != NULL;
@@ -809,6 +821,7 @@ int main(int argc, char *argv[])
RefListIterator *iter;
n = reflist_new();
+ copy_notes(n, input);
for ( refl = first_refl(input, &iter);
refl != NULL;