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

Evil nasty testing

parent dd214964
......@@ -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);
}
......
......@@ -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);
}
......@@ -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,
};
......
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