diff options
author | Thomas White <taw@bitwiz.org.uk> | 2012-10-20 06:42:49 -0700 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2012-10-20 06:42:49 -0700 |
commit | 868e9aeb547d990b5dfbf0df39efc3f8d468541b (patch) | |
tree | 2096e533a784064f09215bc9260c809a50d7fd74 /src/im-sandbox.c | |
parent | b8b1b1ddb214823e3d9a0a30e3613399e52b87b0 (diff) | |
parent | b5000a6e66dbc7a0c01f06add3656044aeb8b894 (diff) |
Merge remote-tracking branch 'bitwiz/nadia/minorthings'
Diffstat (limited to 'src/im-sandbox.c')
-rw-r--r-- | src/im-sandbox.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c index 1a344125..98278571 100644 --- a/src/im-sandbox.c +++ b/src/im-sandbox.c @@ -248,8 +248,27 @@ static void process_image(const struct index_args *iargs, return; } } + + if ( image.lambda > 1000 ) { + if ( beam != NULL ) { + ERROR("Nonsensical wavelength in HDF5." + "Using nominal photon energy from beam file: %.2f eV\n", + beam->photon_energy); + image.lambda = ph_en_to_lambda( + eV_to_J(beam->photon_energy)); + } else { + ERROR("No wavelength in file, so you need to give " + "a beam parameters file with -b.\n"); + hdfile_close(hdfile); + free_detector_geometry(image.det); + return; + } + } + fill_in_values(image.det, hdfile); + + if ( config_cmfilter ) { filter_cm(&image); } |