aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/stream.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-05-04 13:46:10 +0200
committerThomas White <taw@physics.org>2018-05-04 15:21:13 +0200
commitbda480005b278f82800d830d133d4cdba4ea5d97 (patch)
tree983af8c7469ffbf8bed714bd8fc78c570f959012 /libcrystfel/src/stream.c
parentd3bcb1e80cded372399c8afa3611799f7af093ad (diff)
Put list of indexing methods into stream header
Needed for when the methods are auto-determined.
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r--libcrystfel/src/stream.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index db6c6199..47661946 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -1499,12 +1499,13 @@ static void write_cell_to_stream(Stream *st, UnitCell *cell)
/**
- * open_stream_for_write_3
+ * open_stream_for_write_4
* @filename: Filename of new stream
* @geom_filename: The geometry filename to copy
* @cell: A %UnitCell to write into the stream
* @argc: The number of arguments to the program
* @argv: The arguments to the program
+ * @indm_str: The list of indexing methods
*
* Creates a new stream with name @filename, and adds the stream format
* and version header, plus a verbatim copy of the geometry file and the unit
@@ -1512,9 +1513,9 @@ static void write_cell_to_stream(Stream *st, UnitCell *cell)
*
* Returns: a %Stream, or NULL on failure.
*/
-Stream *open_stream_for_write_3(const char *filename,
+Stream *open_stream_for_write_4(const char *filename,
const char *geom_filename, UnitCell *cell,
- int argc, char *argv[])
+ int argc, char *argv[], const char *indm_str)
{
Stream *st;
@@ -1542,6 +1543,10 @@ Stream *open_stream_for_write_3(const char *filename,
if ( (argc > 0) && (argv != NULL) ) {
write_command(st, argc, argv);
}
+
+ if ( indm_str != NULL ) {
+ fprintf(st->fh, "Indexing methods selected: %s\n", indm_str);
+ }
if ( geom_filename != NULL ) {
write_geometry_file(st, geom_filename);
}
@@ -1553,6 +1558,15 @@ Stream *open_stream_for_write_3(const char *filename,
}
+Stream *open_stream_for_write_3(const char *filename,
+ const char *geom_filename, UnitCell *cell,
+ int argc, char *argv[])
+{
+ return open_stream_for_write_4(filename, geom_filename, cell,
+ argc, argv, NULL);
+}
+
+
/**
* open_stream_for_write_2
* @filename: Filename of new stream