diff options
author | Thomas White <taw@physics.org> | 2010-06-04 15:04:51 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-06-04 15:04:51 +0200 |
commit | b48699718c0626d3b58f576c82a0f31c47da07ec (patch) | |
tree | a67b42aa484080993275e21f1441bf95108f5921 /src/detector.c | |
parent | bf92ef76e53cce54c72463abbc28c088a04e533a (diff) |
Display maximum 2theta angle and resolution
Diffstat (limited to 'src/detector.c')
-rw-r--r-- | src/detector.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/detector.c b/src/detector.c index 78fb216f..0748b2ca 100644 --- a/src/detector.c +++ b/src/detector.c @@ -61,6 +61,7 @@ void record_image(struct image *image, int do_poisson) double total_energy, energy_density; double ph_per_e; double area; + double max_tt = 0.0; /* How many photons are scattered per electron? */ area = M_PI*pow(BEAM_RADIUS, 2.0); @@ -127,9 +128,17 @@ void record_image(struct image *image, int do_poisson) ERROR("Processed negative at %i,%i %f\n", x, y, counts); } + if ( image->twotheta[x + image->width*y] > max_tt ) { + max_tt = image->twotheta[x + image->width*y]; + } + } progress_bar(x, image->width-1, "Post-processing"); } + + STATUS("Max 2theta = %.2f deg, min d = %.2f nm (halve this to get the" + " voxel size for a synthesis)\n", + rad2deg(max_tt), (image->lambda/(2.0*sin(max_tt/2.0)))/1e-9); } |