Ticket #11104 (closed: fixed)
IPeakFunction should have intensity/setIntensity methods
Reported by: | Michael Wedel | Owned by: | Michael Wedel |
---|---|---|---|
Priority: | major | Milestone: | Release 3.4 |
Component: | Framework | Keywords: | Fitting |
Cc: | roman.tolchenov@… | Blocked By: | |
Blocking: | #10996 | Tester: | Roman Tolchenov |
Description
IPeakFunction offers methods to get and set the height of a peak. In many cases one also needs to access the integral intensity, e.g. the area below the peak. In some cases there are analytical expressions, but in general the problem can be solved numerically.
For a part of the POLDI analysis the GSL integration code has already been wrapped, so I would like to move this code from SINQ into API so that it can be used in IPeakFunction to provide a general implementation of intensity(). The general implementation of setIntensity() will use setHeight and the fact that height and integral intensity are proportional.
Change History
comment:2 Changed 6 years ago by Michael Wedel
Refs #11104. Fixing doxygen comments
Changeset: 3d01a3f714b9d4eea7a7df4f6ae2ca1818e78e8a
comment:3 Changed 6 years ago by Michael Wedel
Refs #11104. Changing signatures of PeakFunctionIntegrator
The interface is not limited to smart pointers anymore now, using references instead.
Changeset: 3be3b0e8a6b427fd903460d9d1e1604474091e22
comment:4 Changed 6 years ago by Michael Wedel
Refs #11104. Re-enabling unit tests in GaussianTest
Re-enabled some of the disabled unit tests in GaussianTest.h. The other tests have some issues, this has to be handled in another ticket.
Changeset: 06e5025c0c5e58c90c3ecad2194f5c7a0b8211d2
comment:5 Changed 6 years ago by Michael Wedel
Refs #11104. Add intensity/setIntensity methods to IPeakFunction
Changeset: 173c23197e5c2d5caff7ca6cb891379b60f022c5
comment:6 Changed 6 years ago by Michael Wedel
Refs #11104. Adding unit test for Gaussian.
Changeset: 1e56cbde5b7f8350dbc0f3359a413ce19fdb3d5f
comment:7 Changed 6 years ago by Michael Wedel
Refs #11104. Changing parameter name.
Changeset: a9dfb0fed59e4ec35ff877fca275b256b6e1f928
comment:8 Changed 6 years ago by Michael Wedel
Refs #11104. Adding another Gaussian test, formatting IPeakFunction
Changeset: 5d101c018d183fd3c975ff195c7d2efb511404cc
comment:9 Changed 6 years ago by Michael Wedel
Refs #11104. Adding intensity test for Lorentzian
Changeset: 7a4cefb04619f9ed8613ce709ac2bc96b804c91b
comment:10 Changed 6 years ago by Michael Wedel
Refs #11104. Python exports.
Changeset: 5a2a0706568f08da23fc56e23c4c3994bcb02b6a
comment:11 Changed 6 years ago by Michael Wedel
Refs #11104. Adding comments.
Changeset: 84f8193a86d0a92099e3fdb409b32b2675cd0961
comment:12 Changed 6 years ago by Michael Wedel
- Status changed from new to verify
- Resolution set to fixed
This is being verified as pull request #240.
comment:13 Changed 6 years ago by Michael Wedel
Refs #11104. Removing accidentally added file
Changeset: d7baf2780fe217477cd86a4a8f304e9422f43ef6
comment:14 Changed 6 years ago by Michael Wedel
Jenkins retest this please
comment:15 Changed 6 years ago by Michael Wedel
Refs #11104. Reverting clang-format on python export
The clang-format command seemed to cause a compilation error on all systems. Going back to the old format fixes it.
Changeset: 6a32a8324a1d49e858ff034f0b864cfcba4e5adc
comment:16 Changed 6 years ago by Michael Wedel
Jenkins retest this please
comment:17 Changed 6 years ago by Michael Wedel
Refs #11104. Replacing delta argument with places
It seems that the unittest module on RHEL6 does not know the delta-parameter for assertAlmostEquals yet, so instead the number of places is used.
Changeset: 4181b1f3c1c8455bb5b2299f677d038b93fe74b7
comment:18 Changed 6 years ago by Michael Wedel
Jenkins retest this please
comment:19 Changed 6 years ago by Roman Tolchenov
- Status changed from verify to verifying
- Tester set to Roman Tolchenov
comment:20 Changed 6 years ago by Michael Wedel
Refs #11104. Adding general test for IPeakFunction::intensity
Changeset: 203539339bb27a42aef20f3288d0475dbce56667
comment:21 Changed 6 years ago by Michael Wedel
Jenkins retest this please
comment:22 Changed 6 years ago by Michael Wedel
Jenkins retest this please
comment:23 Changed 6 years ago by Michael Wedel
Refs #11104. Adding Muon_ExpDecayOscTest to blacklist
Changeset: 27e306588bf126895eccd2f79cd7aa575d8c7bb8
comment:24 Changed 6 years ago by Michael Wedel
Jenkins retest this please
comment:25 Changed 6 years ago by Michael Wedel
Jenkins retest this please
comment:26 Changed 6 years ago by Michael Wedel
Refs #11104. Not giving up on setIntensity so quickly
If intensity is 0, we first try to set height to a different, arbitrary value, following Roman's suggestion. If it's still 0 after that, there's nothing left to do.
Changeset: e64f93044bf72b49fbd7ea0e4c5256d63c42d52a
comment:27 Changed 6 years ago by Michael Wedel
Refs #11104. Adding special case code for BackToBackExponential
BackToBackExponential already has an intensity parameter, so the methods are overriden to get/set this parameter.
Changeset: f8445a1425781d236267bdb586e2cc33d4897c37
comment:28 Changed 6 years ago by Michael Wedel
Jenkins retest this please
comment:29 Changed 6 years ago by Michael Wedel
Jenkins retest this please
comment:30 Changed 6 years ago by Michael Wedel
Jenkins retest this please
comment:31 Changed 6 years ago by Michael Wedel
Jenkins retest this please
comment:32 Changed 6 years ago by Roman Tolchenov
- Status changed from verifying to closed
Merge pull request #240 from mantidproject/11104_add_intensity_to_ipeakfunction
Add intensity/setIntensity methods to IPeakFunction
Full changeset: 8a98ddd08f4650ab89131936267ba3f4dd578318
comment:33 Changed 5 years ago by Nick Draper
Somehow these slipped through without a resolution. Set to Fixed.
comment:34 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 11943
Refs #11104. Moving PeakFunctionIntegrator to API
PeakFunctionIntegrator was moved from MantidSINQ to MantidAPI. PoldiFitPeaks2D had to be changed to use the correct header file.
Changeset: cbebfee4fe7e3502d0b6b257f38e8fd2102c2a5e