Ticket #7976 (closed: fixed)
[IDA] - CalcCorrections - replace Fortran FlatAbs program with Python version
Reported by: | Samuel Jackson | Owned by: | Samuel Jackson |
---|---|---|---|
Priority: | major | Milestone: | Release 3.0 |
Component: | Indirect Inelastic | Keywords: | |
Cc: | spencer.howells@… | Blocked By: | |
Blocking: | Tester: | Gesner Passos |
Description
New ticket from Spencer:
In file IndirectAbsCor.py there is a new set of routines to run FlatAbs - line 208 onwards. Lines 125-6 are also changes. Importing Fortran program fltabs has been removed from line 7.
Testing
Should give the same results but with a slightly different accuracy.
After verifying the Fortran programs fltabs_win*.pyd can be removed from the system.
Attachments
Change History
Changed 7 years ago by Samuel Jackson
- Attachment IndirectAbsCor.py added
comment:1 Changed 7 years ago by Samuel Jackson
- Status changed from new to inprogress
Refs #7976 Added new python implementation.
Changeset: db405c349350ea15ce8c090065115d21631fac6e
comment:2 Changed 7 years ago by Samuel Jackson
Refs #7976 Remove fortran modules from Mantid.
Changeset: 58bd398e2242215ba4458db93d15065026f9ef4c
Changed 7 years ago by Samuel Jackson
- Attachment ISISIndirectAbsCor_FltAbsTest.nxs added
Old reference result
comment:3 Changed 7 years ago by Samuel Jackson
Refs #7976 Updated reference result for corrections
Changeset: 1c57c2b33fc6be17f567f09121219356a29f55bb
comment:4 Changed 7 years ago by Samuel Jackson
- Status changed from inprogress to verify
- Resolution set to fixed
- Milestone changed from Backlog to Release 3.0
To Tester
I've replaced the fortran module for flatabs with Spencers python implementation. The new routine gives almost identical results as the previous code.
This branch still uses some fortran code so this ticket will need to be tested on windows and it must be built in release mode or it won't work.
Check that Calculate Corrections still works on the IDA interface. Instructions for running it can be found here: http://www.mantidproject.org/Indirect:Indirect_Data_Analysis#Running_Calculate_Corrections
I would also suggesting checking the accuracy of the results. The testing script is mostly lifted from the system tests. Use it to check that the workspace(s) generated give similar results to the values in attached ISISIndirectAbsCor_FltAbsTest.nxs (this is the reference result from before the changes). They won't be the same but the values should be close.
Note: Branches for this ticket need merging in both the system tests and the main repo
comment:5 Changed 7 years ago by Gesner Passos
- Status changed from verify to verifying
- Tester set to Gesner Passos
comment:6 Changed 7 years ago by Gesner Passos
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/7976_replace_flatabs_with_python'
Full changeset: 509e04acf516cf833644d2e8322be1663969708e
comment:7 Changed 7 years ago by Gesner Passos
Merge remote-tracking branch 'origin/feature/7976_replace_flatabs_with_python'
Full changeset: cb8415ffe0004bcc9f7a36757b683e0379b27a84
comment:8 Changed 7 years ago by Gesner Passos
Well, we have improved from using a black-box code (which was in the fortran code) to a python function. What I mean from improved is that at least, now could know what that function does.
We can still improve, and ticket #8116 was created for this.
The system works as it is described.
Modified version of the python script