aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-11-14 15:51:09 +0100
committerThomas White <taw@physics.org>2014-11-14 15:51:09 +0100
commit35702bb6c290c271bf097130cdd698b99731186c (patch)
tree9e9dc6f4823fb58d83fb9c7d273369a72390c890
parent292a614efb15d3608bee9a7199bd867c9f91c808 (diff)
pattern_sim, partial_sim: List all simulation parameters at start
-rw-r--r--src/partial_sim.c27
-rw-r--r--src/pattern_sim.c33
2 files changed, 58 insertions, 2 deletions
diff --git a/src/partial_sim.c b/src/partial_sim.c
index d2229f39..1252cd86 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -721,7 +721,6 @@ int main(int argc, char *argv[])
input_file);
return 1;
}
- free(input_file);
if ( check_list_symmetry(full, sym) ) {
ERROR("The input reflection list does not appear to"
" have symmetry %s\n", symmetry_name(sym));
@@ -769,6 +768,31 @@ int main(int argc, char *argv[])
image.spectrum_size = 0;
image.event = NULL;
+ STATUS("Simulation parameters:\n");
+ STATUS(" Photon energy: %.2f eV (wavelength %.5f A)\n",
+ photon_energy, image.lambda*1e10);
+ STATUS(" Beam divergence: %.5f mrad\n", image.div*1e3);
+ STATUS(" Beam bandwidth: %.5f %%\n", image.bw*100.0);
+ STATUS("Reciprocal space profile radius: %e m^-1\n", profile_radius);
+ if ( image_prefix != NULL ) {
+ STATUS(" Background: %.2f detector units\n",
+ background);
+ } else {
+ STATUS(" Background: none (no image "
+ "output\n");
+ }
+ STATUS(" Partiality model: scsphere (hardcoded)\n");
+ STATUS(" Noise standard deviation: %.2f detector units\n",
+ noise_stddev);
+ if ( random_intensities ) {
+ STATUS(" Full intensities: randomly generated: "
+ "abs(Gaussian(sigma=%.2f))\n", full_stddev);
+ } else {
+ STATUS(" Full intensities: from %s\n",
+ input_file);
+ }
+ STATUS(" Max error in cell components: %.2f %%\n", cnoise);
+
if ( random_intensities ) {
full = reflist_new();
}
@@ -902,6 +926,7 @@ int main(int argc, char *argv[])
reflist_free(full);
free(save_file);
free(geomfile);
+ free(input_file);
return 0;
}
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index bd0e6615..5a0a6797 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -651,7 +651,38 @@ int main(int argc, char *argv[])
powder->data = powder_data;
/* Splurge a few useful numbers */
- STATUS("Wavelength is %f nm\n", image.lambda/1.0e-9);
+ STATUS("Simulation parameters:\n");
+ STATUS(" Photon energy: %.2f eV (wavelength %.5f A)\n",
+ photon_energy, image.lambda*1e10);
+ STATUS(" Beam divergence: not simulated\n");
+ STATUS(" Background: %.2f detector units\n",
+ background);
+
+ switch ( spectrum_type ) {
+
+ case SPECTRUM_TOPHAT:
+ STATUS(" X-ray spectrum: top hat, "
+ "width %.5f %%\n", image.bw*100.0);
+ break;
+
+ case SPECTRUM_SASE:
+ STATUS(" X-ray spectrum: SASE, "
+ "bandwidth %.5f %%\n", image.bw*100.0);
+ break;
+
+ case SPECTRUM_TWOCOLOUR:
+ STATUS(" X-ray spectrum: two colour, "
+ "separation %.5f %%\n", image.bw*100.0);
+ break;
+ }
+ if ( random_size ) {
+ STATUS(" Crystal size: random, between "
+ "%.2f and %.2f nm along each of a, b and c\n",
+ min_size*1e9, max_size*1e9);
+ } else {
+ STATUS(" Crystal size: 8 unit cells along "
+ "each of a, b and c\n");
+ }
do {