Ticket #9445 (closed: fixed)
Create implementation of IFunction that uses workspace index
Reported by: | Michael Wedel | Owned by: | Michael Wedel |
---|---|---|---|
Priority: | major | Milestone: | Release 3.3 |
Component: | Framework | Keywords: | CurveFitting |
Cc: | roman.tolchenov@… | Blocked By: | #9423, #9432, #9448 |
Blocking: | #9990, #9991, #9992 | Tester: | Roman Tolchenov |
Description
For fitting POLDI data an implementation of IFunction is required that computes function values while taking into account information associated to the spectrum it is applied to (each spectrum of a MatrixWorkspace is a domain).
I am not sure whether it should inherit from IFunction1D, even though it is in fact a kind of 1D-function. But I don't see any meaningful implementation of function1D and functionDeriv1D, since there is no way these methods can "know" the domain type.
On the other hand I am not sure if the fitting framework will be able to deal with a 1D-function that does not implement IFunction1D.
Any thoughts on this?
Change History
comment:2 Changed 6 years ago by Owen Arnold
- Status changed from new to assigned
- Cc roman.tolchenov@… added
cc'd Roman so he can track what's going on here.
comment:5 Changed 6 years ago by Michael Wedel
- Status changed from assigned to inprogress
Refs #9445. Added PoldiInstrumentAdapter
This is needed in more than one place and bundling it in one place will make it easier to replace later.
Changeset: 51db44932ea77935e418f2729ecf399f3c80d388
comment:6 Changed 6 years ago by Michael Wedel
Refs #9445. Added PoldiSpectrumDomainFunction class
Changeset: af76395d07bedf2364b7979dde57cdf43f3c572d
comment:7 Changed 6 years ago by Michael Wedel
Refs #9445. Created 2D-spectrum calculation test
Changeset: 39124fbec5ac553ef0599708fe72c04163943120
comment:8 Changed 6 years ago by Michael Wedel
Refs #9445. Added missing typedef
Missing typedef did not let the code compile
Changeset: 82623d2a11ae3b8b4da55dc51780477e447280e1
comment:9 Changed 6 years ago by Roman Tolchenov
Re #9445. Corrected the multi-domain Fit call.
Changeset: ac83d9250ba56c8c89c255ff9391e9db1850c669
comment:11 Changed 6 years ago by Michael Wedel
Refs #9445. Added PoldiSpectrumDomainTest.h to CMakeLists
Changeset: bb6981234acb8fcb57c5c124529636a48742f944
comment:12 Changed 6 years ago by Michael Wedel
Refs #9445. PoldiPeakCollection now holds peak intensity type
A PoldiPeakCollection now stores information about the type of intensity information assigned to the contained peaks. Some parts need to work with the peak maxima, others need the area. This information is now put into the workspace logs and processed.
Changeset: 4f5f6eab4fc2141e1ce308fcad86c2fb4a8663d3
comment:13 Changed 6 years ago by Michael Wedel
Refs #9445. PoldiCalculateSpectrum2D processes POLDI peaks
Instead of the fixed example peak, a peak table is now loaded and the corresponding functions are constructed.
Changeset: c7c8f284c93e34d908288a8befeaf4fcd9dfa783
comment:14 Changed 6 years ago by Michael Wedel
Refs #9445. Corrected calculation of deltaT
Changeset: 4e1011f9eaf8ea4db8734d5b408bf4c15bcf090e
comment:15 Changed 6 years ago by Michael Wedel
Refs #9445. Added clone method to PoldiPeak
Also added equality operator to MillerIndices, since the lack of it was failing the test for PoldiPeak::clone.
Changeset: 16fe42876f886528be123baaebc0349dda628305
comment:16 Changed 6 years ago by Michael Wedel
Refs #9445. PoldiPeakCollection stores profile information
PoldiPeakCollection can now store information about which profile function has been used to fit the peak parameters. This is required for possible peak integration in PoldiCalculateSpectrum2D.
Changeset: 90e6ea498b8fafa051c47f701d1c1e1fe820ff94
comment:17 Changed 6 years ago by Michael Wedel
Refs #9445. Added profile function check to PoldiPeakCollection
Changeset: 7ef6c6f72629551273da5dc194c2c1dda3b9d10f
comment:18 Changed 6 years ago by Michael Wedel
Refs #9445. Extracted time conversion from PoldiSpectrumDomainFunction
Changeset: 2eda04a872490935e06e811f7ae63bae635d82ea
comment:19 Changed 6 years ago by Michael Wedel
Refs #9445. Added PeakFunctionIntegrator
PeakFunctionIntegrator takes an IPeakFunction and integrates it numerically using GSL routines.
Changeset: 5f4146dace472d3501c163d95b6c0c36a7b57398
comment:20 Changed 6 years ago by Michael Wedel
Refs #9445. Fixed NaN-problem in PoldiTimeTransformer
PoldiTimeTransformer::detectorElementIntensity produced NaN when a wavelength outside the spectrum boundaries was calculated, because that would be negative.
Changeset: efbd26b59be2de72e100bb4630c67a6e36eff1fa
comment:21 Changed 6 years ago by Michael Wedel
Refs #9445. Added total intensity calculation to PoldiTimeTransformer
Changeset: 124e06c62755cc6e9cd8745cd70c879a2510a557
comment:22 Changed 6 years ago by Michael Wedel
Refs #9445. PoldiCalculateSpectrum2D now integrates peak profiles
Changeset: c7798830e48ac6274d8fc778a728b340b77d3841
comment:23 Changed 6 years ago by Michael Wedel
Refs #9445. PoldiFitPeaks1D stores profile information in table
Changeset: 2cb03b251a265da5616da9f5d3d99820bda5b0db
comment:24 Changed 6 years ago by Michael Wedel
Refs #9445. Added Poldi2DFunction.
This function inherits from CompositeFunction to accumulate multiple functions and from IFunction1DSpectrum, so the correct domain creator is used in Fit.
Changeset: 92564e73ebc2ba1b2ebd90bd246a2be70ddb9a54
comment:25 Changed 6 years ago by Michael Wedel
Refs #9445. Using Poldi2DFunction in spectrum calculation
Changeset: 2e7352799c8569d29e7b349233a4e65b58fed710
comment:27 Changed 6 years ago by Michael Wedel
Refs #9445. Added null pointer check to PoldiTimeTransformer
Changeset: c1aec4c57658fa2de6f0ec2c4c9c2676616edeb2
comment:28 Changed 6 years ago by Michael Wedel
Refs #9445. Cleaned up PoldiInstrumentAdapter.
Added unit tests for chopper speed extraction functors.
Changeset: 6767d05baa6970ffa3d6db66d1f92557592e0acd
comment:29 Changed 6 years ago by Michael Wedel
Refs #9445. Cleaned up Poldi2DFunction.
Added documentation and unit tests.
Changeset: 12e90797e07d157baa4a244bd65267671303a94c
comment:30 Changed 6 years ago by Michael Wedel
Re #9445. Integrated PoldiInstrumentAdapter into PoldiAutoCorrelation
Changeset: 951f296d2b1cbc5ba9e68c8f685a0d2fa05da99f
comment:31 Changed 6 years ago by Michael Wedel
Refs #9445. Removed using namespace from PoldiMockInstrumentHelpers.h
Had to adjust two unit tests to use the namespaces instead.
Changeset: ec947a67cf1c0c612860af114a0b6f01695d69ad
comment:32 Changed 6 years ago by Michael Wedel
Refs #9445. Added clone method to PoldiPeakCollection
Changeset: 0448cd9ec1d3b43d59c520b222eb0fc576f704cd
comment:33 Changed 6 years ago by Michael Wedel
Refs #9445. Cleaned up PoldiSpectrumDomainFunction.
Changeset: b4dcfb25e256b096576345ea049dbf6ea22d9dc2
comment:34 Changed 6 years ago by Michael Wedel
Refs #9445. Refactored PoldiCalculateSpectrum2D.
Most parts of the algorithm are tested by the unit tests now. The actual spectrum calculation will be done in a system test, as instrument definitions etc. are required for this.
Changeset: 33232934c13174d2dd52f79739fcc947a84a6178
comment:35 Changed 6 years ago by Michael Wedel
Refs #9445. Fixed comments in PoldiCalculateSpectrum2D
Changeset: 70314183c31f27c6bb4d3fcd7670b07495d541a9
comment:36 Changed 6 years ago by Michael Wedel
Refs #9445. Added documentation with usage example.
Changeset: c0ac991de289d577684ccdf5fcc790ae1122d9af
comment:37 Changed 6 years ago by Michael Wedel
Refs #9445. Integrate detector efficiency in IDF
Changeset: d051660674af7967e8d20126bee312aacc4cf5cd
comment:38 Changed 6 years ago by Michael Wedel
Refs #9445. Added optional profile function parameter for integration.
Changeset: fc88a1214af52e068381c690c2281461e01cf51b
comment:39 Changed 6 years ago by Michael Wedel
Refs #9445. Added system test for PoldiCalculateSpectrum2D
The test uses a spectrum calculated with the original analysis software.
Changeset: dc5e7fbcb1933d14cb6e0bce630e085ebb1935fc
comment:40 Changed 6 years ago by Michael Wedel
Refs #9445. Casting GSL enums to int in test
Changeset: 46647d4239229c14532e94797a22bf486db05d22
comment:41 Changed 6 years ago by Michael Wedel
Refs #9445. Adding export symbol to wrapper function
Changeset: 19fb420a99e71c67cf97e3a501357f9448b91f71
comment:42 Changed 6 years ago by Michael Wedel
Testing information:
This ticket looks quite big, but essentially it adds only one algorithm: PoldiCalculateSpectrum2D. How to use it is documented in the wiki-page. Running the usage example should result in a spectrum as shown there (with "color fill plot").
There is a system test making sure that the calculated values do not deviate too much from the results produced by the existing analysis software.
Remark/question:
There is one class in PoldiUtilities which could potentially be useful for others as well, PeakFunctionIntegrator. As the name indicates, it integrates an IPeakFunction. If I had to guess, I would put it into CurveFitting.
comment:43 Changed 6 years ago by Michael Wedel
Refs #9445. Fixing some style problems
Changeset: dc06bbb7a3b2fc74d50dcaa5f224d45e26f4965d
comment:44 Changed 6 years ago by Michael Wedel
Refs #9445. Fixing more style problems.
Changeset: 7a7daa5d0accabe65a4022cb4afcc7f12291d793
comment:45 Changed 6 years ago by Michael Wedel
Refs #9445. Peak function now uses time units instead of d.
Changeset: 368923935c0a619eff46dfc990d0e33b592f1734
comment:46 Changed 6 years ago by Michael Wedel
Revert "Refs #9445. Peak function now uses time units instead of d."
This reverts commit 368923935c0a619eff46dfc990d0e33b592f1734.
Changeset: 485a9890ad16750c97225687da8e9684cce0d398
comment:47 Changed 6 years ago by Michael Wedel
Sorry about the confusion with the last two commits. I thought the change to time-based parameters was necessary, which turned out to be wrong after some detailed testing.
comment:48 Changed 6 years ago by Michael Wedel
- Blocked By 9497 removed
I am removing the block from #9497, because in further going tests when actually performing a fit (which is the intention in the end), this did not seem to cause problems.
comment:49 Changed 6 years ago by Michael Wedel
- Status changed from inprogress to verify
- Resolution set to fixed
comment:53 Changed 6 years ago by Roman Tolchenov
- Status changed from verify to verifying
- Tester set to Roman Tolchenov
comment:54 Changed 6 years ago by Roman Tolchenov
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/9445_poldi_spectrum_domain_function'
Full changeset: 97eb107c9250af5b12e54a7b9b4222f15eeabefc
comment:55 Changed 6 years ago by Michael Wedel
Merge branch 'feature/9445_systemtest_for_poldi_2d_spectrum' into feature/10074_merge_poldi_system_tests
Full changeset: ad13d60fcd3acf298fae5b2ff6a43918a489120d
comment:56 Changed 6 years ago by Martyn Gigg
Merge branch 'feature/9445_systemtest_for_poldi_2d_spectrum'
Full changeset: bacee637856abc704ed9c088ab43b0d788eb0dca
comment:57 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 10288