Skip to content

segmentation fault during stereographic view of FIDDLE #1873

@saransh13

Description

@saransh13

The stereographic projection of the fiddle detectors is all nans. This gives rise to the following segmentation fault when log-log-sqrt intensity scaling is applied.

We need to track down both the source of nans in the stereographic view as well as catch the edge case when all pixels are nans to avoid this segmentation fault.

  return np.log(np.log(np.sqrt(x - np.nanmin(x)) + 1) + 1)
/Users/soderlind3/hexrdgui/hexrdgui/scaling.py:30: RuntimeWarning: All-NaN slice encountered
  new_range = (np.nanmin(new), np.nanmax(new))
/Users/soderlind3/hexrdgui/hexrdgui/scaling.py:31: RuntimeWarning: All-NaN slice encountered
  old_range = (np.nanmin(old), np.nanmax(old))
/Users/soderlind3/opt/miniconda3/envs/hexrd/lib/python3.11/site-packages/numpy/lib/nanfunctions.py:1384: RuntimeWarning: All-NaN slice encountered
  return _nanquantile_unchecked(
Segmentation fault: 11

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions