diff options
-rw-r--r-- | libcrystfel/src/image.c | 4 | ||||
-rw-r--r-- | src/indexamajig.c | 21 | ||||
-rw-r--r-- | src/process_image.c | 13 | ||||
-rw-r--r-- | src/process_image.h | 1 |
4 files changed, 7 insertions, 32 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index bfb3d760..2e9249e8 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -616,6 +616,10 @@ struct image *image_read(DataTemplate *dtempl, image->bw = dtempl->bandwidth; + /* FIXME: Possibly load spectrum from file */ + image->spectrum = spectrum_generate_gaussian(image->lambda, + image->bw); + create_detgeom(image, dtempl); image->bad = malloc(dtempl->n_panels * sizeof(int *)); diff --git a/src/indexamajig.c b/src/indexamajig.c index 98573839..7ef4f35c 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -78,7 +78,6 @@ struct indexamajig_arguments int check_prefix; int n_proc; char *cellfile; - char *spectrum_fn; char *indm_str; int basename; int zmq; @@ -208,10 +207,9 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) break; case 209 : - args->spectrum_fn = strdup(arg); - ERROR("WARNING: Prediction using arbitrary spectrum does not " - "yet work in a useful way.\n"); - break; + ERROR("--spectrum-filename is no longer used.\n"); + ERROR("Specify the radiation spectrum via the geometry file instead.\n"); + return 1; case 210 : args->no_mask_data = 1; @@ -599,7 +597,6 @@ int main(int argc, char *argv[]) args.check_prefix = 1; args.n_proc = 1; args.cellfile = NULL; - args.spectrum_fn = NULL; args.indm_str = NULL; args.basename = 0; args.zmq = 0; @@ -888,18 +885,6 @@ int main(int argc, char *argv[]) args.iargs.cell = NULL; } - /* Load spectrum from file if given */ - if ( args.spectrum_fn != NULL ) { - args.iargs.spectrum = spectrum_load(args.spectrum_fn); - if ( args.iargs.spectrum == NULL ) { - ERROR("Couldn't read spectrum (from %s)\n", args.spectrum_fn); - return 1; - } - free(args.spectrum_fn); - } else { - args.iargs.spectrum = NULL; - } - tmpdir = create_tempdir(args.temp_location); if ( tmpdir == NULL ) return 1; diff --git a/src/process_image.c b/src/process_image.c index 179997e2..a04e9468 100644 --- a/src/process_image.c +++ b/src/process_image.c @@ -334,13 +334,6 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, } else { image->div = 0.0; } - /* Set beam spectrum */ - if ( iargs->spectrum != NULL ) { - image->spectrum = iargs->spectrum; - } else { - image->spectrum = spectrum_generate_gaussian(image->lambda, - image->bw); - } if ( image_feature_count(image->features) < iargs->min_peaks ) { r = chdir(rn); @@ -444,12 +437,6 @@ out: sb_shared->n_hadcrystals += any_crystals; pthread_mutex_unlock(&sb_shared->totals_lock); - /* Free spectrum only if we generated it for this image */ - if ( iargs->spectrum == NULL ) { - spectrum_free(image->spectrum); - image->spectrum = NULL; - } - /* Free image (including detgeom) */ image_free(image); diff --git a/src/process_image.h b/src/process_image.h index 50f69918..0adafb1c 100644 --- a/src/process_image.h +++ b/src/process_image.h @@ -95,7 +95,6 @@ struct index_args float fix_profile_r; float fix_divergence; int overpredict; - Spectrum *spectrum; signed int wait_for_file; /* -1 means wait forever */ int no_image_data; int no_mask_data; |