diff options
author | Thomas White <taw@physics.org> | 2014-11-14 15:45:47 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-11-14 15:45:47 +0100 |
commit | f98c55524c74647ac999746929b8206f1ab178c0 (patch) | |
tree | 2b8b49446a1aedd75385ae4d3ae9ce481aa0a063 | |
parent | 4d885d3485cd16e838a397f8a2483fcc331c8c87 (diff) |
Background need not be an integer
-rw-r--r-- | libcrystfel/src/detector.c | 2 | ||||
-rw-r--r-- | libcrystfel/src/detector.h | 2 | ||||
-rw-r--r-- | src/pattern_sim.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c index f220d755..a7da92bb 100644 --- a/libcrystfel/src/detector.c +++ b/libcrystfel/src/detector.c @@ -322,7 +322,7 @@ double get_tt(struct image *image, double fs, double ss, int *err) } -void record_image(struct image *image, int do_poisson, int background, +void record_image(struct image *image, int do_poisson, double background, gsl_rng *rng, double beam_radius, double nphotons) { int x, y; diff --git a/libcrystfel/src/detector.h b/libcrystfel/src/detector.h index 9db695d9..9ad90e05 100644 --- a/libcrystfel/src/detector.h +++ b/libcrystfel/src/detector.h @@ -185,7 +185,7 @@ extern double get_tt(struct image *image, double xs, double ys, int *err); extern int in_bad_region(struct detector *det, double fs, double ss); -extern void record_image(struct image *image, int do_poisson, int background, +extern void record_image(struct image *image, int do_poisson, double background, gsl_rng *rng, double beam_radius, double nphotons); extern struct panel *find_panel(struct detector *det, double fs, double ss); diff --git a/src/pattern_sim.c b/src/pattern_sim.c index 41f136bb..af8fd4a4 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -262,7 +262,7 @@ int main(int argc, char *argv[]) SymOpList *sym; int nsamples = 3; gsl_rng *rng; - int background = 0; + double background = 0.0; char *template_file = NULL; Stream *st = NULL; int no_fringes = 0; @@ -403,7 +403,7 @@ int main(int argc, char *argv[]) break; case 5 : - background = strtol(optarg, &rval, 10); + background = strtod(optarg, &rval); if ( *rval != '\0' ) { ERROR("Invalid background level.\n"); return 1; |