Ticket #10384 (closed: fixed)
Modify Calculate Flat background to work with non-TOF units or make equivalent changes to allow Flat background reduction in multirep mode
Reported by: | Alex Buts | Owned by: | Alex Buts |
---|---|---|---|
Priority: | major | Milestone: | Release 3.3 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | #10395 | |
Blocking: | #10684 | Tester: | Nick Draper |
Description
After discussion with instrument scientists we decided that current approach taken by SNS to remove background from event workspaces is too memory demanding and/or unreliable for low background instrument in multirep mode. (LET) The suggestion is to modify flat background removal (or make a new one) to be able to extract flat background from converted to energy transfer (rebinned) workspace.
Change History
comment:3 Changed 6 years ago by Alex Buts
- Status changed from assigned to inprogress
refs #10384 Initial changes
just added new property to rebin, which describes prospective flat background.
Changeset: a12f7ba1151e343e99e6bb2c723046df1468b5b5
comment:4 Changed 6 years ago by Alex Buts
refs #10384 A bit more Rebib properties and comments
Changeset: 31b4a9effaf1efdf73794dc5a8a582c522cc0a0f
comment:5 Changed 6 years ago by Alex Buts
refs #10384 minor further changes
Changeset: 402aa2fa928d1a7c449c4a6341f941fcfdaaa0a8
comment:6 Changed 6 years ago by Alex Buts
refs #10384 Logic for processing background removal properties
Changeset: 7176a1ecb7524129d6c2824c71a7de184fdd1fd1
comment:7 Changed 6 years ago by Alex Buts
refs #10384 Framework class for background removal
Changeset: e2e9a1ba15ce59bac6bbd7e124d436cbe0060fee
comment:8 Changed 6 years ago by Alex Buts
refs #10384 Main algorithm contents and beginning of unit test
Changeset: a2eda2f84631a0771909058a6422bd3641f383d2
comment:9 Changed 6 years ago by Alex Buts
refs #10384 formatting and comments
Changeset: 15e1f5b51fed2049a0c74fa08a060d4af68c8a23
comment:10 Changed 6 years ago by Alex Buts
refs #10384 Mainly finished helper and first unit test working
Changeset: 466f9adf1898ba69a042a45697c10afc5faeb140
comment:11 Changed 6 years ago by Alex Buts
refs #10384 All works though errors calculation is questionable
Changeset: 2c7afc0e8b3d407d921d3249e21cb74aad591670
comment:12 Changed 6 years ago by Alex Buts
refs #10384 Cpp check warnings
Changeset: 7cfe893e8ffc26077dc771283d557c02f48a9e86
comment:13 Changed 6 years ago by Alex Buts
refs #10384 Fixing mac problems (forward_list missing)
Changeset: 9e6708c5664905df515152bd451bd67ecf824e79
comment:14 Changed 6 years ago by Alex Buts
refs #10384 fixing SimpleAPITest
Changeset: db08fcba3730389aaf3cc5b4ce2a367fb2c322aa
comment:15 Changed 6 years ago by Alex Buts
refs #10384 gcc warnings and small modifications to interface
Changeset: 43cf19db47fa101d9f9c6e040de36809c2ce2191
comment:16 Changed 6 years ago by Alex Buts
refs #10384 documentation
Changeset: 64cdb19609904f7ce243520e90379606a76bab4c
comment:17 Changed 6 years ago by Alex Buts
refs #10384 fixed multithreading mode
Changeset: 49d47e56ed1d746d18694d54e5d426b219004257
comment:18 Changed 6 years ago by Alex Buts
refs #10384 Sphinx warnings and different background errors formula
Changeset: 39487eb4fba30e8c7eeb397e98107f2e27eacc77
comment:19 Changed 6 years ago by Alex Buts
refs #10384 Typing error
Changeset: 11368fd55760b98b7cc607f36774ead17da5e919
comment:20 Changed 6 years ago by Alex Buts
refs #10384 Cppcheck warnings
Changeset: 2778a02c5f62e5a1ec6e9477df8aa189db07c58c
comment:21 Changed 6 years ago by Alex Buts
refs #10384 C++ warnings
Changeset: 9b1feb0cca2106346f4a6b9708890e9ef50d24a9
comment:22 Changed 6 years ago by Alex Buts
refs #10384 Various modifications to satisfy different analysis tools
Modifications related to different error calculation formula.
Changeset: e62dbab1371672bcbbbe28228027974c79c8fd8f
comment:23 Changed 6 years ago by Alex Buts
refs #10384 One more unused variable (came from changed error calc)
Changeset: e973e8cd4e9ef8524b524869f834f88403c91e90
comment:24 Changed 6 years ago by Alex Buts
refs #10384 Minor (hopefully final) changes to documentation
Changeset: 0236b28ddb0b86c14be190039031ce698a3687dc
comment:25 Changed 6 years ago by Alex Buts
- Status changed from inprogress to verify
- Resolution set to fixed
Here is an algorithm, which removes flat (in TOF) background from a workspace, expressed in non-TOF units together with prototype (went to documentation), unit test, documentation and doctest.
We need it for Direct inelastic reduction, so this is only thing I was worrying about when testing, though it should work for any standard units convertible to TOF.
Writing it I make controversial decision to merge it together with Rebin, and though it make it most quick and memory efficient (the user request), I suspect over-optimization and will discuss with Nick the need to separate it into its own algorithm. If you agree with this opinion, you welcome to the discussion and making thicket for it, but it would be separate (not very difficult) ticket.
The event file with measured background I was testing this ticket on is on ftp://ftp.nd.rl.ac.uk/scratch/abuts/Ticket_10384/ Mapping for background removal is not necessary (though makes things faster) so I am not providing any maps.
Tester should assure that the algorithm do what it says and satisfy standards. You can try it on different workspaces (histogram would be interesting) and for different units.
Will be happy to hear opinion on different ways of calculating errors.
comment:26 Changed 6 years ago by Alex Buts
refs #10384 Minor changes to documentation
Changeset: a951d17a579a60183f5d3dc502482e16bbec183a
comment:27 Changed 6 years ago by Alex Buts
refs #10384 memory leak in BackgroundHelper
an auto key-word is not so good after all.
Changeset: 3795090c67ba58d16c6d199053c171cda6e4038e
comment:28 Changed 6 years ago by Alex Buts
refs #10384 fixing GCC warning and optimizing memory usage
by taking unit conversion allocator out of the loop.
Changeset: 9d171c91572425bd262f382ca3974247355f76fb
comment:29 Changed 6 years ago by Nick Draper
- Status changed from verify to reopened
- Resolution fixed deleted
I've talked this over with Martyn and we agree that these changes cannot be just applied to the Rebin algorithm, as it would really make it a RebinAndRemoveBackground algorithms, therefore changing it's purpose and making it harder for others to understand and use. For such a heavily used algorithm we should not do this.
You can of course add a new RebinAndRemoveBackground algorithm, and if you want to share code with Rebin, it could inherit from the Rebin class, but the changes to the rebin algorithm need to be reversed.
comment:30 Changed 6 years ago by Alex Buts
- Status changed from reopened to inprogress
refs #10384 Doxygen
Changeset: 026ca0ca813caf8ee338c9c5aa90daa1e72ed4be
comment:31 Changed 6 years ago by Alex Buts
refs #10384 Removed background helper from rebin
Changeset: cccc565a2250e23714742c2c22f4bfa269618cd4
comment:32 Changed 6 years ago by Alex Buts
refs #10384 Cloned Rebin to RemoveBackground and copied
BackgroundHelper there
Changeset: f209d78577cab5bfe9bfa23b7dc5bcb3ffcf79d8
comment:33 Changed 6 years ago by Alex Buts
refs #10384 Separated BackgroundHelper from Rebin and moved it to
RemoveBackground.
Changeset: 0cf37b67875ea1c8413fd9a56732688212785ee5
comment:34 Changed 6 years ago by Alex Buts
Re #10384 moved existing tests separately from Rebin&BackgroundHelper
Changeset: d26a2c564662c1a9706630d080ba675cdac7a55a
comment:35 Changed 6 years ago by Alex Buts
refs #10384 Doxygen
Changeset: 80160a07b14b50e49f78e7a721ed819cce3f4002
comment:36 Changed 6 years ago by Alex Buts
refs #10384 fixing API test (Rebin doc string changed)
Changeset: 0104f3eb6f320912b64e5792a7c3ff7074457305
comment:37 Changed 6 years ago by Alex Buts
refs #10384 Doctest and error in multithreading
Changeset: 39e7547874ddfe0cc7ae763fc94889b77f4c229e
comment:38 Changed 6 years ago by Alex Buts
refs #10384 Docs corrected and fixed missing property
Changeset: d9f646a2528d84806bb92d3e846d34c51b8f98e1
comment:39 Changed 6 years ago by Alex Buts
refs #10384 added couple of unit tests and perf test for new Algo
and couple of minor bugs discovered when running these tests.
Changeset: f8e1aebc6545f60ab642d591b4121721232a18d8
comment:40 Changed 6 years ago by Alex Buts
refs #10384 Doxygen
Changeset: 28bba95012da34aa8c85e8a3088ea43afb84629d
comment:41 Changed 6 years ago by Alex Buts
refs #10384 Renamed property FlatBkgWorkspace to BkgWorkspace
Changeset: 77937882d8fb9cc71a5b276f0a7347cdd45537bc
comment:42 Changed 6 years ago by Alex Buts
It is separate algorithm now, with main code copied from Rebin and merged with BackgroundHelper class.
Couple of unit test and performance test (which also checks multithreading) has been added to check the merge is correct.
Test as described above.
comment:43 Changed 6 years ago by Alex Buts
- Status changed from inprogress to verify
- Resolution set to fixed
comment:45 Changed 6 years ago by Nick Draper
- Status changed from verify to verifying
- Tester set to Nick Draper
comment:46 Changed 6 years ago by Alex Buts
- Status changed from verifying to closed
Merge branch 'master' into feature/10384_flatBackground
Full changeset: 8f3ccfa440de57572d47d5900b03f0f81821b64a
comment:47 Changed 6 years ago by Nick Draper
Merge remote-tracking branch 'origin/feature/10384_flatBackground'
Full changeset: 9364d821a2207048361eb1151c4b1f283ad9faf2
comment:48 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 11226