Abins refactoring: provide method to generate spowder test data
A new method is provided in AbinsModules.CalculateS to generate a test data file for the AbinsCalculateSPowder test. This format isn't great and should be refined to something like standard JSON, but at least we now have a standard way of generating it. The input options are a few calculation parameters and a precalculated AbinsData object. To make these objects easier to instantiate, a from_calculation_data() classmethod is added. The logic for identifying and calling a file loader has been moved from the main Abins algorithm into AbinsData to support this without redundancy. It may make sense to move this again to somewhere else, e.g. a new *AbinsModules/Loaders/__init__.py* but for now this is close to the point of use. Equivalence of this method's output to the existing test file has been verified manually for the Si2 order-1 test data. The reference file does not need to be updated, and tests should continue to pass.
Showing
- Framework/PythonInterface/plugins/algorithms/Abins.py 3 additions, 4 deletionsFramework/PythonInterface/plugins/algorithms/Abins.py
- scripts/AbinsModules/AbinsData.py 23 additions, 2 deletionsscripts/AbinsModules/AbinsData.py
- scripts/AbinsModules/CalculateS.py 30 additions, 0 deletionsscripts/AbinsModules/CalculateS.py
Loading
Please register or sign in to comment