aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-03-03 15:10:54 +0100
committerThomas White <taw@physics.org>2014-03-03 15:15:19 +0100
commit8a15866307f7dde7ba70ed9de756cf0392904e30 (patch)
tree1bd774d302a7d50a2fb962aa0ae7f07faf0939ee /src
parent425c6c1c4ee91785f546f8cefc020e5dc577cad7 (diff)
Add things to stream if they were mentioned in beam or geom, and remove clen_ entries
Diffstat (limited to 'src')
-rw-r--r--src/indexamajig.c23
1 files changed, 23 insertions, 0 deletions
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; i<det->n_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 ) {