aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2009-11-24 18:53:11 +0100
committerThomas White <taw@physics.org>2009-11-24 18:53:11 +0100
commitfdffe20d34dc1131b98f7c1738af690af65f5206 (patch)
tree8fec3d2ffdc5921126f4fd2a99482b8d4af84bba
parent0e1d568e93a3098045d923d8f904182c08d94994 (diff)
Display useful numbers
-rw-r--r--src/ewald.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ewald.c b/src/ewald.c
index d1f47da7..478ca68e 100644
--- a/src/ewald.c
+++ b/src/ewald.c
@@ -91,6 +91,23 @@ void get_ewald(struct image *image)
image->twotheta[x + image->width*y] = twotheta;
+ if ( (x==0) && (y==(int)image->y_centre) ) {
+ double s;
+ s = 1.0e-9*modulus(qx, qy, qz)/2.0;
+ printf("At left edge: 2theta = %5.3f deg,"
+ " sin(theta)/lambda = %5.3f nm^-1,"
+ " d = %f nm\n",
+ rad2deg(twotheta), s, 1.0/(2.0*s));
+ }
+ if ( (x==0) && (y==0) ) {
+ double s;
+ s = 1.0e-9*modulus(qx, qy, qz)/2.0;
+ printf("At corner: 2theta = %5.3f deg,"
+ " sin(theta)/lambda = %5.3f nm^-1,"
+ " d = %f nm\n",
+ rad2deg(twotheta), s, 1.0/(2.0*s));
+ }
+
}
}
}