diff options
author | Thomas White <taw@physics.org> | 2011-03-28 18:00:27 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:22 +0100 |
commit | 2a6ce4a23bd88ca2603b47559ac831dbead6c6ad (patch) | |
tree | 93b7d1c005b81a4050ba8ce92aed3ba5ea1d4c4f /src | |
parent | 49c9f1e1e7a01c09c1cebd99ca1dc6c32eec284d (diff) |
Update docs
Diffstat (limited to 'src')
-rw-r--r-- | src/cell.c | 23 | ||||
-rw-r--r-- | src/cell.h | 7 | ||||
-rw-r--r-- | src/reflist-utils.c | 32 |
3 files changed, 62 insertions, 0 deletions
@@ -26,6 +26,20 @@ #include "image.h" +/** + * SECTION:unitcell + * @short_description: Unit cell + * @title: UnitCell + * @section_id: + * @see_also: + * @include: "cell.h" + * @Image: + * + * This structure represents a unit cell. + */ + + + /* Weighting factor of lengths relative to angles */ #define LWEIGHT (10.0e-9) @@ -64,6 +78,15 @@ struct _unitcell { /************************** Setters and Constructors **************************/ + +/** + * cell_new: + * + * Create a new %UnitCell. + * + * Returns: the new unit cell, or NULL on failure. + * + */ UnitCell *cell_new() { UnitCell *cell; @@ -26,6 +26,13 @@ struct rvec double w; }; + +/** + * UnitCell: + * + * This data structure is opaque. You must use the available accessor functions + * to read and write its contents. + **/ typedef struct _unitcell UnitCell; extern UnitCell *cell_new(void); 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; |