aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-21 17:46:21 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:29 +0100
commita1e023343b085f727f368720fc7cda8e0e4a2724 (patch)
treef31be68e834a22805c10c0ee73f7deb033a78470
parentdd214964cef3b552d1d4a7abf47eb5893f3d7ca0 (diff)
Evil nasty testing
-rw-r--r--src/partial_sim.c20
-rw-r--r--src/post-refinement.c2
-rw-r--r--src/post-refinement.h10
3 files changed, 20 insertions, 12 deletions
diff --git a/src/partial_sim.c b/src/partial_sim.c
index 2a412ae4..21068399 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -38,19 +38,25 @@ static void mess_up_cell(UnitCell *cell)
double cx, cy, cz;
/* Cell noise in percent */
- const double cnoise = 2.0;
+ const double cnoise = 0.5;
+
+ STATUS("Real:\n");
+ cell_print(cell);
cell_get_reciprocal(cell, &ax, &ay, &az, &bx, &by, &bz, &cx, &cy, &cz);
ax = gaussian_noise(ax, cnoise*fabs(ax)/100.0);
ay = gaussian_noise(ay, cnoise*fabs(ay)/100.0);
az = gaussian_noise(az, cnoise*fabs(az)/100.0);
- bx = gaussian_noise(bx, cnoise*fabs(bx)/100.0);
- by = gaussian_noise(by, cnoise*fabs(by)/100.0);
- bz = gaussian_noise(bz, cnoise*fabs(bz)/100.0);
- cx = gaussian_noise(cx, cnoise*fabs(cx)/100.0);
- cy = gaussian_noise(cy, cnoise*fabs(cy)/100.0);
- cz = gaussian_noise(cz, cnoise*fabs(cz)/100.0);
+// bx = gaussian_noise(bx, cnoise*fabs(bx)/100.0);
+// by = gaussian_noise(by, cnoise*fabs(by)/100.0);
+// bz = gaussian_noise(bz, cnoise*fabs(bz)/100.0);
+// cx = gaussian_noise(cx, cnoise*fabs(cx)/100.0);
+// cy = gaussian_noise(cy, cnoise*fabs(cy)/100.0);
+// cz = gaussian_noise(cz, cnoise*fabs(cz)/100.0);
cell_set_reciprocal(cell, ax, ay, az, bx, by, bz, cx, cy, cz);
+
+ STATUS("Changed:\n");
+ cell_print(cell);
}
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 7301b57b..64704598 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -532,4 +532,6 @@ void pr_refine(struct image *image, const RefList *full, const char *sym)
i++;
} while ( (max_shift > 0.01) && (i < MAX_CYCLES) );
+
+ cell_print(image->indexed_cell);
}
diff --git a/src/post-refinement.h b/src/post-refinement.h
index 5b71cbd5..16db022c 100644
--- a/src/post-refinement.h
+++ b/src/post-refinement.h
@@ -27,15 +27,15 @@
/* Refineable parameters */
enum {
REF_ASX,
- REF_BSX,
- REF_CSX,
REF_ASY,
- REF_BSY,
- REF_CSY,
REF_ASZ,
+ NUM_PARAMS,
+ REF_BSX,
+ REF_BSY,
REF_BSZ,
+ REF_CSX,
+ REF_CSY,
REF_CSZ,
- NUM_PARAMS,
REF_DIV,
REF_R,
};