aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/stream.c7
1 files changed, 7 insertions, 0 deletions
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; j<i->det->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; j<i->det->n_rigid_groups; j++ ) {