diff options
author | Thomas White <taw@physics.org> | 2012-04-02 19:30:06 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-04-02 19:30:06 +0200 |
commit | c876a962ba6ffa84233429928ec55f7326d8e5e5 (patch) | |
tree | 315a0417b971b3ea98b956f359738b9f48af4e1e /src/indexamajig.c | |
parent | 05ae5bfa6f337cfd9fc9b839e3ff471ddaca1cbc (diff) |
indexamajig: Check beam file is present early, not in process_image()
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r-- | src/indexamajig.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index efbf4b44..281cac43 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -271,12 +271,6 @@ static void process_image(void *pp, int cookie) image.copyme = pargs->static_args.copyme; image.beam = beam; - if ( beam == NULL ) { - ERROR("Warning: no beam parameters file.\n"); - ERROR("I'm going to assume 1 ADU per photon, which is almost"); - ERROR(" certainly wrong. Peak sigmas will be incorrect.\n"); - } - pargs->indexable = 0; hdfile = hdfile_open(filename); @@ -975,6 +969,12 @@ int main(int argc, char *argv[]) nominal_photon_energy = 2000.0; } + if ( beam == NULL ) { + ERROR("Warning: no beam parameters file.\n"); + ERROR("I'm going to assume 1 ADU per photon, which is almost"); + ERROR(" certainly wrong. Peak sigmas will be incorrect.\n"); + } + /* Get first filename and use it to set up the indexing */ prepare_line = malloc(1024*sizeof(char)); rval = fgets(prepare_line, 1023, fh); |