From 8a15866307f7dde7ba70ed9de756cf0392904e30 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 3 Mar 2014 15:10:54 +0100 Subject: Add things to stream if they were mentioned in beam or geom, and remove clen_ entries --- src/indexamajig.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src') diff --git a/src/indexamajig.c b/src/indexamajig.c index 40a3ecc8..3f010b12 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -149,6 +149,27 @@ static void show_help(const char *s) } +static void add_geom_beam_stuff_to_copy_hdf5(struct copy_hdf5_field *copyme, + struct detector *det, + struct beam_params *beam) +{ + int i; + + for ( i=0; in_panels; i++ ) { + + struct panel *p = &det->panels[i]; + + if ( p->clen_from != NULL ) { + add_copy_hdf5_field(copyme, p->clen_from); + } + } + + if ( beam->photon_energy_from != NULL ) { + add_copy_hdf5_field(copyme, beam->photon_energy_from); + } +} + + int main(int argc, char *argv[]) { int c; @@ -525,6 +546,8 @@ int main(int argc, char *argv[]) return 1; } + add_geom_beam_stuff_to_copy_hdf5(iargs.copyme, iargs.det, iargs.beam); + if ( pdb != NULL ) { iargs.cell = load_cell_from_pdb(pdb); if ( iargs.cell == NULL ) { -- cgit v1.2.3