aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-03-06 18:34:54 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:17 +0100
commitfb54afd078e600183e11caeb0713065b94e7968f (patch)
tree201b1f9f8318765362ee140399c1cd817d4fd1b7 /src/indexamajig.c
parent806844b14db4e87114bc355d2debd9e8f8846c67 (diff)
Add -b option to powder_plot, make hdf5_read() not use nominal energy
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r--src/indexamajig.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 987d026f..1e5fc47a 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -241,8 +241,17 @@ static void process_image(void *pp, int cookie)
}
- hdf5_read(hdfile, &image, pargs->static_args.config_satcorr,
- beam->photon_energy);
+ hdf5_read(hdfile, &image, pargs->static_args.config_satcorr);
+ if ( image.lambda < 0.0 ) {
+ if ( beam != NULL ) {
+ image.lambda = beam->photon_energy;
+ } else {
+ ERROR("No wavelength in file, so you need to give "
+ "a beam parameters file with -b.\n");
+ hdfile_close(hdfile);
+ return;
+ }
+ }
if ( config_cmfilter ) {
filter_cm(&image);