diff options
author | Thomas White <taw@physics.org> | 2011-03-14 15:10:16 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:19 +0100 |
commit | d004d970fc2f83e0bfd81af810fdcea35e47a4ac (patch) | |
tree | 2c47e0d84e3ca9665576b85caa4d309b594d519d /src/hdf5-file.c | |
parent | f27607b8f51779e5bf4b344294122c65e49f008b (diff) |
New stream writing
Diffstat (limited to 'src/hdf5-file.c')
-rw-r--r-- | src/hdf5-file.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/hdf5-file.c b/src/hdf5-file.c index 20141522..eef85591 100644 --- a/src/hdf5-file.c +++ b/src/hdf5-file.c @@ -292,21 +292,21 @@ static double get_wavelength(struct hdfile *f) } -static double get_f0(struct hdfile *f) +static double get_i0(struct hdfile *f) { herr_t r; hid_t dh; - double f0; + double i0; dh = H5Dopen2(f->fh, "/LCLS/f_11_ENRC", H5P_DEFAULT); if ( dh < 0 ) return -1.0; r = H5Dread(dh, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, - H5P_DEFAULT, &f0); + H5P_DEFAULT, &i0); H5Dclose(dh); if ( r < 0 ) return -1.0; - return f0; + return i0; } @@ -434,13 +434,13 @@ int hdf5_read(struct hdfile *f, struct image *image, int satcorr) /* Read wavelength from file */ image->lambda = get_wavelength(f); - image->f0 = get_f0(f); - if ( image->f0 < 0.0 ) { + image->i0 = get_i0(f); + if ( image->i0 < 0.0 ) { ERROR("Couldn't read incident intensity - using 1.0.\n"); - image->f0 = 1.0; - image->f0_available = 0; + image->i0 = 1.0; + image->i0_available = 0; } else { - image->f0_available = 1; + image->i0_available = 1; } if ( satcorr ) debodge_saturation(f, image); |