From 8571d4a0559fa3e448df8f3084bada5008600402 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 22 May 2014 10:34:13 +0200 Subject: Add average_camera_length to stream --- libcrystfel/src/stream.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libcrystfel') diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 34c14573..54d4597e 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -421,6 +421,13 @@ void write_chunk(Stream *st, struct image *i, struct hdfile *hdfile, if ( i->det != NULL ) { int j; + double tclen = 0.0; + + for ( j=0; jdet->n_panels; j++ ) { + tclen += i->det->panels[j].clen; + } + fprintf(st->fh, "average_camera_length = %f m\n", + tclen / i->det->n_panels); for ( j=0; jdet->n_rigid_groups; j++ ) { -- cgit v1.2.3