aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
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);