Ticket #7159 (closed: fixed)
SANS I(Q) subtraction algorithm
Reported by: | Mathieu Doucet | Owned by: | Mathieu Doucet |
---|---|---|---|
Priority: | major | Milestone: | Release 2.5.3 |
Component: | Mantid | Keywords: | PatchCandidate,Released |
Cc: | Blocked By: | ||
Blocking: | Tester: | Martyn Gigg |
Description
Request from EQSANS. They need an algorithm to subtract a background distribution from the reduced I(Q). They input to the algorithm should be either reduced I(Q) workspaces or reduced data files.
Change History
comment:2 Changed 7 years ago by Mathieu Doucet
Merge branch 'feature/7159_sans_iq_subtraction' into develop
comment:4 Changed 7 years ago by Mathieu Doucet
Re #7159 Add unit test
Changeset: 5ce8fcec647f57f27240aa8fe72454f7a9f1f701
comment:5 Changed 7 years ago by Mathieu Doucet
Merge branch 'feature/7159_sans_iq_subtraction' into develop
comment:6 Changed 7 years ago by Mathieu Doucet
Merge branch 'feature/7159_sans_iq_subtraction' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:7 Changed 7 years ago by Mathieu Doucet
Merge branch 'feature/7159_sans_iq_subtraction' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:8 Changed 7 years ago by Mathieu Doucet
Merge branch 'feature/7159_sans_iq_subtraction' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:9 Changed 7 years ago by Mathieu Doucet
Merge branch 'feature/7159_sans_iq_subtraction' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:11 Changed 7 years ago by Mathieu Doucet
Re #7159 Make sure Dq is passed through
Changeset: e729adfea0cf1ce3db5eb6c35abd150b084d0932
comment:12 Changed 7 years ago by Mathieu Doucet
Merge branch 'feature/7159_sans_iq_subtraction' into develop
comment:13 Changed 7 years ago by Mathieu Doucet
To test:
- Test 1:
- Start the SANSSubtraction algorithm dialog.
- Enter a file path in the input data and background properties. The file should contain I(Q) data. A good example file can be found in the system tests: Data/SANS2D/reduced_center_by_hand.txt
- Pick an output directory.
- Pick an output workspace name.
- Hit run. The output workspace should be the difference between the two inputs. If the input data had Dx values, they should have been copied to the output workspace. Two files should be created in the output directory you picked. An xml file and an ascii file.
- Test 2:
- Load the reduced_center_by_hand.txt file above.
- Repeat the steps of Test 1 but replace the path of one of the inputs by the name of the workspace you just loaded.
- The algorithm should have the exact same behavior.
comment:14 Changed 7 years ago by Mathieu Doucet
Re #7159 Added documentation
Changeset: 19019653b1da286c140a80e5bf908f2364d7bd97
comment:15 Changed 7 years ago by Mathieu Doucet
Merge branch 'feature/7159_sans_iq_subtraction' into develop
comment:16 Changed 7 years ago by Mathieu Doucet
- Status changed from accepted to verify
- Resolution set to fixed
comment:17 Changed 7 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester set to Martyn Gigg
comment:18 Changed 7 years ago by Martyn Gigg
- Status changed from verifying to reopened
- Resolution fixed deleted
Test 2 as specified doesn't work for me. I used this script:
Load(Filename=r'reduced_center_by_hand.txt',OutputWorkspace='reduced_center_by_hand',Unit='MomentumTransfer') SANSSubtract(DataDistribution='reduced_center_by_hand',Background=r'reduced_center_calculated.txt',OutputDirectory=r'/home/dmn58364/SavedData',OutputWorkspace='ws')
If I run ConvertToHistogram before the subtract it is fine. I assume this is intended but I wonder if we could make it clearer for users what they need to do, either in the documentation of within the algorithm?
comment:19 Changed 7 years ago by Mathieu Doucet
Re #7159 Fix issue with data already loaded
Changeset: 3a53033299a508ff8de10ae72fc5b0996dee8cb8
comment:20 Changed 7 years ago by Mathieu Doucet
Merge branch 'feature/7159_sans_iq_subtraction' into develop
comment:21 Changed 7 years ago by Mathieu Doucet
- Status changed from reopened to accepted
Please try it again. The algorithm should now do the necessary transformation to produce data that is consistent with the requested functionality. Whatever data is loaded, the algorithm should treat it as I(Q) data. Test 2 should now be working.
comment:22 Changed 7 years ago by Mathieu Doucet
- Status changed from accepted to verify
- Resolution set to fixed
comment:24 Changed 7 years ago by Martyn Gigg
Merge remote-tracking branch 'origin/feature/7159_sans_iq_subtraction' into master
comment:25 Changed 7 years ago by Martyn Gigg
- Status changed from verifying to closed
Second test looks fine now.
comment:26 Changed 7 years ago by Martyn Gigg
Merge remote-tracking branch 'origin/feature/7159_sans_iq_subtraction' into 7090_runpythonscript
comment:28 Changed 7 years ago by Nick Draper
- Milestone changed from Release 2.5.3 to Release 2.6
Moved to release 2.6 pending acceptance into the patch
comment:29 Changed 7 years ago by Mathieu Doucet
Re #7159 First cut at subtraction algorithm
Changeset: 85218fd9fe7abf8866781f5a2be6021bb469ec9f
comment:30 Changed 7 years ago by Mathieu Doucet
Re #7159 Add unit test
Changeset: 64e5c348846bb534eac77d20aff7232b1514e589
comment:31 Changed 7 years ago by Mathieu Doucet
Re #7159 Make sure Dq is passed through
Changeset: e3065c45bd807317f2986943aedec4b67e3a71da
comment:32 Changed 7 years ago by Mathieu Doucet
Re #7159 Added documentation
Changeset: bed2f87d836d40e4ee3fe342150281c0e6cec057
comment:33 Changed 7 years ago by Mathieu Doucet
Re #7159 Fix issue with data already loaded
Changeset: 47a756bad81443ab72f4fa9e6f6695cacbb8796d
comment:34 Changed 7 years ago by Mathieu Doucet
- Milestone changed from Release 2.6 to Release 2.5.3
I want it in. I have users who are expecting it.
comment:35 Changed 7 years ago by Nick Draper
- Keywords PatchCandidate,Released added; PatchCandidate removed
comment:36 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 8005
Re #7159 First cut at subtraction algorithm
Changeset: e121a3a86e47907ea02d1365055a5288622aad35