Skip to content

Commit 047ce00

Browse files
authored
Merge pull request #754 from HEXRD/fast-powder-fix
fixes nan error in fast powder calibration
2 parents dfbeb97 + ffa8ace commit 047ce00

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

hexrd/instrument/hedm_instrument.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2844,6 +2844,14 @@ def _extract_ring_line_positions(iter_args, instr_cfg, panel, eta_tol, npdiv,
28442844
# points are already checked to fall on detector
28452845
angs, xys, tth_tol, this_tth0 = iter_args
28462846

2847+
# SS 01/31/25 noticed some nans in xys even after clipping
2848+
# going to do another round of masking to get rid of those
2849+
nan_mask = ~np.logical_or(np.isnan(xys), np.isnan(angs))
2850+
nan_mask = np.logical_or.reduce(nan_mask, 1)
2851+
if angs.ndim > 1 and xys.ndim > 1:
2852+
angs = angs[nan_mask,:]
2853+
xys = xys[nan_mask, :]
2854+
28472855
n_images = len(images)
28482856
native_area = panel.pixel_area
28492857

0 commit comments

Comments
 (0)