mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
210 stars 122 forks source link

FindSXPeaks crashing mantid if NaN present #34464

Closed RichardWaiteSTFC closed 2 years ago

RichardWaiteSTFC commented 2 years ago

Original reporter: Michael Ritchie (SXD student)

Describe the bug FindSXPeaks crashing mantid if NaN present

To Reproduce (1) Run this code

ws = CreateSampleWorkspace("Histogram", "Flat background", NumBanks=1, BankPixelWidth=1)
y = ws.dataY(0)
y[10:20] = np.nan
FindSXPeaks(InputWorkspace='ws', PeakFindingStrategy='AllPeaks', AbsoluteBackground=10, 
    ResolutionStrategy='AbsoluteResolution', XResolution=400, PhiResolution=3, TwoThetaResolution=3, OutputWorkspace='peaks')

It will crash mantid

Expected behavior No crash - NaN values would be ignored

Screenshots

Platform/Version (please complete the following information):

Additional context

mantid-builder commented 2 years ago

Fixed by #34466