Abins: replace CalculateSPowder test data for new sampling scheme
The sample data for the CalculateSPowder test needs to be updated as part of the work on broadening, because Abins is now producing different results. Specifically: the instrumental broadening function applied to the S data has been replaced and is now smooth; the reference frequencies are now defined to be in the middle of the histogram bins rather than at the edges. This difference in binning conventions has actually changed the size of the results array (by 1!) The format of the sample data for CalculateSPowder is not very pretty; it is some kind of raw text dump. It would be nice to avoid such things with a proper JSON serialisation setup, but for now the priority is to fix the test in a way that is comparable with previous behaviour. The process used to generate the replacement file was to obtain the calculation data with AbinsModules.CalculateS.init(...args...).get_formatted_data() and dump the text representation to a file with numpy.set_printoptions(threshold=numpy.nan) with open('Si2-sc-CalculateSPowder_S.txt', 'w') as f: f.write(str(calculated_data.extract())) The resulting file appears more neatly formatted than its predecessor 4b77bac3f8c1dc54f63bd41ca3075c48, but seems acceptable to the test parser.
Please register or sign in to comment