Commit c876a962 authored by Thomas White's avatar Thomas White
Browse files

indexamajig: Check beam file is present early, not in process_image()

parent 05ae5bfa
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment