When using PDCalibration with peak windows, implement a test to make sure the windows are being sorted along with the peak centers.
Describe any solutions you are considering
Use CreateSampleWorkspace to make sample data with several peaks (>=3) at known locations.
Create a vector of peak centers near these locations, but deliberately out of ascending order.
Associated with each, use peak windows deliberately chosen so the windows are smaller than half the distance between peaks.
By some means, ensure that
the peaks and peak windows are internally sorted by increasing peak center in d-space
the peak windows given to PDCalibration are the peak windows used by the internal FitPeaks call.
Possibly writing a unit test to read the logger? Or create a new get method to expose peak centers and windows.
Additional context
Related to Issue #36122 . This test will hedge out that bug being reintroduced.
Related to PR #36158. That PR fixed the issue, but did not include tests.
Describe the outcome that is desired.
When using
PDCalibration
with peak windows, implement a test to make sure the windows are being sorted along with the peak centers.Describe any solutions you are considering
Use
CreateSampleWorkspace
to make sample data with several peaks (>=3) at known locations. Create a vector of peak centers near these locations, but deliberately out of ascending order. Associated with each, use peak windows deliberately chosen so the windows are smaller than half the distance between peaks. By some means, ensure thatPDCalibration
are the peak windows used by the internalFitPeaks
call. Possibly writing a unit test to read the logger? Or create a new get method to expose peak centers and windows.Additional context Related to Issue #36122 . This test will hedge out that bug being reintroduced. Related to PR #36158. That PR fixed the issue, but did not include tests.