SasView / sasmodels

Package for calculation of small angle scattering models using OpenCL.
BSD 3-Clause "New" or "Revised" License
15 stars 27 forks source link

generalise broad peak model #458

Closed dehoni closed 2 years ago

dehoni commented 3 years ago

The model "broad_peak" can be generalized to cover Lorentz like behavior and Debye-Anderson-Brumberger by introducing a outer power term with "exponent_p". The commit does the necessary changes.

butlerpd commented 3 years ago

Will this break backward compatibility with old projects? Does it require some translations for that compatibiltiy?

krzywon commented 3 years ago

To keep backward compatibility with old save projects saved with old parameter names you will need to update sasmodels/conversion_table.py. The python file houses a dictionary that maps the previous SasView version to the changes made after that version was released. This can accommodate model name and parameter name change.

General usage, but more information is given in the file documentation:

: { : [ , { : , ... : } ] }
krzywon commented 3 years ago

More information: https://www.sasview.org/docs/dev/sasmodels-dev/overview.html#model-conversion

dehoni commented 3 years ago

Tested to save a project and analysis after fitting with some test data from the PR and load it to the Release version, and vice versa. The parameters are passed on correctly and files are read smoothly.

butlerpd commented 2 years ago

@krzywon to look at work required to resolve [Sasview#1902]. @butlerpd will check what happens for users who might encounter this problem

butlerpd commented 2 years ago

sasmodels ready for testing on Win

butlerpd commented 2 years ago

Made a fit using broad_peak fitting the test/1d/hSDS_D2O_2p0percent.xml and saved as a project in versions 4.2.2; 5.0.4; 5.0.5a1 main branch build of 13 Oct 2021. Then installed the sasmodels Jenkins PR build of PR #458.

Results

Conclusion:

butlerpd commented 2 years ago

I think we agreed that this could be merged to main once the release branch is created? The SasView Issue, SasView #1902, to fix the problem with loading project has already been listed as a blocker.