aboutsummaryrefslogtreecommitdiff
path: root/src/reflist-utils.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-28 18:00:27 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:22 +0100
commit2a6ce4a23bd88ca2603b47559ac831dbead6c6ad (patch)
tree93b7d1c005b81a4050ba8ce92aed3ba5ea1d4c4f /src/reflist-utils.c
parent49c9f1e1e7a01c09c1cebd99ca1dc6c32eec284d (diff)
Update docs
Diffstat (limited to 'src/reflist-utils.c')
-rw-r--r--src/reflist-utils.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/reflist-utils.c b/src/reflist-utils.c
index ba212bd1..510dfa42 100644
--- a/src/reflist-utils.c
+++ b/src/reflist-utils.c
@@ -164,6 +164,20 @@ int find_equiv_in_list(RefList *list, signed int h, signed int k,
}
+/**
+ * write_reflections_to_file:
+ * @fh: File handle to write to
+ * @list: The reflection list to write
+ * @cell: Unit cell to use for generating 1/d values, or NULL.
+ *
+ * This function writes the contents of @list to @fh, using @cell to generate
+ * 1/d values to ease later processing. If @cell is NULL, 1/d values will not
+ * be included ('-' will be written in their place).
+ *
+ * Reflections which have a redundancy of zero will not be written.
+ *
+ * The resulting list can be read back with read_reflections_from_file().
+ **/
void write_reflections_to_file(FILE *fh, RefList *list, UnitCell *cell)
{
Reflection *refl;
@@ -207,6 +221,24 @@ void write_reflections_to_file(FILE *fh, RefList *list, UnitCell *cell)
}
+/**
+ * write_reflist:
+ * @filename: Filename
+ * @list: The reflection list to write
+ * @cell: Unit cell to use for generating 1/d values, or NULL.
+ *
+ * This function writes the contents of @list to @file, using @cell to generate
+ * 1/d values to ease later processing. If @cell is NULL, 1/d values will not
+ * be included ('-' will be written in their place).
+ *
+ * Reflections which have a redundancy of zero will not be written.
+ *
+ * The resulting list can be read back with read_reflections_from_file() or
+ * read_reflections().
+ *
+ * This is a convenience function which simply opens @file and then calls
+ * write_reflections_to_file.
+ **/
int write_reflist(const char *filename, RefList *list, UnitCell *cell)
{
FILE *fh;