Commit d157a467 authored by Thomas White's avatar Thomas White
Browse files

Display particle size in nm

parent 8d125470
......@@ -139,6 +139,7 @@ void get_diffraction(struct image *image, int na, int nb, int nc)
double ax, ay, az;
double bx, by, bz;
double cx, cy, cz;
double a, b, c, d;
/* Generate the array of reciprocal space vectors in image->qvecs */
get_ewald(image);
......@@ -152,6 +153,11 @@ void get_diffraction(struct image *image, int na, int nb, int nc)
&bx, &by, &bz,
&cx, &cy, &cz);
cell_get_parameters(image->molecule->cell,
&a, &b, &c, &d, &d, &d);
STATUS("Particle size = %i x %i x %i (=%5.2f x %5.2f x %5.2f nm)\n",
na, nb, nc, na*a/1.0e-9, nb*b/1.0e-9, nc*c/1.0e-9);
image->sfacs = malloc(image->width * image->height
* sizeof(double complex));
......
......@@ -26,6 +26,7 @@
#include "hdf5-file.h"
#include "detector.h"
#include "intensities.h"
#include "sfac.h"
static void show_help(const char *s)
......@@ -228,7 +229,6 @@ int main(int argc, char *argv[])
na = 8*random()/RAND_MAX + 4;
nb = 8*random()/RAND_MAX + 4;
nc = 16*random()/RAND_MAX + 30;
STATUS("Particle size = %i x %i x %i\n", na, nb, nc);
/* Read quaternion from stdin */
if ( config_randomquat ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment