diff options
author | Thomas White <taw@physics.org> | 2018-05-04 13:46:10 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-05-04 15:21:13 +0200 |
commit | bda480005b278f82800d830d133d4cdba4ea5d97 (patch) | |
tree | 983af8c7469ffbf8bed714bd8fc78c570f959012 /libcrystfel | |
parent | d3bcb1e80cded372399c8afa3611799f7af093ad (diff) |
Put list of indexing methods into stream header
Needed for when the methods are auto-determined.
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/stream.c | 20 | ||||
-rw-r--r-- | libcrystfel/src/stream.h | 3 |
2 files changed, 20 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 diff --git a/libcrystfel/src/stream.h b/libcrystfel/src/stream.h index b50da832..a8e3e2ee 100644 --- a/libcrystfel/src/stream.h +++ b/libcrystfel/src/stream.h @@ -99,6 +99,9 @@ extern Stream *open_stream_for_write_2(const char *filename, extern Stream *open_stream_for_write_3(const char *filename, const char* geom_filename, UnitCell *cell, int argc, char *argv[]); +extern Stream *open_stream_for_write_4(const char *filename, + const char *geom_filename, UnitCell *cell, + int argc, char *argv[], const char *indm_str); extern Stream *open_stream_fd_for_write(int fd); extern int get_stream_fd(Stream *st); extern void close_stream(Stream *st); |