diff options
author | Thomas White <taw@physics.org> | 2010-10-25 16:00:23 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:03 +0100 |
commit | 380ec553c04576fc3dc4c816127078d3c2cf9e32 (patch) | |
tree | 7f2e4a384bf1ed2285c15817fbbfe46c1add1d64 /src/reflections.c | |
parent | a1408ca8460ef486730b4e5ce11cfca2504edf3b (diff) |
Read beam parameters from file (where appropriate)
Diffstat (limited to 'src/reflections.c')
-rw-r--r-- | src/reflections.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/reflections.c b/src/reflections.c index b26d9528..0474d517 100644 --- a/src/reflections.c +++ b/src/reflections.c @@ -19,12 +19,13 @@ #include "utils.h" #include "cell.h" #include "reflections.h" -#include "parameters.tmp" +#include "beam-parameters.h" void write_reflections(const char *filename, ReflItemList *items, double *intensities, double *phases, - unsigned int *counts, UnitCell *cell) + unsigned int *counts, UnitCell *cell, + double adu_per_photon) { FILE *fh; int i; @@ -79,7 +80,7 @@ void write_reflections(const char *filename, ReflItemList *items, } if ( intensity > 0.0 ) { - sigma = DETECTOR_GAIN * sqrt(intensity/DETECTOR_GAIN); + sigma = adu_per_photon * sqrt(intensity/adu_per_photon); } else { sigma = 0.0; } @@ -90,7 +91,8 @@ void write_reflections(const char *filename, ReflItemList *items, } STATUS("Warning: Errors have been estimated from Poisson distribution" - " assuming %5.2f ADU per photon.\n", DETECTOR_GAIN); + " assuming %5.2f ADU per photon.\n", adu_per_photon); + STATUS("This is not necessarily a useful estimate.\n"); fclose(fh); } |