aboutsummaryrefslogtreecommitdiff
path: root/src/partial_sim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/partial_sim.c')
-rw-r--r--src/partial_sim.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/partial_sim.c b/src/partial_sim.c
index bbdc1550..7a3517a3 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -639,6 +639,10 @@ int main(int argc, char *argv[])
if ( phist_file != NULL ) {
+ double overall_max = 0.0;
+ double overall_mean = 0.0;
+ long long int overall_total = 0;
+
fh = fopen(phist_file, "w");
if ( fh != NULL ) {
@@ -647,6 +651,13 @@ int main(int argc, char *argv[])
double rcen;
+ if ( qargs.p_max[i] > overall_max ) {
+ overall_max = qargs.p_max[i];
+ }
+
+ overall_mean += qargs.p_hist[i];
+ overall_total += qargs.n_ref[i];
+
rcen = i/(double)NBINS*qargs.max_q
+ qargs.max_q/(2.0*NBINS);
fprintf(fh, "%.2f %7li %.3f %.3f\n", rcen/1.0e9,
@@ -658,6 +669,13 @@ int main(int argc, char *argv[])
fclose(fh);
+ overall_mean /= overall_total;
+
+ STATUS("Overall max partiality = %.2f\n", overall_max);
+ STATUS("Overall mean partiality = %.2f\n", overall_mean);
+ STATUS("Total number of reflections = %lli\n",
+ overall_total);
+
} else {
ERROR("Failed to open file '%s' for writing.\n",
phist_file);