aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-04-02 19:30:06 +0200
committerThomas White <taw@physics.org>2012-04-02 19:30:06 +0200
commitc876a962ba6ffa84233429928ec55f7326d8e5e5 (patch)
tree315a0417b971b3ea98b956f359738b9f48af4e1e /src
parent05ae5bfa6f337cfd9fc9b839e3ff471ddaca1cbc (diff)
indexamajig: Check beam file is present early, not in process_image()
Diffstat (limited to 'src')
-rw-r--r--src/indexamajig.c12
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);