aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-05-22 10:34:13 +0200
committerThomas White <taw@physics.org>2014-05-22 10:34:13 +0200
commit8571d4a0559fa3e448df8f3084bada5008600402 (patch)
tree0dac5e3b3b62065f0a96d9f5ac3188551bd2e4a1 /libcrystfel/src
parent8c212e3abb7f4343affeb5e9e1092b59d3b74075 (diff)
Add average_camera_length to stream
Diffstat (limited to 'libcrystfel/src')
-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++ ) {