diff options
author | Thomas White <taw@physics.org> | 2014-10-16 16:28:35 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-10-23 17:02:32 +0200 |
commit | cb08ffbe0adeed6502db70f3380059800464726d (patch) | |
tree | 0dccc8ee60ccad060fbb8778c4c15a3e52fa0074 /libcrystfel/src | |
parent | 64a006630632c58be1ca740d7f12041879da6e00 (diff) |
Add serial numbers to chunks
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/image.h | 2 | ||||
-rw-r--r-- | libcrystfel/src/stream.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/libcrystfel/src/image.h b/libcrystfel/src/image.h index 6589ac1a..2498b5c2 100644 --- a/libcrystfel/src/image.h +++ b/libcrystfel/src/image.h @@ -183,6 +183,8 @@ struct image { int id; /* ID number of the thread * handling this image */ + int serial; /* Monotonically ascending serial + * number for this image */ struct sample *spectrum; int nsamples; /* Number of wavelengths */ diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 04627a0c..6ae6fd64 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -634,6 +634,8 @@ void write_chunk(Stream *st, struct image *i, struct hdfile *hdfile, fprintf(st->fh, "Event: %s\n", get_event_string(i->event)); } + fprintf(st->fh, "Image serial number: %i\n", i->serial); + indexer = indexer_str(i->indexed_by); fprintf(st->fh, "indexed_by = %s\n", indexer); free(indexer); |