Ticket #7114 (closed: fixed)
Rename current ModeratorTzero algorithm
Reported by: | Jose Borreguero | Owned by: | Jose Borreguero |
---|---|---|---|
Priority: | major | Milestone: | Release 2.6 |
Component: | Indirect Inelastic | Keywords: | |
Cc: | taylorrj@…, campbellsi@… | Blocked By: | |
Blocking: | Tester: | Martyn Gigg |
Description (last modified by Nick Draper) (diff)
The current ModeratorTzero algorithm assumes a linear relationship between the delay emission time of the neutron from the moderator and its wavelenght. This is sensible only for beamlines where all incident neutrons have similar energies (e.g. BASIS@ORNL). Those beamlines are used for study of quasi-elastic processes. This assumption is incorrect for indirect instruments designed to detect inelastic processes. These instrument need an incoming flux of neutrons with a wide range of energies.
We will rename this algorithm as ModeratorTzeroLinear. In addition, reduction scripts making use of this algorithm should be updated with the new name. Those are:
- Framework/PythonInterface/plugins/algorithms/BASISReduction.py
- scripts/Inelastic/inelastic_indirect_reduction_steps.py
Change History
comment:2 Changed 7 years ago by Jose Borreguero
Refs #7114 Correct renaming of test file
Changeset: 33f2984cb477a0d1299379e292ee4381698ab5e2
comment:3 Changed 7 years ago by Jose Borreguero
Refs #7114 Files moved and modified
Changeset: 733eaa2fa3e2fb12eb3c930b74eae4bdf43dda8b
comment:4 Changed 7 years ago by Jose Borreguero
Refs #7114 Correct renaming of test file
Changeset: 33f2984cb477a0d1299379e292ee4381698ab5e2
comment:6 Changed 7 years ago by Jose Borreguero
- Status changed from accepted to verify
- Resolution set to fixed
comment:7 Changed 7 years ago by Jose Borreguero
Note to Tester (feature/7114_ModeratorTzeroLinear):
you can open the "Convert to Energy" interface and try to reduce one of BASIS event files (Test/AutoTestData/BSS_11841_event.nxs is an option). The reduction should proceed with no errors.
comment:8 Changed 7 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester set to Martyn Gigg
comment:9 follow-up: ↓ 10 Changed 7 years ago by Martyn Gigg
- Cc taylorrj@…, campbellsi@… added
- Status changed from verifying to reopened
- Resolution fixed deleted
While the rename has been done correctly I don't think we should actually be doing it. If we rename the algorithm then any existing users will find themselves with a script that doesn't work.
The process here is to deprecate the original algorithm and to introduce the one with the new name then in a release or 2 it can be removed. The simplest approach that I would suggest here is to leave ModeratorTzeroLinear as it is and add ModeratorTzero that is deprecated but just calls ModeratorTzeroLinear. That way it will be easy to remove when the time comes.
comment:10 in reply to: ↑ 9 Changed 7 years ago by Jose Borreguero
Replying to Martyn Gigg:
I want to clarify that no users will employ this algorithm in their scripts. The application of this algorithm is restricted to reduction of data from indirect spectroscopy instruments.
There is a new ModeratorTzero algorithm coming (#6670) that will replace the current one. This new algorithm will be applicable to data reduction from any indirect instrument. The current ModeratorTzero algorithm is only applicable to instruments featuring an incoming neutron flux having a narrow range of energies. This restriction, on the other hand, allows for a different implementation resulting in much faster execution times. It is only for this reason that we want to keep it, but under a different name that will denote that the algorithm is to be applied only to certain indirect instruments.
These considerations make the standard deprecation-replacement protocol not useful in this case. We need both algorithms being used now for reduction, and I believe it is more correct if the general algorithm bears the original name, while the specialized algorithm bears a modified name.
While the rename has been done correctly I don't think we should actually be doing it. If we rename the algorithm then any existing users will find themselves with a script that doesn't work.
The process here is to deprecate the original algorithm and to introduce the one with the new name then in a release or 2 it can be removed. The simplest approach that I would suggest here is to leave ModeratorTzeroLinear as it is and add ModeratorTzero that is deprecated but just calls ModeratorTzeroLinear. That way it will be easy to remove when the time comes.
comment:11 Changed 7 years ago by Jose Borreguero
Refs #7114 renamed ModeratorTzero in BASISAutoReduction.py
Changeset: d652a38a5167348958a0a2f0a82d5863907e08bc
comment:12 Changed 7 years ago by Jose Borreguero
Refs #7114 renamed ModeratorTzero in BASISAutoReduction.py
Changeset: d652a38a5167348958a0a2f0a82d5863907e08bc
comment:13 Changed 7 years ago by Jose Borreguero
SystemTest BASISAutoReduction.py now passes
comment:15 Changed 7 years ago by Jose Borreguero
- Status changed from accepted to verify
- Resolution set to fixed
comment:17 Changed 7 years ago by Martyn Gigg
Merge remote-tracking branch 'origin/feature/7114_ModeratorTzeroLinear' into master
comment:19 Changed 7 years ago by Martyn Gigg
Merge remote-tracking branch 'origin/feature/7114_ModeratorTzeroLinear' into master
comment:20 Changed 7 years ago by Jose Borreguero
Merge branch 'feature/7114_ModeratorTzeroLinear' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:21 Changed 7 years ago by Jose Borreguero
Merge branch 'feature/7114_ModeratorTzeroLinear' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:22 Changed 7 years ago by Russell Taylor
Merge remote branch 'origin/feature/7047_remove_old_convertToMDEvents' into 7090_runpythonscript
comment:24 Changed 7 years ago by Nick Draper
- Component changed from Framework to Indirect Inelastic
- Description modified (diff)
comment:25 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 7960
Refs #7114 Files moved and modified