Skip to content

Commit

Permalink
Merge pull request #754 from HEXRD/fast-powder-fix
Browse files Browse the repository at this point in the history
fixes nan error in fast powder calibration
  • Loading branch information
saransh13 authored Jan 31, 2025
2 parents dfbeb97 + ffa8ace commit 047ce00
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hexrd/instrument/hedm_instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -2844,6 +2844,14 @@ def _extract_ring_line_positions(iter_args, instr_cfg, panel, eta_tol, npdiv,
# points are already checked to fall on detector
angs, xys, tth_tol, this_tth0 = iter_args

# SS 01/31/25 noticed some nans in xys even after clipping
# going to do another round of masking to get rid of those
nan_mask = ~np.logical_or(np.isnan(xys), np.isnan(angs))
nan_mask = np.logical_or.reduce(nan_mask, 1)
if angs.ndim > 1 and xys.ndim > 1:
angs = angs[nan_mask,:]
xys = xys[nan_mask, :]

n_images = len(images)
native_area = panel.pixel_area

Expand Down

0 comments on commit 047ce00

Please sign in to comment.