diff options
author | Thomas White <taw@physics.org> | 2014-09-22 18:06:07 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-09-22 18:06:07 +0200 |
commit | 0a5a04cc90619a1973c91489c71585ce127df045 (patch) | |
tree | c1903fc77534cd97840330b914b98b7b1187bce0 /libcrystfel/src/hdf5-file.c | |
parent | 142e1ad4e0fad73d223c67a842dfb9728a3bf34c (diff) |
Beam file removal, part I
Diffstat (limited to 'libcrystfel/src/hdf5-file.c')
-rw-r--r-- | libcrystfel/src/hdf5-file.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index 5093ed84..3fe088d6 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -900,6 +900,21 @@ static int unpack_panels(struct image *image, struct detector *det) } +void fill_in_beam_parameters(struct beam_params *beam, struct hdfile *f, + struct event* ev) +{ + if ( beam->photon_energy_from == NULL ) return; + + if ( ev != NULL ) { + beam->photon_energy = get_ev_based_value(f, + beam->photon_energy_from, ev); + } else { + beam->photon_energy = get_value(f, beam->photon_energy_from); + } + beam->photon_energy *= beam->photon_energy_scale; +} + + int hdf5_read(struct hdfile *f, struct image *image, const char *element, int satcorr) { |