aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/stream.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-07-06 17:22:11 +0200
committerThomas White <taw@physics.org>2017-07-06 17:24:59 +0200
commit5292f57d4434c7267e8d945871513d742ff42427 (patch)
treed460aa5cef5a501516876850ef243cfc27313d5a /libcrystfel/src/stream.c
parent48d4a6b8e82cce81222ec58fdfb488ed79ce0bcf (diff)
parentdc3395900fc3ce0d3961757628ff83ad6456be19 (diff)
Merge branch 'master' into taketwo
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r--libcrystfel/src/stream.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index e858172e..fb4b0c70 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -806,8 +806,8 @@ static int write_crystal(Stream *st, Crystal *cr, int include_reflections)
}
-int write_chunk(Stream *st, struct image *i, struct hdfile *hdfile,
- int include_peaks, int include_reflections, struct event* ev)
+int write_chunk(Stream *st, struct image *i, struct imagefile *imfile,
+ int include_peaks, int include_reflections, struct event *ev)
{
int j;
char *indexer;
@@ -832,7 +832,7 @@ int write_chunk(Stream *st, struct image *i, struct hdfile *hdfile,
fprintf(st->fh, "beam_divergence = %.2e rad\n", i->div);
fprintf(st->fh, "beam_bandwidth = %.2e (fraction)\n", i->bw);
- copy_hdf5_fields(hdfile, i->copyme, st->fh, ev);
+ imagefile_copy_fields(imfile, i->copyme, st->fh, ev);
if ( i->det != NULL ) {
@@ -1196,13 +1196,9 @@ int read_chunk_2(Stream *st, struct image *image, StreamReadFlags srf)
}
if ( strncmp(line, "indexed_by = ", 13) == 0 ) {
- IndexingMethod *list;
- list = build_indexer_list(line+13);
- if ( list == NULL ) {
+ image->indexed_by = get_indm_from_string(line+13);
+ if ( image->indexed_by == INDEXING_ERROR ) {
ERROR("Failed to read indexer list\n");
- } else {
- image->indexed_by = list[0];
- free(list);
}
}