Ticket #8518 (closed: fixed)
FitPeak does not work with EventWorkspace
Reported by: | Wenduo Zhou | Owned by: | Wenduo Zhou |
---|---|---|---|
Priority: | major | Milestone: | Release 3.1 |
Component: | Diffraction | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #7789 | Tester: | Russell Taylor |
Description
FitPeak() cannot work on EventWorkspace because EventWorkspace does not allow Y value to be modified. But FitPeak() modifies some peak values to fit a background-removed peak. So the case of EventWorkspace must be concerned.
Meanwhile, it is convenient to add some feature #8182 mentions, i.e., put parameter names in the pulldown menu for the type of fit and background. Then the parameter values could be entered in that order by user and they do not have to know what parameter names go with each type of fit.
Change History
comment:2 Changed 7 years ago by Wenduo Zhou
- Status changed from new to inprogress
Added an extra output property and debug log. Refs #8518.
Changeset: 5e4c7801c4e787c7edab758fe386c49476249e3f
comment:3 Changed 7 years ago by Wenduo Zhou
Enhance selection of peak type. Refs #8518.
Added peak types with peak parameter names other than pure peak types. If the peak type with peak parameter names is selected, then there is no need for user to specify peak parameters in 'PeakParameterNames'.
Changeset: 6159ec7c4386e28a9768d53a05eb89c008f31714
comment:4 Changed 7 years ago by Russell Taylor
The solution with respect to event workspaces should be clear - the algorithm should not be modifying the input workspace, so an alternative way needs to be found. Then it will be transparent to an event workspace input. A last resort solution, though probably not ideal, would be to take a copy of the data before adjusting it. Wherever possible, the workspace should be passed around by reference-to-const shared_ptr (though this isn't possible where a child algorithm will be called).
comment:5 Changed 7 years ago by Wenduo Zhou
Added background function with parameter prompt. Refs #8518.
Changeset: 4ca666c8f2f3e9da25225fa975dd2fe12e63e978
comment:6 Changed 7 years ago by Wenduo Zhou
Generate a workspace instead of modifying input. Refs #8518.
Changeset: ad320e6eda50e356b049c05851221be53ea8d3c5
comment:7 Changed 7 years ago by Wenduo Zhou
- Status changed from inprogress to verify
- Resolution set to fixed
For Tester
You can test all the new features from one data file.
- Load PG3_2538_event.nxs from SystemTest/Data;
- Convert the unit to d-spacing if you like;
- Rebin with bin size equal to -0.0004
- Plot any spectrum with peak(s), such as 12222;
- Use FitPeak to fit any peak of that spectrum. You only need to give some rough estimated value of peak height, centre and sigma (~0.001), fit range and peak range by simple observation;
You can choose the peak function 'Gaussian (.....)' and thus you don't need to give out the peak parameter names; You can choose the background function 'Quadratic (A0, A1, A2)', and thus you don't need to input background parameters' names;
- Before, it won't work, because the workspace is event workspace. Now it should work with EventWorkspace.
comment:8 Changed 7 years ago by Russell Taylor
- Status changed from verify to reopened
- Resolution fixed deleted
There are a couple of cppcheck warnings that should be addressed.
comment:9 Changed 7 years ago by Wenduo Zhou
- Status changed from reopened to inprogress
Removed some cpp check error. Refs #8518.
Changeset: 4a81311e3a8e0ccc6eac936be95133d5bed202b8
comment:10 Changed 7 years ago by Wenduo Zhou
- Status changed from inprogress to verify
- Resolution set to fixed
comment:11 Changed 7 years ago by Wenduo Zhou
Cleaned the code. Refs #8518.
Changeset: 8ba7cce319fa0cd559708b15b951e30622abfdb5
comment:12 Changed 7 years ago by Wenduo Zhou
Fixed an error and modified error message. Refs #8518.
Changeset: f0f4ed56dcfaacbd0383b20b80417d71c55cfc1b
comment:13 Changed 7 years ago by Russell Taylor
- Status changed from verify to verifying
- Tester set to Russell Taylor
comment:14 Changed 7 years ago by Russell Taylor
- Status changed from verifying to closed
Merge remote branch 'origin/feature/8518_fitpeak_eventws'
Full changeset: 183e129ecad53e886361bf28ef508824e280ccd0
comment:16 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 9362