diff options
author | Thomas White <taw@physics.org> | 2012-03-09 15:48:41 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-03-09 15:48:41 +0100 |
commit | 2ac15877ab35dca76569376d180d1bd899e24a54 (patch) | |
tree | b8ca1908e9cb31c13085b2354c010defb32231f3 /libcrystfel/src/reflist-utils.c | |
parent | 17b4e2c20a69e4c11cf96fc120541674ff4ec704 (diff) |
process_hkl: Add polarisation correction and improved scaling
Diffstat (limited to 'libcrystfel/src/reflist-utils.c')
-rw-r--r-- | libcrystfel/src/reflist-utils.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/libcrystfel/src/reflist-utils.c b/libcrystfel/src/reflist-utils.c index 53ab399a..a84371f3 100644 --- a/libcrystfel/src/reflist-utils.c +++ b/libcrystfel/src/reflist-utils.c @@ -471,3 +471,34 @@ RefList *res_cutoff(RefList *list, UnitCell *cell, double min, double max) reflist_free(list); return new; } + + +/** + * copy_reflist: + * @list: A %RefList + * + * Returns: A copy of %RefList. + **/ +RefList *copy_reflist(RefList *list) +{ + Reflection *refl; + RefListIterator *iter; + RefList *new; + + new = reflist_new(); + + for ( refl = first_refl(list, &iter); + refl != NULL; + refl = next_refl(refl, iter) ) + { + signed int h, k, l; + Reflection *n; + + get_indices(refl, &h, &k, &l); + + n = add_refl(new, h, k, l); + copy_data(n, refl); + } + + return new; +} |