Skip to content

Commit 0bdaa8b

Browse files
author
Joel Bernier
committed
rounding error fix in indexer
1 parent 3a3efd4 commit 0bdaa8b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hexrd/xrd/indexer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,7 @@ def paintGrid(quats, etaOmeMaps,
829829
'threshold': threshold
830830
}
831831

832+
832833
# do the mapping
833834
start = time.time()
834835
retval = None
@@ -884,7 +885,7 @@ def _normalize_ranges(starts, stops, offset, ccw=False):
884885
# If there is a range that spans more than 2*pi,
885886
# return the full range
886887
two_pi = 2 * num.pi
887-
if num.any((starts + two_pi) < stops):
888+
if num.any((starts + two_pi) < stops + 1e-8):
888889
return num.array([offset, two_pi+offset])
889890

890891
starts = num.mod(starts - offset, two_pi) + offset
@@ -1002,7 +1003,7 @@ def paintGridThis(quat):
10021003
# Compute the oscillation angles of all the symHKLs at once
10031004
oangs_pair = xfcapi.oscillAnglesOfHKLs(symHKLs, 0., rMat, bMat,
10041005
wavelength)
1005-
1006+
#pdb.set_trace()
10061007
return _filter_and_count_hits(oangs_pair[0], oangs_pair[1], symHKLs_ix,
10071008
etaEdges, valid_eta_spans,
10081009
valid_ome_spans, omeEdges, omePeriod,

0 commit comments

Comments
 (0)