Skip to content
Snippets Groups Projects
Commit 97891384 authored by Adam J. Jackson's avatar Adam J. Jackson
Browse files

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.
parent d7ed1e8b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment