aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorYaroslav Gevorkov <yaroslav.gevorkov@desy.de>2019-04-29 21:38:47 +0200
committerThomas White <taw@physics.org>2019-09-12 16:35:52 +0200
commit10f9432595f5425ff2f8605ea181f7c643ab81ab (patch)
treedc85d3407dd3137d835ce47c072e6240720124c9 /libcrystfel/src
parent4620e00fd1fb75392fe516b3358fa2eaec3e189c (diff)
bug fix: asking for detector distance != 0 instad of beamBandwidth != 0
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/pinkindexer.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libcrystfel/src/pinkindexer.c b/libcrystfel/src/pinkindexer.c
index 8195002b..fe3b1625 100644
--- a/libcrystfel/src/pinkindexer.c
+++ b/libcrystfel/src/pinkindexer.c
@@ -156,10 +156,9 @@ int run_pinkIndexer(struct image *image, void *ipriv)
void *pinkIndexer_prepare(IndexingMethod *indm, UnitCell *cell,
struct pinkIndexer_options *pinkIndexer_opts)
{
- if (pinkIndexer_opts->beamEnergy == 0.0 || pinkIndexer_opts->detectorDistance <= 0) {
- ERROR("For pinkIndexer, the photon_energy and "
- "photon_energy_bandwidth must be defined as constants in "
- "the geometry file\n");
+ if (pinkIndexer_opts->beamEnergy == 0.0) {
+ ERROR("For pinkIndexer, the photon_energy must be defined as a "
+ "constant in the geometry file\n");
return NULL;
}
if (pinkIndexer_opts->beamBandwidth == 0.0) {
@@ -171,6 +170,10 @@ void *pinkIndexer_prepare(IndexingMethod *indm, UnitCell *cell,
ERROR("Using center refinement makes it necessary to have the detector distance fixed in the geometry file!");
}
+ if(pinkIndexer_opts->detectorDistance <= 0.0){
+ pinkIndexer_opts->detectorDistance = 0.25; //fake value
+ }
+
struct pinkIndexer_private_data* pinkIndexer_private_data = malloc(sizeof(struct pinkIndexer_private_data));
allocReciprocalPeaks(&(pinkIndexer_private_data->reciprocalPeaks_1_per_A));
pinkIndexer_private_data->intensities = malloc(MAX_PEAK_COUNT_FOR_INDEXER * sizeof(float));