aboutsummaryrefslogtreecommitdiff
path: root/src/partial_sim.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-04-26 15:13:42 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:24 +0100
commit6815bab588d3e995bd1319e23614372aa1a07f0c (patch)
tree14b2e12ff2cda12f6ed4baed992cdee6448a44ea /src/partial_sim.c
parent074034e2dcc34a9a0bab7c979f0deea060a3be21 (diff)
Progress with post refinement...
Diffstat (limited to 'src/partial_sim.c')
-rw-r--r--src/partial_sim.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/partial_sim.c b/src/partial_sim.c
index 824b1b5d..a9abb55b 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -39,10 +39,11 @@ static void mess_up_cell(UnitCell *cell)
double cx, cy, cz;
cell_get_cartesian(cell, &ax, &ay, &az, &bx, &by, &bz, &cx, &cy, &cz);
- ax += 0.01 * ax;
+ ax += 0.005*ax;
cell_set_cartesian(cell, ax, ay, az, bx, by, bz, cx, cy, cz);
}
+
/* For each reflection in "partial", fill in what the intensity would be
* according to "full" */
static void calculate_partials(RefList *partial, double osf,
@@ -112,6 +113,7 @@ int main(int argc, char *argv[])
struct quaternion orientation;
struct image image;
FILE *ofh;
+ UnitCell *new;
/* Long options */
const struct option longopts[] = {
@@ -252,12 +254,17 @@ int main(int argc, char *argv[])
reflist_free(image.reflections);
/* Alter the cell by a tiny amount */
- mess_up_cell(image.indexed_cell);
image.filename = "(simulated 2)";
+ new = rotate_cell(cell, deg2rad(0.001), deg2rad(0.0), 0.0);
+ cell_free(image.indexed_cell);
+ image.indexed_cell = new;
- /* Write another chunk */
+ /* Calculate new partials */
image.reflections = find_intersections(&image, image.indexed_cell, 0);
calculate_partials(image.reflections, 0.5, full, sym);
+
+ /* Give a slightly incorrect cell in the stream */
+ //mess_up_cell(image.indexed_cell);
write_chunk(ofh, &image, STREAM_INTEGRATED);
reflist_free(image.reflections);