Ticket #7570 (closed: fixed)
SplineSmoothing infinite loops when error is zero
Reported by: | Samuel Jackson | Owned by: | Dan Nixon |
---|---|---|---|
Priority: | major | Milestone: | Release 3.3 |
Component: | Indirect Inelastic | Keywords: | |
Cc: | Blocked By: | #7714 | |
Blocking: | #7842 | Tester: | Martyn Gigg |
Description
SplineSmoothing algorithm gets trapped in an infinite loop when the error is set to zero. Ideally it should use all the points available and make an exact copy of the curve.
This appears to be working on Ubuntu 12.04, but fails on Mac. This could well be down to a mismatch in GSL library versions.
Attachments
Change History
comment:1 Changed 7 years ago by Samuel Jackson
- Component changed from Framework to Indirect Inelastic
comment:3 Changed 7 years ago by Samuel Jackson
- Blocked By 7714 added
Update
After discussing the problem with Roman this ticket would probably best be solved by swapping out the CubicSpline function for BSpline due to efficiency issues. Therefore we should wait until either me or Roman write a unit test to verify BSpline works properly before changing SplineSmoothing.
comment:6 Changed 7 years ago by Nick Draper
- Status changed from new to assigned
Bulk move to assigned at the introduction of the triage step
comment:8 Changed 6 years ago by Samuel Jackson
- Status changed from assigned to inprogress
Refs #7570 Swapped CubicSpline for BSpline.
Changeset: ac8329ecaf589c5134c00252a51599d34a389ace
comment:9 Changed 6 years ago by Samuel Jackson
Refs #7570 Fix issue with the BSpline swap.
Changeset: 5b5b0a24814ce6ec863c6a2eaaffbdc8fa26869b
comment:10 Changed 6 years ago by Samuel Jackson
Refs #7570 Swap to using ConvertToPointData algorithm.
Changeset: 3d7b4862b94d63093c32333e37c0159f021dea21
comment:11 Changed 6 years ago by Samuel Jackson
Refs #7570 Refactor smoothing algorithm code.
Changeset: 15a102151b23fd4b842ec7dc84442ce18e299d75
comment:12 Changed 6 years ago by Samuel Jackson
Refs #7570 Refactor unit test code.
Changeset: 1057287a38a33afffc8532d83d21078c84c9a9e1
comment:13 Changed 6 years ago by Samuel Jackson
Refs #7570 Add missing doxygen comments for new methods.
Changeset: a1e7fa669e78b8b53c1fa25b3965c4f8999ffb42
comment:14 Changed 6 years ago by Samuel Jackson
Refs #7570 Fix usage example.
Changeset: 09c239592dadc9032b5e0315b55f05d21a9fe6a2
comment:15 Changed 6 years ago by Samuel Jackson
Refs #7570 Remove variable.
Changeset: d4f57128bea5b6fc7527dd275c7bc36ddad4fb1b
comment:16 Changed 6 years ago by Samuel Jackson
Refs #7570 Limit the max number of executions further.
Changeset: bfb529606a031fe2a435a13dfc48e1e64262371e
comment:17 Changed 6 years ago by Samuel Jackson
I believe the zero error issue is caused by the fact that the spline takes a large number of parameters and minimizing all of them to be so close to the original data naturally causes it to be slow.
The changes here have refactored the code and limited the max iterations so that even if you specify zero error, the algorithm should finish more quickly (albeit slowly).
To Test
I've supplied a file to check the algorithm with. You can use the following python script to check it works (but may take a sec):
theta = Load(Filename='ZnCl2_Stheta.nxs') ws = SplineSmoothing(theta, Error=0)
Unit tests and a code review should cover the rest.
comment:18 Changed 6 years ago by Samuel Jackson
- Status changed from inprogress to verify
- Resolution set to fixed
comment:20 Changed 6 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester set to Martyn Gigg
comment:21 Changed 6 years ago by Martyn Gigg
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/bugfix/7570_spline_smooting_error'
Full changeset: 34de655e1584f0ab1cf0b1f0e7a78b4fce316c36
comment:22 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 8415