diff options
author | Thomas White <taw@physics.org> | 2010-10-27 11:39:14 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:04 +0100 |
commit | 679af12a3b4fea2dbdb39cfc56272816f51a2c79 (patch) | |
tree | 7ffc38d596b6b8127ade29d7583a58fa231bd57e /src/hdf5-file.c | |
parent | 80e6d044ba9237d2778d91bbb585aa93297a135e (diff) |
Take nominal photon energy from file
Diffstat (limited to 'src/hdf5-file.c')
-rw-r--r-- | src/hdf5-file.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/hdf5-file.c b/src/hdf5-file.c index bcd51f99..a24a663a 100644 --- a/src/hdf5-file.c +++ b/src/hdf5-file.c @@ -390,7 +390,8 @@ static void debodge_saturation(struct hdfile *f, struct image *image) } -int hdf5_read(struct hdfile *f, struct image *image, int satcorr) +int hdf5_read(struct hdfile *f, struct image *image, int satcorr, + double nominal_photon_energy) { herr_t r; float *buf; @@ -432,8 +433,8 @@ int hdf5_read(struct hdfile *f, struct image *image, int satcorr) /* Read wavelength from file */ image->lambda = get_wavelength(f); if ( image->lambda < 0.0 ) { - ERROR("Couldn't read wavelength - using 2 keV.\n"); - image->lambda = ph_en_to_lambda(eV_to_J(2000.0)); + ERROR("Couldn't read wavelength - using nominal value.\n"); + image->lambda = ph_en_to_lambda(eV_to_J(nominal_photon_energy)); } image->f0 = get_f0(f); |