diff options
author | Thomas White <taw@physics.org> | 2013-09-05 16:31:26 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2013-09-05 16:31:26 +0200 |
commit | 73f6c63d1f14f2652bd50bf8a1e2dd5debbaaf3f (patch) | |
tree | e8415c40236afe462868dffa16b2c786d8e64fa7 /libcrystfel | |
parent | 76720a263a298d00652dcce0f12f5be60ec8bc9d (diff) |
Remove vestigial get_wavelength()
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/hdf5-file.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index d6c54616..08954047 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -395,36 +395,6 @@ int hdf5_write_image(const char *filename, struct image *image) } -static double get_wavelength(struct hdfile *f) -{ - herr_t r; - hid_t dh; - double lambda; - int nm = 1; - - dh = H5Dopen2(f->fh, "/LCLS/photon_wavelength_nm", H5P_DEFAULT); - if ( dh < 0 ) { - dh = H5Dopen2(f->fh, "/LCLS/photon_wavelength_A", H5P_DEFAULT); - if ( dh < 0 ) { - ERROR("Couldn't get wavelength from HDF5 file.\n"); - return -1.0; - } - nm = 0; - } - - r = H5Dread(dh, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, - H5P_DEFAULT, &lambda); - H5Dclose(dh); - - if ( r < 0 ) return -1.0; - if ( isnan(lambda) ) return -1.0; - - /* Convert nm -> m */ - if ( nm ) return lambda / 1.0e9; - return lambda / 1.0e10; -} - - static void debodge_saturation(struct hdfile *f, struct image *image) { hid_t dh, sh; @@ -615,9 +585,6 @@ int hdf5_read(struct hdfile *f, struct image *image, int satcorr) } - /* Read wavelength from file */ - image->lambda = get_wavelength(f); - if ( satcorr ) debodge_saturation(f, image); if ( image->det != NULL ) { |