aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/man/crystfel_geometry.57
-rw-r--r--libcrystfel/src/beam-parameters.c9
-rw-r--r--libcrystfel/src/beam-parameters.h2
-rw-r--r--src/im-sandbox.c2
-rw-r--r--src/partial_sim.c2
-rw-r--r--src/partialator.c2
6 files changed, 21 insertions, 3 deletions
diff --git a/doc/man/crystfel_geometry.5 b/doc/man/crystfel_geometry.5
index 68abb341..ccc6fad1 100644
--- a/doc/man/crystfel_geometry.5
+++ b/doc/man/crystfel_geometry.5
@@ -207,6 +207,13 @@ beam/bandwidth = 0.001
.br
beam/divergence = 0.001
+; Reciprocal space 3D profile radius in m^-1. A sphere of this radius surrounds
+; each reciprocal space, and if any part of the sphere is inside the excited
+; volume of reciprocal space, the reflection will be predicted. You can change
+; the prediction of spots by altering this value - larger numbers give more
+; spots;
+profile_radius = 0.001e9
+
.SH AUTHOR
This page was written by Thomas White.
diff --git a/libcrystfel/src/beam-parameters.c b/libcrystfel/src/beam-parameters.c
index bc5ee67c..3d6dc346 100644
--- a/libcrystfel/src/beam-parameters.c
+++ b/libcrystfel/src/beam-parameters.c
@@ -55,6 +55,7 @@ struct beam_params *get_beam_parameters(const char *filename)
b->photon_energy = -1.0;
b->bandwidth = -1.0;
b->divergence = -1.0;
+ b->profile_radius = -1.0;
do {
@@ -90,6 +91,8 @@ struct beam_params *get_beam_parameters(const char *filename)
b->bandwidth = atof(bits[2]);
} else if ( strcmp(bits[0], "beam/divergence") == 0 ) {
b->divergence = atof(bits[2]);
+ } else if ( strcmp(bits[0], "profile_radius") == 0 ) {
+ b->profile_radius = atof(bits[2]);
} else {
ERROR("Unrecognised field '%s'\n", bits[0]);
}
@@ -123,6 +126,12 @@ struct beam_params *get_beam_parameters(const char *filename)
ERROR("Invalid or unspecified value for 'beam/divergence'.\n");
reject = 1;
}
+ if ( b->profile_radius < 0.0 ) {
+ ERROR("WARNING: Invalid or unspecified value for"
+ "'profile_radius' in the beam parameters file.\n");
+ ERROR("Using the default value of 0.001 nm^-1.\n");
+ b->profile_radius = 0.001e9;
+ }
if ( reject ) {
ERROR("Please fix the above problems with the beam"
diff --git a/libcrystfel/src/beam-parameters.h b/libcrystfel/src/beam-parameters.h
index fe3d3c56..133e041b 100644
--- a/libcrystfel/src/beam-parameters.h
+++ b/libcrystfel/src/beam-parameters.h
@@ -44,6 +44,8 @@ struct beam_params
* a rectangular distribution with this as
* its (full) width. */
double divergence; /* divergence (radians) */
+
+ double profile_radius; /* Reciprocal space size of a reflection */
};
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index d7cce8fa..97dd3dfe 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -276,7 +276,7 @@ static void process_image(const struct index_args *iargs,
/* Calculate orientation matrix (by magic) */
image.div = beam->divergence;
image.bw = beam->bandwidth;
- image.profile_radius = 0.0001e9;
+ image.profile_radius = beam->profile_radius;
index_pattern(&image, cell, indm, iargs->cellr,
config_verbose, iargs->ipriv,
diff --git a/src/partial_sim.c b/src/partial_sim.c
index 3cfb94a2..cdddf6a3 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -506,7 +506,7 @@ int main(int argc, char *argv[])
image.lambda = ph_en_to_lambda(eV_to_J(beam->photon_energy));
image.div = beam->divergence;
image.bw = beam->bandwidth;
- image.profile_radius = 0.003e9;
+ image.profile_radius = beam->profile_radius;
image.filename = malloc(256);
image.copyme = NULL;
diff --git a/src/partialator.c b/src/partialator.c
index 4fa8c2bd..ec8a7410 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -481,7 +481,7 @@ int main(int argc, char *argv[])
cur->width = det->max_fs;
cur->height = det->max_ss;
cur->osf = 1.0;
- cur->profile_radius = 0.003e9;
+ cur->profile_radius = beam->profile_radius;
cur->pr_dud = 0;
/* Muppet proofing */