diff options
-rw-r--r-- | src/parameters-lcls.tmp | 3 | ||||
-rw-r--r-- | src/reflections.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/parameters-lcls.tmp b/src/parameters-lcls.tmp index 1fb35065..e8564bff 100644 --- a/src/parameters-lcls.tmp +++ b/src/parameters-lcls.tmp @@ -5,7 +5,10 @@ #define DQE (0.9) /* ADU per photon (front detector) */ +/* Front detector, December */ #define DETECTOR_GAIN (167.0) +/* Front detector, June */ +//#define DETECTOR_GAIN (20.9) /* Radius of the water column */ #define WATER_RADIUS (3.0e-6 / 2.0) diff --git a/src/reflections.c b/src/reflections.c index d11a3aa0..d187041f 100644 --- a/src/reflections.c +++ b/src/reflections.c @@ -19,6 +19,7 @@ #include "utils.h" #include "cell.h" #include "reflections.h" +#include "parameters-lcls.tmp" void write_reflections(const char *filename, ReflItemList *items, @@ -78,7 +79,7 @@ void write_reflections(const char *filename, ReflItemList *items, } if ( intensity > 0.0 ) { - sigma = 179.0 * sqrt(intensity/179.0); + sigma = DETECTOR_GAIN * sqrt(intensity/DETECTOR_GAIN); } else { sigma = 0.0; } @@ -88,7 +89,8 @@ void write_reflections(const char *filename, ReflItemList *items, h, k, l, intensity, ph, sigma, s/1.0e9, N); } - STATUS("Warning: Errors are only remotely valid for 1/16 gain.\n"); + STATUS("Warning: Errors have been estimated from Poisson distribution" + " assuming %5.2f ADU per photon.\n", DETECTOR_GAIN); fclose(fh); } |