From bd233188cce2c0f8203dd2a4c60eecd9abcb9bbf Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 5 Feb 2010 17:45:10 +0100 Subject: Add (slow) bandwidth and multisampling --- src/diffraction.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'src/diffraction.c') diff --git a/src/diffraction.c b/src/diffraction.c index 27037839..b9430ba7 100644 --- a/src/diffraction.c +++ b/src/diffraction.c @@ -174,20 +174,25 @@ void get_diffraction(struct image *image, int na, int nb, int nc, int no_sfac) double complex f_molecule; struct rvec q; double complex val; + int i; - q = image->qvecs[x + image->width*y]; + for ( i=0; inspheres; i++ ) { - f_lattice = lattice_factor(q, ax,ay,az,bx,by,bz,cx,cy,cz, - na, nb, nc); - if ( no_sfac ) { - f_molecule = 1.0; - } else { - f_molecule = molecule_factor(image->molecule, q, - ax,ay,az,bx,by,bz,cx,cy,cz); - } + q = image->qvecs[i][x + image->width*y]; + + f_lattice = lattice_factor(q, ax,ay,az,bx,by,bz,cx,cy,cz, + na, nb, nc); + if ( no_sfac ) { + f_molecule = 10000.0; + } else { + f_molecule = molecule_factor(image->molecule, q, + ax,ay,az,bx,by,bz,cx,cy,cz); + } - val = f_molecule * f_lattice; - image->sfacs[x + image->width*y] = val; + val = f_molecule * f_lattice; + image->sfacs[x + image->width*y] = val; + + } } progress_bar(x, image->width-1, "Calculating lattice factors"); -- cgit v1.2.3