diff options
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/geometry.c | 11 | ||||
-rw-r--r-- | libcrystfel/src/stream.c | 6 | ||||
-rw-r--r-- | libcrystfel/src/xds.c | 13 |
3 files changed, 27 insertions, 3 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c index 048dc9f7..3325923c 100644 --- a/libcrystfel/src/geometry.c +++ b/libcrystfel/src/geometry.c @@ -236,6 +236,17 @@ static Reflection *check_reflection(struct image *image, Crystal *cryst, /* Calculate partiality */ part = partiality(pmodel, rlow, rhigh, pr); + if ( isnan(part) ) { + ERROR("Assigning NAN partiality!\n"); + ERROR("%3i %3i %3i rlow = %e, rhigh = %e\n", + h, k, l, rlow, rhigh); + ERROR("div + m = %e, R = %e, bw = %e\n", del, pr, image->bw); + ERROR("D = %e\n", rlow - rhigh); + ERROR("klow = %e khigh = %e\n", klow, khigh); + ERROR("distance(..) = %e\n", distance(cet, cez, tl, zl)); + abort(); + } + if ( updateme == NULL ) { refl = reflection_new(h, k, l); } else { diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 808149e3..313e25e4 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -1151,11 +1151,11 @@ int read_chunk_2(Stream *st, struct image *image, StreamReadFlags srf) image->div = div; } - if ( sscanf(line, "beam_bandwidth = %f %%", &bw) == 1 ) { - image->bw = bw/100.0; + if ( sscanf(line, "beam_bandwidth = %f", &bw) == 1 ) { + image->bw = bw; } - if ( sscanf(line, "num_peaks = %lld %%", &num_peaks) == 1 ) { + if ( sscanf(line, "num_peaks = %lld", &num_peaks) == 1 ) { image->num_peaks = num_peaks; } diff --git a/libcrystfel/src/xds.c b/libcrystfel/src/xds.c index f5985e73..36898949 100644 --- a/libcrystfel/src/xds.c +++ b/libcrystfel/src/xds.c @@ -619,6 +619,19 @@ IndexingPrivate *xds_prepare(IndexingMethod *indm, UnitCell *cell, struct detector *det, float *ltl) { struct xds_private *xp; + int need_cell = 0; + + /* Check if cell parameters are needed/provided */ + if ( *indm & INDEXING_CHECK_CELL_COMBINATIONS ) need_cell = 1; + if ( *indm & INDEXING_CHECK_CELL_AXES ) need_cell = 1; + if ( *indm & INDEXING_USE_CELL_PARAMETERS ) need_cell = 1; + if ( need_cell && !cell_has_parameters(cell) ) { + ERROR("Altering your XDS flags because cell parameters were" + " not provided.\n"); + *indm &= ~INDEXING_CHECK_CELL_COMBINATIONS; + *indm &= ~INDEXING_CHECK_CELL_AXES; + *indm &= ~INDEXING_USE_CELL_PARAMETERS; + } /* Either cell,latt and cell provided, or nocell-nolatt and no cell * - complain about anything else. Could figure this out automatically, |