aboutsummaryrefslogtreecommitdiff
path: root/src/compare_hkl.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-10-15 17:30:40 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:03 +0100
commitc3d72232272bb143e4c68d02566100e6ac903518 (patch)
treee80b2c17dd99e27f2a04438f100ddc3e4016c561 /src/compare_hkl.c
parent29b4148c8f6435d680a8fdfd51d0cfd84a5aca12 (diff)
compare_hkl: Configurability (sort of)
Diffstat (limited to 'src/compare_hkl.c')
-rw-r--r--src/compare_hkl.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/compare_hkl.c b/src/compare_hkl.c
index ed8636fb..fa012236 100644
--- a/src/compare_hkl.c
+++ b/src/compare_hkl.c
@@ -109,6 +109,10 @@ static void plot_shells(const double *ref1, const double *ref2,
/* Increase the max just a little bit */
rmax += 0.001e9;
+ /* FIXME: Fixed resolution shells */
+ rmin = 0.120e9;
+ rmax = 1.172e9;
+
total_vol = pow(rmax, 3.0) - pow(rmin, 3.0);
vol_per_shell = total_vol / NBINS;
rmins[0] = rmin;
@@ -119,9 +123,14 @@ static void plot_shells(const double *ref1, const double *ref2,
r = vol_per_shell + pow(rmins[i-1], 3.0);
r = pow(r, 1.0/3.0);
+ /* Shells of constant volume */
rmaxs[i-1] = r;
rmins[i] = r;
+ /* Shells of constant thickness */
+ //rmins[i] = rmins[i-1] + (rmax-rmin)/NBINS;
+ //rmaxs[i-1] = rmins[i-1] + (rmax-rmin)/NBINS;
+
STATUS("Shell %i: %f to %f\n", i-1,
rmins[i-1]/1e9, rmaxs[i-1]/1e9);
@@ -293,7 +302,7 @@ int main(int argc, char *argv[])
char *bfile = NULL;
char *sym = NULL;
double scale, scale_r2, scale_rdig, R1, R2, R1i, Rdiff, pearson;
- double scale_rintint;
+ double scale_rintint, scale_r1i;
int i, ncom;
ReflItemList *i1, *i2, *icommon;
int config_shells = 0;
@@ -448,7 +457,7 @@ int main(int argc, char *argv[])
R2 = stat_r2(ref1, ref2_transformed, icommon, &scale_r2);
STATUS("R2(I) = %5.4f %% (scale=%5.2e)\n", R2*100.0, scale_r2);
- R1i = stat_r1_i(ref1, ref2_transformed, icommon, &scale);
+ R1i = stat_r1_i(ref1, ref2_transformed, icommon, &scale_r1i);
STATUS("R1(I) = %5.4f %% (scale=%5.2e)\n", R1i*100.0, scale);
Rdiff = stat_rdiff_ignore(ref1, ref2_transformed, icommon, &scale_rdig);