diff options
author | Thomas White <taw@physics.org> | 2010-09-24 17:14:35 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:26:59 +0100 |
commit | 237f0f65e210812db7566ffd2d95ac2ada65cf34 (patch) | |
tree | 8ec9ac92487db9a0b5069855367c352a79d40745 | |
parent | f062338ad3177a118e75f72739f90c8df7c38fa4 (diff) |
Get detector gain for error esimates from parameters-lcls.tmp
-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); } |