diff options
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) { |